# Architecture

## Internal Dependencies

- `app.py` -> `topogpt3/__init__.py`
- `eval/diag_static.py` -> `topogpt3/__init__.py`
- `eval/diag_static.py` -> `topogpt3/model.py`
- `eval/diag_static.py` -> `topogpt3/train.py`
- `eval/governor_smoke.py` -> `eval/governor.py`
- `eval/governor_smoke.py` -> `topogpt3/__init__.py`
- `eval/harness.py` -> `eval/samplers.py`
- `eval/harness.py` -> `eval/sandbox.py`
- `eval/harness.py` -> `topogpt3/__init__.py`
- `eval/hodge_cm_ablation.py` -> `topogpt3/hodge_cm.py`
- `eval/hodge_cm_ablation.py` -> `topogpt3/model.py`
- `eval/integration_smoke.py` -> `eval/harness.py`
- `eval/noise_sweep.py` -> `eval/harness.py`
- `eval/noise_sweep.py` -> `topogpt3/__init__.py`
- `eval/noise_sweep.py` -> `topogpt3/model.py`
- `eval/repair.py` -> `topogpt3/__init__.py`
- `eval/samplers.py` -> `topogpt3/__init__.py`
- `eval/sandbox_smoke.py` -> `eval/sandbox.py`
- `eval/smoke.py` -> `topogpt3/__init__.py`
- `eval/temp_sweep.py` -> `eval/harness.py`
- `eval/temp_sweep.py` -> `eval/noise_sweep.py`
- `infer_exploitgym.py` -> `topogpt3/model.py`
- `infer_exploitgym.py` -> `topogpt3/train.py`
- `tests/test_jlens.py` -> `topogpt3/jlens.py`
- `tests/test_jlens.py` -> `topogpt3/lens_model.py`
- `tests/test_lens_model.py` -> `topogpt3/jlens.py`
- `tests/test_lens_model.py` -> `topogpt3/lens_model.py`
- `tests/test_lens_model.py` -> `topogpt3/model.py`
- `topogpt3/__init__.py` -> `topogpt3/inference.py`
- `topogpt3/__init__.py` -> `topogpt3/inference_hrm.py`
- `topogpt3/__init__.py` -> `topogpt3/jlens.py`
- `topogpt3/__init__.py` -> `topogpt3/lens_model.py`
- `topogpt3/__init__.py` -> `topogpt3/merged_config.py`
- `topogpt3/__init__.py` -> `topogpt3/model.py`
- `topogpt3/__init__.py` -> `topogpt3/train.py`
- `topogpt3/__main__.py` -> `topogpt3/api_server.py`
- `topogpt3/__main__.py` -> `topogpt3/inference.py`
- `topogpt3/__main__.py` -> `topogpt3/inference_hrm.py`
- `topogpt3/__main__.py` -> `topogpt3/jlens.py`
- `topogpt3/__main__.py` -> `topogpt3/lens_model.py`
- `topogpt3/__main__.py` -> `topogpt3/train.py`
- `topogpt3/api_server.py` -> `topogpt3/continuation.py`
- `topogpt3/api_server.py` -> `topogpt3/model.py`
- `topogpt3/exploitgym_config.py` -> `topogpt3/exploitgym_loader.py`
- `topogpt3/exploitgym_config.py` -> `topogpt3/model.py`
- `topogpt3/exploitgym_loader.py` -> `topogpt3/model.py`
- `topogpt3/inference_hrm.py` -> `topogpt3/continuation.py`
- `topogpt3/jlens.py` -> `topogpt3/lens_model.py`
- `topogpt3/lens_model.py` -> `topogpt3/model.py`
- `topogpt3/merged_config.py` -> `topogpt3/exploitgym_loader.py`
- `topogpt3/merged_config.py` -> `topogpt3/model.py`
- `topogpt3/model.py` -> `synthetic_dataset.py`
- `topogpt3/model.py` -> `topogpt3/continuation.py`
- `topogpt3/train.py` -> `topogpt3/ewc.py`
- `topogpt3/train.py` -> `topogpt3/exploitgym_config.py`
- `topogpt3/train.py` -> `topogpt3/exploitgym_loader.py`
- `topogpt3/train.py` -> `topogpt3/merged_config.py`
- `topogpt3/train.py` -> `topogpt3/model.py`
- `transfer_weights.py` -> `topogpt3/model.py`

## External Imports

- `app.py` -> __future__, argparse, sys, torch, typing
- `eval/analyze.py` -> __future__, argparse, collections, json, math, pathlib, re, typing
- `eval/analyze_results.py` -> __future__, argparse, collections, json, pathlib
- `eval/diag_static.py` -> __future__, argparse, json, math, pathlib, safetensors.torch, sys, time, torch, typing
- `eval/governor.py` -> __future__, dataclasses, enum, threading, time, torch, torch.nn.functional, typing
- `eval/governor_smoke.py` -> pathlib, safetensors, safetensors.torch, sys, threading, time, torch
- `eval/harness.py` -> __future__, argparse, contextlib, dataclasses, datasets, io, json, os, pathlib, re, safetensors, safetensors.torch, signal, subprocess, sys, time, torch, traceback, typing
- `eval/hodge_cm_ablation.py` -> argparse, json, math, numpy, pathlib, safetensors.torch, sys, torch
- `eval/integration_smoke.py` -> pathlib, sys
- `eval/noise_analysis.py` -> __future__, argparse, ast, collections, json, pathlib, re, sys, typing
- `eval/noise_sweep.py` -> __future__, argparse, json, math, pathlib, safetensors, safetensors.torch, sys, time, torch, typing
- `eval/repair.py` -> __future__, argparse, collections, contextlib, datasets, io, json, pathlib, re, safetensors, safetensors.torch, time, torch, traceback, typing
- `eval/report.py` -> __future__, argparse, collections, json, math, pathlib, re, shutil, statistics
- `eval/samplers.py` -> __future__, os, typing
- `eval/sandbox.py` -> __future__, ast, dataclasses, json, os, pathlib, subprocess, sys, tempfile, textwrap, typing
- `eval/sandbox_smoke.py` -> pathlib, sys
- `eval/smoke.py` -> time, torch
- `eval/temp_sweep.py` -> __future__, argparse, json, math, pathlib, sys, time, torch, typing
- `infer_exploitgym.py` -> argparse, json, logging, os, pathlib, safetensors.torch, sys, torch, torch.nn.functional
- `synthetic_dataset.py` -> argparse, concurrent.futures, dataclasses, datetime, hashlib, json, logging, numpy, os, pathlib, queue, requests, sys, tempfile, threading, tiktoken, time, torch, typing
- `tests/test_jlens.py` -> __future__, pytest, torch
- `tests/test_lens_model.py` -> __future__, pytest, torch, types
- `topogpt3/__init__.py` -> __future__
- `topogpt3/__main__.py` -> __future__, sys
- `topogpt3/api_server.py` -> __future__, argparse, collections, contextlib, dataclasses, fastapi, fastapi.middleware.cors, fastapi.middleware.gzip, fastapi.responses, hashlib, hmac, json, logging, os, pathlib, pydantic, re, safetensors, safetensors.torch, secrets, sys, time, torch, typing, uvicorn
- `topogpt3/continuation.py` -> __future__, re, typing
- `topogpt3/ewc.py` -> __future__, logging, torch, torch.nn, torch.nn.functional, typing
- `topogpt3/exploitgym_config.py` -> __future__, dataclasses, typing
- `topogpt3/exploitgym_loader.py` -> __future__, dataclasses, json, logging, numpy, os, pathlib, subprocess, time, typing
- `topogpt3/hodge_cm.py` -> math, torch, torch.nn, torch.nn.functional
- `topogpt3/inference.py` -> __future__, argparse, dataclasses, logging, pathlib, safetensors, safetensors.torch, sys, time, torch, typing
- `topogpt3/inference_hrm.py` -> __future__, argparse, dataclasses, logging, pathlib, safetensors, safetensors.torch, sys, time, torch, torch.nn.functional, typing
- `topogpt3/jlens.py` -> __future__, argparse, collections.abc, dataclasses, huggingface_hub, logging, math, os, time, torch, typing
- `topogpt3/lens_model.py` -> __future__, collections.abc, dataclasses, json, pathlib, safetensors.torch, time, torch, types, typing
- `topogpt3/merged_config.py` -> __future__, dataclasses, typing
- `topogpt3/model.py` -> argparse, collections, dataclasses, datetime, hashlib, json, logging, math, numpy, os, pathlib, safetensors.torch, shutil, sys, tiktoken, time, torch, torch.nn, torch.nn.functional, torch.utils.checkpoint, typing, warnings
- `topogpt3/train.py` -> __future__, argparse, collections, dataclasses, datasets, datetime, json, logging, math, numpy, os, pathlib, safetensors.torch, sys, time, torch, torch.nn, torch.nn.functional, typing
- `topogpt3/vanilla_control.py` -> argparse, dataclasses, math, numpy, pathlib, torch, torch.nn, torch.nn.functional
- `transfer_weights.py` -> argparse, numpy, pathlib, safetensors.torch, sys, torch
