Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timkucera committed Apr 25, 2024
1 parent d2c5c63 commit fd777d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions proteinshake/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ def split(self, Xy):

def loader(
self,
split=None,
split=0,
batch_size=None,
shuffle: bool = False,
random_seed: Union[int, None] = None,
**kwargs,
):
rng = np.random.default_rng(random_seed)
path = self.root / split / self.transform.hash / "shards"
path = self.root / split / hash(self.transform) / "shards"
shard_index = load(path / "index.npy")
if (
not batch_size is None
Expand Down
3 changes: 1 addition & 2 deletions proteinshake/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ def __init__(self, *transforms):
error("You cannot use more than one framework.")
setattr(self, "create_loader", transform.create_loader)

@property
def hash(self):
def __hash___(self):
return self.__class__.__name__

def fit(self, dataset):
Expand Down

0 comments on commit fd777d6

Please sign in to comment.