Skip to content

Add __version__ attribute for programmatic version checking#5046

Closed
eytan wants to merge 1 commit into
facebook:mainfrom
eytan:export-D96685150
Closed

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

Conversation

@eytan
Copy link
Copy Markdown
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
Copy Markdown

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.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 19, 2026

This pull request has been merged in 987833b.

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 Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant