This file contains concise, actionable guidance to help an AI coding agent be immediately productive in this repository.
- AstroML is a Python research framework for dynamic graph ML on Stellar. Key workflows are ingestion, graph building, feature extraction, and training (see README).
- Useful entry points: the command-line modules invoked in README such as
astroml.ingestion.backfill,astroml.graph.build_snapshot, andastroml.training.train_gcn.
- List top-level files:
ls -laandtree -L 2. - Find build/test files:
git grep -n "requirements.txt\|pyproject.toml\|setup.py\|Makefile\|Dockerfile" || true. - Find Python entrypoints and modules:
git grep -n "^if __name__ == '__main__'\|def main\|module" || true. - Search for keywords used in README:
git grep -n "backfill\|build_snapshot\|train_gcn\|config/database.yaml".
- CLI modules: Many workflows are exposed as
python -m astroml.<submodule>. Prefer running those modules when reproducing workflows (examples are in README). - Config: Database and environment configuration live under
config/(README referencesconfig/database.yaml). Update/read these before running ingestion or tests. - Data flow: Ledger → Ingestion → Normalization → Graph Builder → Features → Models. When adding a change, map it to one of these stages.
- Create environment and install:
python -m venv venv && source venv/bin/activate && pip install -r requirements.txt - Backfill ledger ingestion:
python -m astroml.ingestion.backfill --start-ledger 1000000 --end-ledger 1100000 - Build graph snapshot:
python -m astroml.graph.build_snapshot --window 30d - Train baseline GCN:
python -m astroml.training.train_gcn
- When reviewing changes that affect ingestion, ensure database config and idempotency (re-run backfills safely).
- For graph building changes, check windowing logic and reproducibility (random seeds, snapshot metadata).
- For model/training changes, verify experiment reproducibility (config-driven, checkpoint paths) and alignment with README examples.
- Expect PostgreSQL for ingestion; tests or local runs may require a local Postgres or a test fixture.
- PyTorch / PyG are used for models — GPU availability changes performance but not required for basic runs.
- If modules, tests, or config files are missing, run the discovery checklist above and ask the maintainer for missing artifacts (tests,
requirements.txt, CI workflows).
- To run the ingestion example locally: ensure
config/database.yamlpoints to a local Postgres, then run the backfill command from the README. - To run a targeted search for tests:
git grep -n "pytest\|unittest" || true.