Download scripts/fake_data.py from OneScience-Group/Ai2_Climate_Emulator: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/OneScience-Group/Ai2_Climate_Emulator/resolve/main/scripts/fake_data.py
- Command line
-
hf download hf://OneScience-Group/Ai2_Climate_Emulator/scripts/fake_data.py
-
curl -L -o fake_data.py https://huggingface.co/OneScience-Group/Ai2_Climate_Emulator/resolve/main/scripts/fake_data.py
1.12 kB
| """Generate an NPZ fixture with the ACE 40/44 channel contract.""" | |
| from __future__ import annotations | |
| import argparse | |
| import sys | |
| from pathlib import Path | |
| if __package__ in (None, ""): | |
| sys.path.insert(0, str(Path(__file__).resolve().parents[2])) | |
| from ACE.model.data import save_fake_pairs | |
| from ACE.model.paths import GENERATED_DATA_PATH | |
| def main() -> int: | |
| parser = argparse.ArgumentParser(description=__doc__) | |
| parser.add_argument( | |
| "--output-path", type=Path, default=GENERATED_DATA_PATH, | |
| help="Output NPZ path (default: ACE/data/data/ace_pairs.npz)", | |
| ) | |
| parser.add_argument("--num-samples", type=int, default=8) | |
| parser.add_argument("--height", type=int, default=180) | |
| parser.add_argument("--width", type=int, default=360) | |
| parser.add_argument("--seed", type=int, default=0) | |
| args = parser.parse_args() | |
| output = save_fake_pairs( | |
| args.output_path, | |
| num_samples=args.num_samples, | |
| height=args.height, | |
| width=args.width, | |
| seed=args.seed, | |
| ) | |
| print(output) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |