Skip to content

Commit ecdba4a

Browse files
Merge pull request #14 from hotosm/infra/dev-k8s
Infra/dev k8s
2 parents 58e2560 + 3a59a7b commit ecdba4a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3377
-200
lines changed

.github/workflows/validate-stac.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ on:
44
branches:
55
- master
66
paths:
7-
- "models/**/stac-item.json"
7+
- "models/**"
88
- "fair/schemas/**"
99
- "fair/stac/validators.py"
10+
- "fair/zenml/model_validator.py"
1011
pull_request:
1112
branches:
1213
- master
1314
paths:
14-
- "models/**/stac-item.json"
15+
- "models/**"
1516
- "fair/schemas/**"
1617
- "fair/stac/validators.py"
18+
- "fair/zenml/model_validator.py"
1719
defaults:
1820
run:
1921
shell: bash
@@ -22,7 +24,7 @@ concurrency:
2224
cancel-in-progress: true
2325
jobs:
2426
validate:
25-
name: validate stac items
27+
name: validate stac items & models
2628
runs-on: ubuntu-latest
2729
steps:
2830
- name: Clone repo
@@ -36,3 +38,5 @@ jobs:
3638
run: uv sync --group dev
3739
- name: Validate STAC items
3840
run: make validate-stac
41+
- name: Validate model pipelines
42+
run: make validate-models

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,7 @@ data/sample/predict/predictions
223223
stac_catalog
224224

225225
# hatch-vcs generated version file
226-
fair/_version.py
226+
fair/_version.py
227+
228+
# dev infra
229+
infra/dev/.port-forward.pids

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ pre-commit:
5252
validate-stac:
5353
uv run python scripts/validate_stac_items.py
5454

55+
validate-models:
56+
uv run python scripts/validate_model.py
57+

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ A user might run 10 experiments, promote 3 of them over time. Only those 3 appea
304304
| **ZenML** | Pipeline orchestration, version tracking | SQLite (`~/.config/zenml/`) | ZenML Server (PostgreSQL) |
305305
| **Orchestrator** | Runs pipeline steps | `local` | Kubernetes |
306306
| **Artifact Store** | Weights, datasets, artifacts | local filesystem | S3 |
307-
| **Experiment Tracker** | Metrics logging | W&B | W&B |
307+
| **Experiment Tracker** | Metrics logging | Mlflow | Mlflow |
308308
| **Container Registry** | Model runtime images | local Docker | ghcr.io |
309309
| **fAIr Backend** | User-facing orchestration layer | -- | -- |
310310

@@ -360,3 +360,9 @@ ZenML stack components NOT used:
360360
5. **YAML-based training & inference**: Every pipeline run is driven by a generated YAML config (STAC defaults + user overrides). Logged as a ZenML artifact. Re-run any experiment by re-running its YAML.
361361

362362
6. **MLM Processing Expression for dispatch**: `pre_processing_function` and `post_processing_function` use `format: "python"` with entrypoint strings (e.g., `ramp.pipeline:preprocess`). Each model defines its own pre/post processing; the system does not assume a fixed pipeline shape. System considers each model having its own runtime , preprocessing , postprocessing and training pipeline.
363+
364+
7. W&B self-hosted requires MySQL + Redis + a commercial license for team use. Mlflow is fully open source.
365+
366+
8. **Pipeline contract**: Every model under `models/` must export `training_pipeline` and `inference_pipeline` as `@pipeline`-decorated functions in its `pipeline.py`. CI validates this via AST parsing (`scripts/validate_model.py`) — no runtime dependencies required. This ensures the orchestration layer can discover and dispatch any contributed model uniformly.
367+
368+
9. **S3 data resolution via UPath/fsspec**: Production training data lives in S3 (MinIO in dev, AWS in prod). `fair/utils/data.py` provides helpers (`list_files`, `resolve_path`, `resolve_directory`) built on `universal-pathlib` (UPath) over fsspec/s3fs — no boto3 or GDAL env vars. fsspec reads `AWS_ENDPOINT_URL` natively for MinIO. Caching is available via fsspec URL-chaining (`simplecache::s3://`, `filecache::s3://`, `blockcache::s3://`) — model developers opt in as needed. Local paths pass through unchanged. Data is never baked into Docker images.

0 commit comments

Comments
 (0)