Skip to content

Add SLURM training scripts and fix Comet.ml logging - #15

Open
mzmyslowpro wants to merge 5 commits into
gpfrom
kronecker-covariance
Open

Add SLURM training scripts and fix Comet.ml logging#15
mzmyslowpro wants to merge 5 commits into
gpfrom
kronecker-covariance

Conversation

@mzmyslowpro

@mzmyslowpro mzmyslowpro commented Mar 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add train.sh SLURM batch script for submitting standard and GP training jobs on szary
  • Add setup_venv.sh for uv-based venv setup on remote server
  • Fix Comet.ml empty tags error (skip add_tags when tags=[])
  • Add val_standard_nll and val_gp_nll to log_validation_metrics (required by GP training script)
  • Fix placeholder values in both YAML configs (comet_project, comet_workspace)
  • Fix GP config: gp_lengthscale 0.1→5.0, lambda_gp 0.0→0.1, batch_size 1→8, use_kronecker_gp=true, epochs 10→100
  • Fix scheduler resumption from checkpoint: save total_steps in checkpoint and reconstruct scheduler with original boundaries on resume, preventing LR miscalculation when continuing training across multiple jobs

Test plan

  • Standard training run completed on szary (10 epochs, ~37 min)
  • Kronecker GP training run completed on szary (10 epochs, ~12h)
  • 100-epoch GP run submitted (job 5253), will require ~5-6 chained 24h jobs
  • Verify scheduler LR is correct after checkpoint resume
  • Review GP vs standard loss curves in Comet.ml

🤖 Generated with Claude Code

@gitguardian

gitguardian Bot commented Mar 17, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@mzmyslowpro
mzmyslowpro changed the base branch from master to gp March 17, 2026 10:25
@mzmyslowpro mzmyslowpro changed the title Add Kronecker GP covariance and SLURM training infrastructure Add SLURM training scripts and fix Comet.ml logging Mar 17, 2026
- Add train.sh SLURM batch script for standard and GP training
- Add setup_venv.sh for uv-based venv setup on remote server
- Fix Comet.ml empty tags error (skip add_tags when tags=[])
- Add val_standard_nll and val_gp_nll to log_validation_metrics
- Fix train_masked_config.yaml and train_masked_gp_config.yaml Comet placeholders
- Set gp_lengthscale 0.1→5.0, lambda_gp 0.0→0.1, batch_size 1→8, use_kronecker_gp=true in GP config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mzmyslowpro
mzmyslowpro force-pushed the kronecker-covariance branch from fc806fb to 9b343c8 Compare March 17, 2026 10:27
mzmyslowpro and others added 3 commits March 17, 2026 13:24
…aining

Save total_steps in checkpoint so scheduler can be reconstructed with
identical warmup/annealing boundaries when resuming. Previously resuming
with different epochs config would miscalculate LR schedule.

Also bump epochs 10→100 in GP config.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When training for another N epochs from a fully-converged checkpoint,
the saved scheduler state has LR near zero. reset_lr_schedule=true
ignores checkpoint optimizer/scheduler state and starts a fresh cosine
cycle from the trained weights.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two bugs when using reset_lr_schedule=True:
1. epochs:100 + start_epoch=100 → range(100,100) empty, no training
   Fix: epochs:200 so range(100,200) = 100 new epochs
2. total_steps calculated from config.epochs (200) but only 100 epochs
   will run → cosine schedule only half-completed at end of run
   Fix: use remaining_epochs = config.epochs - start_epoch for total_steps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread train_masked_gp_config.yaml Outdated
Comment on lines +69 to +71
tags: ['SZARY', 'GP', 'kronecker', 'lambda 0.1']
comet_project: multiplex-image-model
comet_workspace: micha-zmys-owski

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags: ['SZARY', 'GP', 'kronecker', 'lambda 0.1']
comet_project: multiplex-image-model
comet_workspace: micha-zmys-owski
tags: ...
comet_project: ...
comet_workspace: ...

Comment thread train_masked_config.yaml
Comment on lines +51 to +52
comet_project: multiplex-image-model
comet_workspace: micha-zmys-owski # optional, can also be set via COMET_WORKSPACE env var

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
comet_project: multiplex-image-model
comet_workspace: micha-zmys-owski # optional, can also be set via COMET_WORKSPACE env var
comet_project: ...
comet_workspace: ... # optional, can also be set via COMET_WORKSPACE env var

Comment thread train.sh
if [ -z "$1" ]; then
echo "Usage: sbatch train.sh <config_file> [gp]"
echo " config_file: path to YAML config"
echo " gp: pass 'gp' as second arg to use GP training script"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That file is not needed in the repo

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