Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: serialization issues after torch 2.6 #245

Closed
fabiocat93 opened this issue Jan 31, 2025 · 0 comments · Fixed by #248
Closed

Bug: serialization issues after torch 2.6 #245

fabiocat93 opened this issue Jan 31, 2025 · 0 comments · Fixed by #248
Labels
bug Something isn't working

Comments

@fabiocat93
Copy link
Collaborator

fabiocat93 commented Jan 31, 2025

Description

on jan 29, torch 2.6 introduced some disruptive changes for users serializing more than basic types (https://github.com/pytorch/pytorch/releases/tag/v2.6.0) and, consequently, our pydra tests src/tests/utils/data_structures/pydra_helpers_test.py fail. as a workaround, for now, I have fixed torch version to < 2.6. @wilke0818 and I have been exploring the space but haven't found a solution yet.

Steps to Reproduce

Install torch 2.6 and run unit tests

Expected Results

Success

Actual Results

================================================== FAILURES ===================================================
_________________________________________________ test_pydra __________________________________________________
[gw2] darwin -- Python 3.10.10 /Users/fabiocat/Library/Caches/pypoetry/virtualenvs/senselab-KP8v1V64-py3.10/bin/python

    def test_pydra() -> None:
        """Test simple tensor pydra workflow."""
        wf = pydra.Workflow(name="wf_test", input_spec=["x"])
        wf.split("x", x=[torch.tensor([[3, 4], [5, 6]]), torch.tensor([[0, 1], [1, 2]])])
    
        wf.add(pydra_task(name="test_task_task", test_input=wf.lzin.x))
>       wf.set_output([("wf_out", wf.test_task_task.lzout.out)])

src/tests/utils/data_structures/pydra_helpers_test.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = LazyOut(_task=<pydra.engine.task.FunctionTask object at 0x3730e6500>), name = 'out'

    def __getattr__(self, name):
        if name in ("_task", "_attr_type", "_field_names"):
            raise AttributeError(f"{name} hasn't been set yet")
        if name not in self._field_names:
>           raise AttributeError(
                f"Task '{self._task.name}' has no {self._attr_type} attribute '{name}', "
                "available: '" + "', '".join(self._field_names) + "'"
            )
E           AttributeError: Task 'test_task_task' has no output attribute 'out', available: '_is_param', 'all_'

../../Library/Caches/pypoetry/virtualenvs/senselab-KP8v1V64-py3.10/lib/python3.10/site-packages/pydra/engine/specs.py:696: AttributeError

Additional Notes

No response

@fabiocat93 fabiocat93 added the bug Something isn't working label Jan 31, 2025
@fabiocat93 fabiocat93 changed the title Bug: Bug: serialization issues after torch 2.6 Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant