Skip to content

Add __version__ attribute for programmatic version checking#5046

Open
eytan wants to merge 1 commit intofacebook:mainfrom
eytan:export-D96685150
Open

Add __version__ attribute for programmatic version checking#5046
eytan wants to merge 1 commit intofacebook:mainfrom
eytan:export-D96685150

Conversation

@eytan
Copy link
Contributor

@eytan eytan commented Mar 17, 2026

Summary:
Adds __version__ to ax/__init__.py by importing from ax.version, which is generated by setuptools_scm at build time. Uses a try/except fallback to "Unknown" for environments where the version file hasn't been generated yet, matching the same pattern used in BoTorch. This enables programmatic version checking via ax.__version__.


AI generated Summary & Test Plan from DEV111709377

Reviewed By: saitcakmak

Differential Revision: D96685150

Summary:
Adds `__version__` to `ax/__init__.py` by importing from `ax.version`, which is generated by `setuptools_scm` at build time. Uses a try/except fallback to `"Unknown"` for environments where the version file hasn't been generated yet, matching the same pattern used in BoTorch. This enables programmatic version checking via `ax.__version__`.

---
AI generated Summary & Test Plan from DEV111709377

Reviewed By: saitcakmak

Differential Revision: D96685150
@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 17, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 17, 2026

@eytan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96685150.

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

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant