Skip to content

launcher: wire TensorBoard fields into VertexAiJobConfig#621

Draft
kmontemayor2-sc wants to merge 2 commits intomainfrom
kmonte/tb-launcher
Draft

launcher: wire TensorBoard fields into VertexAiJobConfig#621
kmontemayor2-sc wants to merge 2 commits intomainfrom
kmonte/tb-launcher

Conversation

@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator

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

kmontemayor and others added 2 commits May 6, 2026 18:48
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>
@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator Author

/all_test

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

GiGL Automation

@ 20:17:45UTC : 🔄 Lint Test started.

@ 20:25:45UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

GiGL Automation

@ 20:17:46UTC : 🔄 Scala Unit Test started.

@ 20:17:59UTC : ❌ Workflow failed.
Please check the logs for more details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

GiGL Automation

@ 20:17:48UTC : 🔄 C++ Unit Test started.

@ 20:21:29UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

GiGL Automation

@ 20:17:50UTC : 🔄 Integration Test started.

@ 21:43:39UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

GiGL Automation

@ 20:17:51UTC : 🔄 Python Unit Test started.

@ 21:20:06UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

GiGL Automation

@ 20:17:53UTC : 🔄 E2E Test started.

@ 21:46:32UTC : ✅ Workflow completed successfully.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant