plnguyen2908 commited on
Commit
b9c8853
·
verified ·
1 Parent(s): 11121d0

Add reproduce.py quick-start instructions

Browse files
Files changed (1) hide show
  1. README.md +20 -4
README.md CHANGED
@@ -12,10 +12,26 @@ tags:
12
  Flow-matching generators and muon-count heads for simulating cosmic-ray muon showers
13
  (CORSIKA `I3MCTree_preMuonProp`, primaries with zenith in [55, 65] degrees).
14
 
15
- Load everything through `hf_pipeline.py` in the
16
- [MuonShower repo](https://github.com/AniSundar18/MuonShower) rather than loading
17
- `.safetensors`/`.pth` files directly -- it reconstructs each model class from the
18
- `config.json` next to its weights and loads the state dict for you.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ```python
21
  from hf_pipeline import load_generator, load_counter
 
12
  Flow-matching generators and muon-count heads for simulating cosmic-ray muon showers
13
  (CORSIKA `I3MCTree_preMuonProp`, primaries with zenith in [55, 65] degrees).
14
 
15
+ Code lives in the [MuonShower repo](https://github.com/AniSundar18/MuonShower). Clone it,
16
+ install `environment.yml`, then either run the end-to-end script or load models directly --
17
+ don't load `.safetensors`/`.pth` files by hand, `hf_pipeline.py` reconstructs the right
18
+ model class from the `config.json` next to each weight file and loads the state dict for you.
19
+
20
+ ## Quick start: end-to-end reproduction
21
+
22
+ ```bash
23
+ CUDA_VISIBLE_DEVICES=0 ./venv/bin/python reproduce.py \
24
+ --generator block_diffusion_bs200 --counter block_count_200 \
25
+ --data_dir /path/to/your/corsika/test/split
26
+ ```
27
+
28
+ Downloads every checkpoint in this repo (~3.1 GB, cached after the first run), predicts
29
+ each event's muon count, samples the shower, decodes to physical units, and writes
30
+ `events.csv` / `particles.csv` to `--out_dir` (default `./reproduce_out`). `--data_dir` must
31
+ point at your own CORSIKA HDF5 split -- that dataset is not hosted here, only the weights
32
+ are. For a quick check instead of the full split: add `--max_files 1 --n_events 5`.
33
+
34
+ ## Loading a model directly
35
 
36
  ```python
37
  from hf_pipeline import load_generator, load_counter