Skip to content

feat(sdk): W&B offline export migration — ExportDirSource + from_wandb_export.py (GLA-834 / GLA-610)#113

Merged
jqueguiner merged 2 commits into
mainfrom
backend/gla-614-export-walker
May 8, 2026
Merged

feat(sdk): W&B offline export migration — ExportDirSource + from_wandb_export.py (GLA-834 / GLA-610)#113
jqueguiner merged 2 commits into
mainfrom
backend/gla-614-export-walker

Conversation

@jqueguiner

Copy link
Copy Markdown
Owner

Summary

  • Adds ExportDirSource to sdk/openrunner/migrate.py — reads W&B export tarballs/dirs without the wandb package.
  • Adds migrate_from_wandb_export() top-level function + CLI verb openrunner migrate-from-wandb-export.
  • Adds examples/migrate-from-wandb/from_wandb_export.py standalone script for zero-install usage.
  • Fixes tarfile.extractall compat on Python 3.10/3.11 (filter= kwarg is 3.12+).
  • Reports/Sweeps/Vega specs are skipped with logged notices (out of scope per GLA-834 constraints).
  • LiveAPI path untouched — LiveAPISource parity preserved.

Test plan

  • sdk/tests/test_migrate.py — 20 tests, all green (including 2-run tarball round-trip + idempotent reimport)
  • python3 examples/migrate-from-wandb/from_wandb_export.py --help runs clean
  • MergeEngineer (f5ec7a9c) to handle non-pusher gate review per GLA-680

Closes #GLA-834. Re-delivers GLA-610 acceptance criteria.

🤖 Generated with Claude Code

jqueguiner and others added 2 commits May 8, 2026 19:45
…b_export.py (GLA-825)

- `sdk/openrunner/migrate.py`: refactor into WandbRunSource protocol with
  LiveAPISource (preserves existing behaviour) and ExportDirSource (new).
  ExportDirSource walks .tar.gz / .tgz / directory, parses config.yaml/json,
  metrics.jsonl/.parquet, summary.json, artifacts/, media/.
  Adds `migrate_from_wandb_export()` public entry-point.
  Shared `_import_records` pipeline handles idempotent re-import (update
  instead of duplicate on same display_name).
- `sdk/openrunner/cli.py`: adds `--from-wandb-export <path>` flag to
  `openrunner migrate` command.
- `examples/migrate-from-wandb/from_wandb_export.py`: standalone CLI wrapper
  for the offline import path — thin argparse shim over migrate_from_wandb_export.
- `examples/migrate-from-wandb/README.md`: usage guide, prerequisites, export
  layout, and what-gets-imported table.
- `sdk/tests/test_migrate.py`: unit tests for ExportDirSource and
  migrate_from_wandb_export (no network, no wandb pkg required).
- `sdk/tests/fixtures/wandb-export-mini/`: two-run fixture directory used by
  the new tests.
- `docs/migrate-from-wandb.md`: clarify Reports/Sweeps limits and update
  feature-comparison table.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
tarfile.extractall filter='data' requires Python 3.12+; detect
extraction_filter attribute and skip the kwarg on older runtimes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@jqueguiner
jqueguiner merged commit 9b152b7 into main May 8, 2026
8 checks passed
@jqueguiner
jqueguiner deleted the backend/gla-614-export-walker branch May 8, 2026 20:33
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