-
Notifications
You must be signed in to change notification settings - Fork 102
: add generated build info module with commit hash and metadata #1738
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
Open
shayne-fletcher
wants to merge
2
commits into
meta-pytorch:main
Choose a base branch
from
shayne-fletcher:export-D86009410
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
: add generated build info module with commit hash and metadata #1738
shayne-fletcher
wants to merge
2
commits into
meta-pytorch:main
from
shayne-fletcher:export-D86009410
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D86009410. |
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 1, 2025
…-pytorch#1738) Summary: this diff adds an experimental build identity module to hyperactor_mesh. at buck build time we generate a rust module ("build_info.rs") with four values: sapling changeset hash, build timestamp, user, and host. the file is not checked in; it is produced in buck-out and added to the crate via `mapped_srcs`. cargo / oss builds do not see it. fbcode builds get a new `hyperactor_mesh::build_info` module (behind `#[cfg(fbcode_build)]`) that exposes `commit()`, `timestamp()`, `user()`, and `host()`. each of those returns a `&'static str` baked in at build time. no syscalls or runtime i/o. the module can also register these values into the global config/attrs registry. calling `init()` installs `BUILD_COMMIT`, `BUILD_TIMESTAMP`, `BUILD_USER`, and `BUILD_HOST` into process-wide `Attrs` via `hyperactor::config::global`. callsites that only need to compare versions (e.g. host/proc handshake) can read `commit()` directly. code that wants to surface this via logs or admin endpoints can call `init()` once and query the global config. this is buck-only. we do not add a `build.rs`, we do not write into the source tree, and cargo builds are unchanged. rfc: host/child handshake will start comparing `commit()` at startup and warn or fail on mismatch. Differential Revision: D86009410
84ea261 to
3ac760f
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 1, 2025
…-pytorch#1738) Summary: this diff adds an experimental build identity module to hyperactor_mesh. at buck build time we generate a rust module ("build_info.rs") with four values: sapling changeset hash, build timestamp, user, and host. the file is not checked in; it is produced in buck-out and added to the crate via `mapped_srcs`. cargo / oss builds do not see it. fbcode builds get a new `hyperactor_mesh::build_info` module (behind `#[cfg(fbcode_build)]`) that exposes `commit()`, `timestamp()`, `user()`, and `host()`. each of those returns a `&'static str` baked in at build time. no syscalls or runtime i/o. the module can also register these values into the global config/attrs registry. calling `init()` installs `BUILD_COMMIT`, `BUILD_TIMESTAMP`, `BUILD_USER`, and `BUILD_HOST` into process-wide `Attrs` via `hyperactor::config::global`. callsites that only need to compare versions (e.g. host/proc handshake) can read `commit()` directly. code that wants to surface this via logs or admin endpoints can call `init()` once and query the global config. this is buck-only. we do not add a `build.rs`, we do not write into the source tree, and cargo builds are unchanged. rfc: host/child handshake will start comparing `commit()` at startup and warn or fail on mismatch. Differential Revision: D86009410
3ac760f to
fe6e954
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 1, 2025
…-pytorch#1738) Summary: this diff adds an experimental [build identity module](https://www.internalfb.com/phabricator/paste/view/P2018151567) to hyperactor_mesh. at buck build time we generate a rust module ("build_info.rs") with four values: sapling changeset hash, build timestamp, user, and host. the file is not checked in; it is produced in buck-out and added to the crate via `mapped_srcs`. cargo / oss builds do not see it. fbcode builds get a new `hyperactor_mesh::build_info` module (behind `#[cfg(fbcode_build)]`) that exposes `commit()`, `timestamp()`, `user()`, and `host()`. each of those returns a `&'static str` baked in at build time. no syscalls or runtime i/o. the module can also register these values into the global config/attrs registry. calling `init()` installs `BUILD_COMMIT`, `BUILD_TIMESTAMP`, `BUILD_USER`, and `BUILD_HOST` into process-wide `Attrs` via `hyperactor::config::global`. callsites that only need to compare versions (e.g. host/proc handshake) can read `commit()` directly. code that wants to surface this via logs or admin endpoints can call `init()` once and query the global config. this is buck-only. we do not add a `build.rs`, we do not write into the source tree, and cargo builds are unchanged. rfc: host/child handshake will start comparing `commit()` at startup and warn or fail on mismatch. Differential Revision: D86009410
fe6e954 to
0ce6caa
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 1, 2025
…-pytorch#1738) Summary: this diff adds an experimental [build identity module](https://www.internalfb.com/phabricator/paste/view/P2018151567) to hyperactor_mesh. at buck build time we generate a rust module ("build_info.rs") with four values: sapling changeset hash, build timestamp, user, and host. the file is not checked in; it is produced in buck-out and added to the crate via `mapped_srcs`. cargo / oss builds do not see it. fbcode builds get a new `hyperactor_mesh::build_info` module (behind `#[cfg(fbcode_build)]`) that exposes `commit()`, `timestamp()`, `user()`, and `host()`. each of those returns a `&'static str` baked in at build time. no syscalls or runtime i/o. the module can also register these values into the global config/attrs registry. calling `init()` installs `BUILD_COMMIT`, `BUILD_TIMESTAMP`, `BUILD_USER`, and `BUILD_HOST` into process-wide `Attrs` via `hyperactor::config::global`. callsites that only need to compare versions (e.g. host/proc handshake) can read `commit()` directly. code that wants to surface this via logs or admin endpoints can call `init()` once and query the global config. this is buck-only. we do not add a `build.rs`, we do not write into the source tree, and cargo builds are unchanged. rfc: host/child handshake will start comparing `commit()` at startup and warn or fail on mismatch. Differential Revision: D86009410
0ce6caa to
675a580
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 1, 2025
…-pytorch#1738) Summary: this diff adds an experimental [build identity module](https://www.internalfb.com/phabricator/paste/view/P2018151567) to hyperactor_mesh. at buck build time we generate a rust module ("build_info.rs") with four values: sapling changeset hash, build timestamp, user, and host. the file is not checked in; it is produced in buck-out and added to the crate via `mapped_srcs`. cargo / oss builds do not see it. fbcode builds get a new `hyperactor_mesh::build_info` module (behind `#[cfg(fbcode_build)]`) that exposes `commit()`, `timestamp()`, `user()`, and `host()`. each of those returns a `&'static str` baked in at build time. no syscalls or runtime i/o. the module can also register these values into the global config/attrs registry. calling `init()` installs `BUILD_COMMIT`, `BUILD_TIMESTAMP`, `BUILD_USER`, and `BUILD_HOST` into process-wide `Attrs` via `hyperactor::config::global`. callsites that only need to compare versions (e.g. host/proc handshake) can read `commit()` directly. code that wants to surface this via logs or admin endpoints can call `init()` once and query the global config. this is buck-only. we do not add a `build.rs`, we do not write into the source tree, and cargo builds are unchanged. rfc: host/child handshake will start comparing `commit()` at startup and warn or fail on mismatch. Differential Revision: D86009410
675a580 to
5e24f85
Compare
…pytorch#1739) Summary: pytorch `InputBuffer::add` API changed. adapt `monarch/python/monarch/_gradient_generator.cpp` ``` realInputBuffer(node).add( input_nr, check_and_reduce(node->node, input_nr, std::move(t)), std::nullopt, std::nullopt); // Remove: node->node ``` that gradient computation still works correctly after this change needs to be tested. Reviewed By: vidhyav Differential Revision: D86025607
…-pytorch#1738) Summary: this diff adds an experimental [build identity module](https://www.internalfb.com/phabricator/paste/view/P2018151567) to hyperactor_mesh. at buck build time we generate a rust module ("build_info.rs") with four values: sapling changeset hash, build timestamp, user, and host. the file is not checked in; it is produced in buck-out and added to the crate via `mapped_srcs`. cargo / oss builds do not see it. fbcode builds get a new `hyperactor_mesh::build_info` module (behind `#[cfg(fbcode_build)]`) that exposes `commit()`, `timestamp()`, `user()`, and `host()`. each of those returns a `&'static str` baked in at build time. no syscalls or runtime i/o. the module can also register these values into the global config/attrs registry. calling `init()` installs `BUILD_COMMIT`, `BUILD_TIMESTAMP`, `BUILD_USER`, and `BUILD_HOST` into process-wide `Attrs` via `hyperactor::config::global`. callsites that only need to compare versions (e.g. host/proc handshake) can read `commit()` directly. code that wants to surface this via logs or admin endpoints can call `init()` once and query the global config. this is buck-only. we do not add a `build.rs`, we do not write into the source tree, and cargo builds are unchanged. rfc: host/child handshake will start comparing `commit()` at startup and warn or fail on mismatch. Differential Revision: D86009410
5e24f85 to
b2b47b0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
this diff adds an experimental build identity module to hyperactor_mesh.
at buck build time we generate a rust module ("build_info.rs") with four values: sapling changeset hash, build timestamp, user, and host. the file is not checked in; it is produced in buck-out and added to the crate via
mapped_srcs. cargo / oss builds do not see it. fbcode builds get a newhyperactor_mesh::build_infomodule (behind#[cfg(fbcode_build)]) that exposescommit(),timestamp(),user(), andhost(). each of those returns a&'static strbaked in at build time. no syscalls or runtime i/o.the module can also register these values into the global config/attrs registry. calling
init()installsBUILD_COMMIT,BUILD_TIMESTAMP,BUILD_USER, andBUILD_HOSTinto process-wideAttrsviahyperactor::config::global. callsites that only need to compare versions (e.g. host/proc handshake) can readcommit()directly. code that wants to surface this via logs or admin endpoints can callinit()once and query the global config.this is buck-only. we do not add a
build.rs, we do not write into the source tree, and cargo builds are unchanged.rfc: host/child handshake will start comparing
commit()at startup and warn or fail on mismatch.Differential Revision: D86009410