Skip to content

Fix Piscis legacy model loading with converted checkpoint - #166

Merged
arjunrajlab merged 1 commit into
masterfrom
codex/piscis-converted-model
Aug 7, 2026
Merged

Fix Piscis legacy model loading with converted checkpoint#166
arjunrajlab merged 1 commit into
masterfrom
codex/piscis-converted-model

Conversation

@arjunrajlab

Copy link
Copy Markdown
Collaborator

Summary

  • pin the Piscis image build to the converted rajlab/ps_20240419_112256 PyTorch checkpoint
  • require the .pt filename instead of downloading an extensionless legacy JAX checkpoint
  • make download_models.py testable while preserving the built-in Piscis model preload
  • add focused regression coverage and document the runtime-ready checkpoint requirement

The converted checkpoint is published at https://huggingface.co/rajlab/ps_20240419_112256 and is the sole model in the Raj Lab Piscis collection.

Root cause

The legacy ps_20240419_112256 repository exposed an extensionless JAX checkpoint. Piscis therefore attempted an on-the-fly JAX-to-PyTorch conversion at worker runtime, which imports Flax. After the worker image was slimmed and Flax was removed, selecting that model failed with ImportError: Flax is required for converting JAX models.

Publishing and downloading a pre-converted .pt checkpoint keeps the inference image torch-only and avoids runtime conversion.

Validation

  • .cache/testvenv/bin/python -m pytest workers/annotations/piscis/tests -q — 2 passed
  • Python compile check for the downloader and regression test
  • git diff --check
  • live download through the updated downloader
  • downloaded SHA-256: f281a239d1d5075ee2342c4772ba7167c441f878e5345c632436caf3b43d320a
  • checkpoint structure: 583 tensors plus metadata

@arjunrajlab
arjunrajlab marked this pull request as ready for review August 7, 2026 11:07
@arjunrajlab
arjunrajlab merged commit 757d35a into master Aug 7, 2026
1 check passed
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