Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion epochlib/pipeline/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def predict(self, x: Any, **pred_args: Any) -> Any:

return x

def _set_hash(self, prev_hash: str) -> None:
def set_hash(self, prev_hash: str) -> None:
"""Set the hash of the pipeline.

:param prev_hash: The hash of the previous block.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "epochlib"
version = "5.0.0"
version = "5.0.1"
authors = [
{ name = "Jasper van Selm", email = "jmvanselm@gmail.com" },
{ name = "Ariel Ebersberger", email = "arielebersberger@gmail.com" },
Expand Down
17 changes: 10 additions & 7 deletions tests/pipeline/test_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,6 @@ def test_pipeline_get_hash_no_change(self):
pred_sys=predicting_system,
)
assert x_system.get_hash() == ""
# assert y_system.get_hash() == ""
# assert training_system.get_hash() == ""
# assert predicting_system.get_hash() == ""
# assert pipeline.get_hash() == ""

def test_pipeline_get_hash_with_change(self):
class TransformingBlock(Transformer):
Expand Down Expand Up @@ -604,11 +600,18 @@ def transform(self, x):
y_system = TransformingSystem()
training_system = TrainingSystem()
prediction_system = TransformingSystem(steps=[transform1])
pipeline = Pipeline(
assert x_system.get_hash() == prediction_system.get_hash()
pipeline1 = Pipeline(
x_sys=x_system,
y_sys=y_system,
train_sys=training_system,
pred_sys=prediction_system,
)
assert x_system.get_hash() == prediction_system.get_hash()
assert pipeline.get_hash() != ""
pipeline1_train_sys_hash = pipeline1.train_sys.get_hash()
pipeline2 = Pipeline(
x_sys=TransformingSystem(),
y_sys=y_system,
train_sys=training_system,
pred_sys=prediction_system,
)
assert pipeline1_train_sys_hash != pipeline2.train_sys.get_hash()
Loading