Skip to content

Migrate rpl_sdl to MADSci v0.8.0 - #8

Open
RyanTheRobothead wants to merge 4 commits into
mainfrom
migration/v0.8.0
Open

Migrate rpl_sdl to MADSci v0.8.0#8
RyanTheRobothead wants to merge 4 commits into
mainfrom
migration/v0.8.0

Conversation

@RyanTheRobothead

Copy link
Copy Markdown
Member

Summary

End-to-end migration of the SDL deployment to MADSci v0.8.0:

  • Calibration preserve (73aa3b2) — committed the in-flight hand-tuned PF400 calibration values from location.settings.yaml before deleting the location_locations: block, so they survive in git history as a reference for the post-migration retraining pass.
  • FOSS infra compose (06cbd74) — docker/infra.compose.yaml rewritten from mongo/redis/single-postgres to FerretDB + Valkey + split Postgres (rpl_ferretdb_postgres on 5432 backing FerretDB; rpl_postgres_resources on 5434 for the Resource Manager). Dashboard image pinned to :v0.8.0. New docker/migration.compose.yaml overlay added for madsci migrate foss's old-port containers, customized for RPL paths (.madsci/postgres/ rather than the upstream default .madsci/postgresql_old/data/). .env updates land locally (gitignored): MADSCI_VERSION=v0.8.0, new DOCUMENT_DB_URL with FerretDB auth, RESOURCE_DB_URL to 5434, all *_MANAGER_DEFINITION= lines deleted.
  • Locations refactor (12eb31d) — location_locations: block in location.settings.yaml deleted; lab-managed entries moved to new locations.yaml (LabLocationConfig format, v0.8.0). All 7 entries are lab-managed for now — the four ot2_*.deck_N slots SHOULD be node-intrinsic via the OT-2 node's intrinsic_locations ClassVar (deferred follow-up).

Also includes 1 pre-existing local-only commit (641a9ca, Add otel support; fix ot2_gamma calibration issue) that was 1-ahead of origin/main before the migration branch — it rides along with this PR. Happy to split if you prefer.

What was actually run (against this branch, on parker)

  • FOSS data migration via madsci migrate foss --apply --skip-docker --skip-backup --step document-db then --step postgresql (postgres dumped/restored manually via docker exec since host's pg_dump is v16 and the new postgres is v17).
  • Resource Manager schema migration via madsci.resource_manager.migration_tool (0.7.0rc1 → 0.8.0, alembic upgrade).
  • .madsci/registry.json was found truncated mid-entry (line 233, "RPL Data Manager" had no closing }). Repaired in place so manager identity resolution works.

Test plan

  • docker compose up -d brings up all 7 managers healthy on ports 8000–8006 (verified)
  • All managers report "version": "0.8.0" on /health (verified)
  • madsci validate against the rpl_sdl/ directory returns all *.settings.yaml files valid (verified: 35 valid)
  • FerretDB has 5.17M events, 112 experiments, 619 datapoints, 322 workflow definitions (verified)
  • Postgres resources has 476 → ~493 rows (grew on first v0.8 boot; worth sanity checking what got auto-seeded)
  • PF400 transfer test against retrained locations.yaml (deferred — needs hardware retraining)

🤖 Generated with Claude Code

tginsbu1 and others added 4 commits March 9, 2026 14:58
The location_locations: block in this file is being deleted in the
v0.8.0 migration; these calibration values will live in the new
locations.yaml. Committing first so the diff is in git history as a
reference point for the post-migration retraining pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- infra.compose.yaml: replace mongo/redis/single-postgres with FerretDB +
  Valkey + split Postgres (rpl_ferretdb_postgres on 5432 backing FerretDB,
  rpl_postgres_resources on 5434 for Resource Manager). SeaweedFS omitted
  (no object-storage usage). pgadmin reseated against the resource DB.
- managers.compose.yaml: rename depends_on (mongodb->ferretdb,
  redis->valkey, postgres->postgres_resources); pin dashboard image to
  :v0.8.0.
- migration.compose.yaml (new): overlay used by `madsci migrate foss`
  to bring up old-port mongo/postgres/redis pointed at the existing
  .madsci/{mongodb,postgres,redis}/ data dirs. RPL-customized: old
  postgres mounts .madsci/postgres/ with rpl:rpl creds (project default
  is .madsci/postgresql_old/data/ with madsci:madsci).

.env updated locally (gitignored): MADSCI_VERSION=v0.8.0, added
DOCUMENT_DB_URL with FerretDB auth, RESOURCE_DB_URL to port 5434 with
madsci:madsci, deleted all *_MANAGER_DEFINITION lines (dead since v0.7.0).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase 3c of the v0.8.0 migration. The location_locations: block in
location.settings.yaml is gone in v0.8.0; lab locations live in
locations.yaml (LabLocationConfig format, auto-discovered via walk-up).

All 7 entries are authored here as lab-managed for now. The four ot2_*
slots (ot2_beta.deck_2, ot2_gamma.deck_2) SHOULD be node-intrinsic via
the OT-2 node's intrinsic_locations ClassVar, but that refactor is
deferred — they'll move to the OT-2 node module in a follow-up.

Calibration values are preserved verbatim from v0.7.0. Hardware
retraining is planned post-migration; treat these as starting points.

location_transfer_capabilities: remains unchanged (alias still resolves
to transfer_capabilities in v0.8.0). Direct pydantic LabLocationConfig
validation passes; the `madsci validate` CLI doesn't yet dispatch on
locations.yaml so its terse '✗' there is a CLI gap, not a real error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants