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

[torchx/version] Make torchx.version.TORCHX_IMAGE follow the same semantics as __version__ #267

Closed
kiukchung opened this issue Oct 15, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@kiukchung
Copy link
Collaborator

Description

torchx.__version__ and torchx.__image__ should be consistent. Currently version is obtained by torchx.__version__ but image is torchx.version.TORCHX_IMAGE.

Detailed Proposal

Add import torchx.version.TORCHX_IMAGE to the root __init__.py file so that TORCHX_IMAGE can be referenced as torchx.__image__. (In addition we should make torchx.__version__ and torchx.__image__ reflect FB version and image when used internally (and not from github or pip)).

Motivation/Background

Once this is done we can change all references to TORCHX_IMAGE in the builtin components which would make them work in oss and also at fb (since presumably torchx.__image__ would point to ghcr.io docker image for oss and our internal package at fb).

Alternatives

N/A

Additional context/links

N/A

@d4l3k d4l3k added the enhancement New feature or request label Oct 20, 2021
@d4l3k
Copy link
Member

d4l3k commented Oct 20, 2021

Generally __foo__ style strings are reserved for internal python known keywords. Could potentially be confusing if a user sees __image__ and assumes it's some builtin python language feature.

__version__ PEP for example https://www.python.org/dev/peps/pep-0396/

@kiukchung kiukchung added this to the 0.1.1 release milestone Oct 21, 2021
@kiukchung
Copy link
Collaborator Author

kiukchung commented Oct 21, 2021

I see so if torchx.__image__ violates PEP standards just import TORCHX_IMAGE into init.py so that we can do torchx.TORCHX_IMAGE or torchx.IMAGE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants