Skip to content

Conversation

@kmontemayor2-sc
Copy link
Collaborator

Scope of work done

We're doing this so we can better annotate the sharing dict if we put it in some typed object (e.g. https://github.com/Snapchat/GiGL/pull/447/files)

Where is the documentation for this feature?: N/A

Did you add automated tests or write a test plan?

Updated Changelog.md? NO

Ready for code review?: NO

@kmontemayor2-sc
Copy link
Collaborator Author

/unit_test_py

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

GiGL Automation

@ 18:00:48UTC : 🔄 Python Unit Test started.

@ 19:06:17UTC : ✅ Workflow completed successfully.

Copy link
Collaborator

@svij-sc svij-sc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, does mp_sharing_dict: "Optional[DictProxy[str, torch.Tensor]]" work?
Alternatively would upgrading the mypy version help or this is just an issue with DictProxy no matter what?

@kmontemayor2-sc
Copy link
Collaborator Author

Btw, does mp_sharing_dict: "Optional[DictProxy[str, torch.Tensor]]" work?

No, if I do this then I get the error in the code comment.

Alternatively would upgrading the mypy version help or this is just an issue with DictProxy no matter what?

I think this is due to the nature of DictProxy and how it's defined, which frankly I'm not sure I understand fully. https://github.com/python/cpython/blob/3.11/Lib/multiprocessing/managers.py#L1164-L1171

It's possible a newer version of python will use a different method here but I'm not sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants