Skip to content

Add macOS Apple Silicon support and installation guide#4

Open
powerofjinbo wants to merge 7 commits intostanford-ai4physics:dev_ranodefrom
powerofjinbo:dev_ranode
Open

Add macOS Apple Silicon support and installation guide#4
powerofjinbo wants to merge 7 commits intostanford-ai4physics:dev_ranodefrom
powerofjinbo:dev_ranode

Conversation

@powerofjinbo
Copy link

No description provided.

Victor Zhang and others added 7 commits October 31, 2025 13:38
- Add environment_mac.yml for M1/M2/M3 Mac compatibility
- Add activate_gbi.sh convenience script for environment setup
- Add comprehensive macOS installation instructions to README
- Add dataset download instructions with curl commands
- Add GPU (MPS) usage examples for Apple Silicon
- Include CPU-only execution instructions
- Update main README with installation notes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…issues

Major changes:
- Converted pipeline from particle physics to gravitational wave anomaly detection
- Added GW data generation (gen_data.py, gw_processing.py) with synthetic signals
- Updated config.py to use time windows (ms) instead of energy (TeV)
- Modified preprocessing.py to generate GW signals/backgrounds dynamically
- Fixed MPS (Apple Silicon) float64 compatibility in model_S.py and train_model_S.py
- Fixed numerical stability in fitting.py (added epsilon to prevent log(0) errors)
- Reduced training epochs for faster testing (bkgtemplate.py, rnodetemplate.py)
- Simplified pipeline defaults in law.py (num templates 1 instead of 20)

This enables running RANODE anomaly detection on gravitational wave time-series
data on Mac M-series GPUs. Successfully tested on M2 Pro with MPS acceleration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Major changes:
- Increased training parameters for production runs (20 models, 200 epochs, 20 scan points)
- Updated gen_data.py with proper plot labels and fixed H-L computation
- Added scripts for Fig 4 (linearity check) and Fig 5 (distribution comparison)
- Added automated pipeline scripts for multiple s_ratio runs

Training configuration updates:
- bkgtemplate.py: epochs 20→200 for better convergence
- rnodetemplate.py: epochs 50→200 for signal model training
- law.py: num_bkg_templates 1→20, train_num_sig_templates 1→20, scan_number 5→20

New analysis scripts:
- scripts/generate_fig5_distribution_comparison.py: Sample from learned signal density and compare with true signal/background distributions
- scripts/run_multiple_s_ratios.sh: Run pipeline with multiple signal fractions for linearity testing
- scripts/wait_and_generate_fig5.sh: Automated script to wait for training completion and generate plots

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Contains:
- Trained models (model_S.pt, model_B_CR.pt) from multiple versions
- Preprocessing parameters and processed datasets
- Training/validation loss histories
- Fitted results and scan plots
- Fig 5 distribution comparison plots

Versions included:
- version_gw_test_0, version_gw_test_1 (initial test runs)
- version_gw_balanced (balanced configuration)
- version_test_full (full production run: 400 models, 200 epochs)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <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.

1 participant