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

Detailed __repr__ #638

Merged
merged 61 commits into from
Jul 1, 2024
Merged

Detailed __repr__ #638

merged 61 commits into from
Jul 1, 2024

Conversation

k223kim
Copy link
Contributor

@k223kim k223kim commented Jun 24, 2024

Before submitting
  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #510.

  • Updated TensorProxy's __repr__.
  • This resulted in updating prettyprint
  • Updated Device's __repr__
  • make_tensor accepts thunder.devices.Device now!
  • update dtype __repr__
  • update executor __repr__

Potential Discussions

  • codeutils.py's prettyprint to handle TensorProxy x in dataclass
  • passing device.type for make_tensor
  • device indexing for cpu (do we allow cpu:0?) (related to _device_from_string_helper)
  • name of the __repr__

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

⚡️

@k223kim k223kim marked this pull request as ready for review June 27, 2024 09:27
thunder/core/codeutils.py Outdated Show resolved Hide resolved
@t-vi t-vi enabled auto-merge (squash) July 1, 2024 09:13
auto-merge was automatically disabled July 1, 2024 10:09

Head branch was pushed to by a user without write access

@t-vi t-vi merged commit b437cb0 into Lightning-AI:main Jul 1, 2024
36 checks passed
@t-vi
Copy link
Collaborator

t-vi commented Jul 1, 2024

Thank you @k223kim !

@github-actions github-actions bot deleted the k223kim/detailed_repr branch October 1, 2024 01:24
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.

Thunder object's __repr__ should indicate what object they are (TensorProxy and others)
4 participants