Skip to content

Commit

Permalink
Do not take into account disable_cuda_device_placement for pipeline…
Browse files Browse the repository at this point in the history
… signature (#838)

* Do not take into account `disable_cuda_device_placement` for pipeline
signature

* Fix unit test
  • Loading branch information
gabrielmbmb authored Jul 29, 2024
1 parent fc7e82e commit 974b45e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/distilabel/pipeline/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ def _create_signature(self) -> str:
if isinstance(value, dict):
# input_mappings/output_mappings
step_info += "-".join(
[f"{str(k)}-{str(v)}" for k, v in value.items()]
[
f"{str(k)}={str(v)}"
for k, v in value.items()
if k not in ("disable_cuda_device_placement",)
]
)
elif isinstance(value, (list, tuple)):
# runtime_parameters_info
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/pipeline/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ def test_base_pipeline_signature(self) -> None:
)

signature = pipeline._create_signature()
assert signature == "f291da215cd42085c538e4897e4355f614932547"
assert signature == "d3c7c572fe31233aa1198174c6c793b67ef3744b"

def test_binary_rshift_operator(self) -> None:
# Tests the steps can be connected using the >> operator.
Expand Down

0 comments on commit 974b45e

Please sign in to comment.