Skip to content

Add gigl.utils.tensorboard_writer.TensorBoardWriter#633

Draft
kmontemayor2-sc wants to merge 2 commits into
mainfrom
kmonte/tb-writer-v2
Draft

Add gigl.utils.tensorboard_writer.TensorBoardWriter#633
kmontemayor2-sc wants to merge 2 commits into
mainfrom
kmonte/tb-writer-v2

Conversation

@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator

Introduces gigl.utils.tensorboard_writer.TensorBoardWriter, the trainer/inferencer-side abstraction that writes scalar metrics to a Vertex AI ExperimentRun synchronously via
aiplatform.log_time_series_metrics.

Key design points:

  • TensorBoardWriter.create(resource_name=..., experiment_name=..., experiment_run_name=..., enabled=is_chief_process) is the only constructor entry point. No env-var contract, no proto fields on GiglResourceConfig — configuration is plumbed through the trainer/inferencer's argparse (typically populated from GbmlConfig.trainerConfig.trainerArgs / inferencerConfig.inferencerArgs).
  • enabled=False (non-chief ranks) returns a no-op writer. Chief ranks must supply all three string args; missing any of them raises RuntimeError so misconfiguration surfaces fast rather than producing a silent no-op.
  • Logs the cross-job experiment URL on start_run success so engineers can find the comparison TB page from trainer stdout.
  • Each log() is a single synchronous WriteTensorboardRunData RPC. Failures propagate to the caller (no background uploader thread).

This PR introduces the writer with full test coverage but no callers; example trainer/inferencer entrypoints get wired up in a follow-up PR.

Scope of work done

Where is the documentation for this feature?: N/A

Did you add automated tests or write a test plan?

Updated Changelog.md? NO

Ready for code review?: NO

kmontemayor and others added 2 commits May 11, 2026 17:18
…_metrics

Introduces ``gigl.utils.tensorboard_writer.TensorBoardWriter``, the
trainer/inferencer-side abstraction that writes scalar metrics to a
Vertex AI ``ExperimentRun`` synchronously via
``aiplatform.log_time_series_metrics``.

Key design points:

- ``TensorBoardWriter.create(resource_name=..., experiment_name=...,
  experiment_run_name=..., enabled=is_chief_process)`` is the only
  constructor entry point. No env-var contract, no proto fields on
  ``GiglResourceConfig`` — configuration is plumbed through the
  trainer/inferencer's argparse (typically populated from
  ``GbmlConfig.trainerConfig.trainerArgs`` /
  ``inferencerConfig.inferencerArgs``).
- ``enabled=False`` (non-chief ranks) returns a no-op writer. Chief
  ranks must supply all three string args; missing any of them raises
  ``RuntimeError`` so misconfiguration surfaces fast rather than
  producing a silent no-op.
- Logs the cross-job experiment URL on ``start_run`` success so
  engineers can find the comparison TB page from trainer stdout.
- Each ``log()`` is a single synchronous ``WriteTensorboardRunData``
  RPC. Failures propagate to the caller (no background uploader
  thread).

This PR introduces the writer with full test coverage but no callers;
example trainer/inferencer entrypoints get wired up in a follow-up PR.

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 11, 2026

GiGL Automation

@ 21:57:16UTC : 🔄 C++ Unit Test started.

@ 21:59:18UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

GiGL Automation

@ 21:57:16UTC : 🔄 Lint Test started.

@ 22:02:56UTC : ❌ Workflow failed.
Please check the logs for more details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

GiGL Automation

@ 21:57:17UTC : 🔄 Integration Test started.

@ 23:24:08UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

GiGL Automation

@ 21:57:18UTC : 🔄 Python Unit Test started.

@ 23:01:32UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

GiGL Automation

@ 21:57:19UTC : 🔄 Scala Unit Test started.

@ 22:08:05UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

GiGL Automation

@ 21:57:22UTC : 🔄 E2E Test started.

@ 23:33:02UTC : ✅ 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