Skip to content

Commit

Permalink
rearrange
Browse files Browse the repository at this point in the history
  • Loading branch information
timkucera committed Jan 7, 2024
1 parent e22bafb commit 7f5b035
Show file tree
Hide file tree
Showing 44 changed files with 22 additions and 274 deletions.
2 changes: 1 addition & 1 deletion proteinshake/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.13'
__version__ = "1.0.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions proteinshake/backend/protein.py

This file was deleted.

4 changes: 0 additions & 4 deletions proteinshake/backend/structure.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 0 additions & 42 deletions proteinshake/frontend/README.md

This file was deleted.

Empty file removed proteinshake/frontend/__init__.py
Empty file.
120 changes: 0 additions & 120 deletions proteinshake/frontend/dataset.py

This file was deleted.

3 changes: 0 additions & 3 deletions proteinshake/frontend/transforms/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion proteinshake/frontend/transforms/framework/__init__.py

This file was deleted.

13 changes: 0 additions & 13 deletions proteinshake/frontend/transforms/post_framework/note.md

This file was deleted.

Empty file.
Empty file.
Empty file.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Metrics:
class Metric:
"""For a collection of predictions and target values, return set of performance metrics.,"""

pass
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 0 additions & 27 deletions proteinshake/readme.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions proteinshake/frontend/task.py → proteinshake/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
import os
from pathlib import Path
from functools import partial
from proteinshake.frontend.splitters import Split
from proteinshake.frontend.targets import Target
from proteinshake.frontend.evaluators import Metrics
from proteinshake.frontend.transforms import Transform, Compose
from proteinshake.split import Split
from proteinshake.target import Target
from proteinshake.metric import Metric
from proteinshake.transform import Transform, Compose
from proteinshake.util import amino_acid_alphabet, sharded, save_shards, load, warn


class Task:
dataset: str = ""
split: Split = None
target: Target = None
metrics: Metrics = None
metrics: Metric = None
augmentation: Transform = None

def __init__(
Expand All @@ -31,7 +31,7 @@ def __init__(
if not os.environ.get("PROTEINSHAKE_ROOT", None) is None:
root = os.environ["PROTEINSHAKE_ROOT"]
else:
root = "~/.proteinshake"
root = Path.home() / ".proteinshake"
root = Path(root) / self.__class__.__name__
os.makedirs(root, exist_ok=True)
self.root = root
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions proteinshake/transforms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .point_cloud import *
from .torch_framework import *
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ..transform import Transform
from proteinshake.frontend.representation import Representation
from proteinshake.transform import Transform
from proteinshake.representation import Representation
import numpy as np


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import torch
import numpy as np
from torch.utils.data import DataLoader, IterableDataset
from ..transform import Transform
from proteinshake.frontend.framework import Framework
from proteinshake.transform import Transform
from proteinshake.framework import Framework


class TorchFrameworkTransform(Framework, Transform):
Expand Down
39 changes: 0 additions & 39 deletions tests/dataset.py

This file was deleted.

16 changes: 8 additions & 8 deletions tests/task.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import unittest
import numpy as np
import itertools
from proteinshake.frontend.evaluators import Metrics
from proteinshake.frontend.targets import Target
from proteinshake.frontend.splitters import Split
from proteinshake.frontend.task import Task
from proteinshake.frontend.transforms import *
from proteinshake.frontend.transforms import Transform, LabelTransform
from proteinshake.metric import Metric
from proteinshake.target import Target
from proteinshake.split import Split
from proteinshake.task import Task
from proteinshake.transform import *
from proteinshake.transforms import *


class TestTask(unittest.TestCase):
Expand All @@ -16,7 +16,7 @@ class MyTarget(Target):
def __call__(self, dataset):
return (((p,), p["label"]) for p in dataset)

class MyMetrics(Metrics):
class MyMetric(Metric):
def __call__(self, y_true, y_pred):
return {"Accuracy": np.random.random()}

Expand All @@ -39,7 +39,7 @@ class MyTask(Task):
dataset = "test"
split = MySplit
target = MyTarget
metrics = MyMetrics
metrics = MyMetric
augmentation = MyAugmentation

# END USER
Expand Down

0 comments on commit 7f5b035

Please sign in to comment.