launcher: wire TensorBoard fields into VertexAiJobConfig#621
Draft
kmontemayor2-sc wants to merge 2 commits intomainfrom
Draft
launcher: wire TensorBoard fields into VertexAiJobConfig#621kmontemayor2-sc wants to merge 2 commits intomainfrom
kmontemayor2-sc wants to merge 2 commits intomainfrom
Conversation
Adds two optional fields on ``VertexAiResourceConfig`` for opting into Vertex AI TensorBoard. ``tensorboard_resource_name`` points at an existing ``Tensorboard`` resource; ``tensorboard_experiment_name`` is the user-chosen ``TensorboardExperiment`` ID under that resource — multiple jobs sharing this name surface as comparable runs on the same TB page. The fields must be set together (or both unset). The validation rule is not enforced yet (lands in a follow-up PR); this commit only adds the proto fields and regenerates Python + Scala stubs. Also expands the docstring on ``TrainedModelMetadata.tensorboard_logs_uri`` to document its mapping to ``AIP_TENSORBOARD_LOG_DIR`` via ``CustomJobSpec.baseOutputDirectory``. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the launcher-side TensorBoard plumbing. After this PR, callers that pass ``tensorboard_logs_uri`` get ``baseOutputDirectory`` set on the CustomJob, and resource configs that set ``tensorboard_experiment_name`` get three env vars injected into the worker container so the trainer's chief-rank uploader can find the named experiment. - ``_build_job_config`` accepts ``tensorboard_logs_uri: Optional[Uri]`` and derives ``base_output_dir`` from it. - When the resource config sets ``tensorboard_experiment_name``, inject ``GIGL_TENSORBOARD_RESOURCE_NAME``, ``GIGL_TENSORBOARD_EXPERIMENT_NAME``, and ``GIGL_TENSORBOARD_RUN_NAME`` (sanitized + UTC-suffixed for per-launch uniqueness). - ``_maybe_log_tensorboard_url`` prints the cross-job TB experiment URL at submit time so the link is visible in the launcher's local stdout. - ``VertexAiJobConfig`` gains a ``base_output_dir`` field, threaded through to ``aiplatform.CustomJob``. - ``get_tensorboard_logs_gcs_path`` now returns ``<asset_dir>/logs/`` (was ``<asset_dir>/tensorboard_logs/``), aligning with Vertex AI's ``<base_output_dir>/logs/`` convention so writer events land where ``AIP_TENSORBOARD_LOG_DIR`` points. Updates the ConfigPopulator unit test that asserts on the path suffix. Reading the new fields off the resource config and the ``tensorboard_logs_uri`` off the GbmlConfig is deferred to the next PR (trainer/inferencer dispatch) — production trainers don't pass ``tensorboard_logs_uri`` yet, so this change is invisible to existing production runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
/all_test |
Contributor
GiGL Automation@ 20:17:45UTC : 🔄 @ 20:25:45UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 20:17:46UTC : 🔄 @ 20:17:59UTC : ❌ Workflow failed. |
Contributor
GiGL Automation@ 20:17:48UTC : 🔄 @ 20:21:29UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 20:17:50UTC : 🔄 @ 21:43:39UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 20:17:51UTC : 🔄 @ 21:20:06UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 20:17:53UTC : 🔄 @ 21:46:32UTC : ✅ Workflow completed successfully. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the launcher-side TensorBoard plumbing. After this PR, callers
that pass
tensorboard_logs_urigetbaseOutputDirectoryset onthe CustomJob, and resource configs that set
tensorboard_experiment_nameget three env vars injected into theworker container so the trainer's chief-rank uploader can find the
named experiment.
_build_job_configacceptstensorboard_logs_uri: Optional[Uri]and derives
base_output_dirfrom it.tensorboard_experiment_name, injectGIGL_TENSORBOARD_RESOURCE_NAME,GIGL_TENSORBOARD_EXPERIMENT_NAME,and
GIGL_TENSORBOARD_RUN_NAME(sanitized + UTC-suffixed forper-launch uniqueness).
_maybe_log_tensorboard_urlprints the cross-job TB experiment URLat submit time so the link is visible in the launcher's local stdout.
VertexAiJobConfiggains abase_output_dirfield, threadedthrough to
aiplatform.CustomJob.get_tensorboard_logs_gcs_pathnow returns<asset_dir>/logs/(was
<asset_dir>/tensorboard_logs/), aligning with Vertex AI's<base_output_dir>/logs/convention so writer events land whereAIP_TENSORBOARD_LOG_DIRpoints. Updates the ConfigPopulator unittest that asserts on the path suffix.
Reading the new fields off the resource config and the
tensorboard_logs_urioff the GbmlConfig is deferred to the next PR(trainer/inferencer dispatch) — production trainers don't pass
tensorboard_logs_uriyet, so this change is invisible to existingproduction runs.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com