model-arena-sdk 0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- model_arena_sdk-0.1/.github/workflows/ci.yml +30 -0
- model_arena_sdk-0.1/.github/workflows/release.yml +44 -0
- model_arena_sdk-0.1/.gitignore +24 -0
- model_arena_sdk-0.1/LICENSE +22 -0
- model_arena_sdk-0.1/PKG-INFO +107 -0
- model_arena_sdk-0.1/README.md +48 -0
- model_arena_sdk-0.1/VALIDATION.json +19 -0
- model_arena_sdk-0.1/docs/IMPLEMENTATION_STATUS.md +29 -0
- model_arena_sdk-0.1/docs/INSTALL_ADA.md +42 -0
- model_arena_sdk-0.1/docs/RELEASE.md +34 -0
- model_arena_sdk-0.1/docs/adr/0001-api-y-ciclo-de-vida.md +392 -0
- model_arena_sdk-0.1/docs/adr/0002-instalacion-completa.md +35 -0
- model_arena_sdk-0.1/notebooks/00_ADA_Fast_System_Observatory.ipynb +68 -0
- model_arena_sdk-0.1/notebooks/10_ADA_Slow_System_End_to_End.ipynb +283 -0
- model_arena_sdk-0.1/notebooks/20_Model_Arena_API_Demo.ipynb +110 -0
- model_arena_sdk-0.1/pyproject.toml +49 -0
- model_arena_sdk-0.1/scripts/publish_github.py +23 -0
- model_arena_sdk-0.1/src/model_arena/__init__.py +7 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/BUILD_MONITOR.json +1 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/abrir_monitor.py +95 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/app.py +12 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/arena_estudio.py +219 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/curvas_contrato.py +5 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/curvas_metricas.py +101 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/curvas_modelo.py +2 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/e2e_worker.py +50 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/entrenar_curvas.py +235 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/accountability_observatory/__init__.py +3 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/accountability_observatory/application.py +63 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/observatorio_cuentas/__init__.py +3 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/observatorio_cuentas/aws.py +620 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/observatorio_cuentas/calendar.py +25 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/observatorio_cuentas/sampling.py +70 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/observatorio_cuentas/source_audit.py +45 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/accountability_observatory/src/observatorio_cuentas/universe.py +277 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/__init__.py +19 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/api.py +45 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/backbones.py +59 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/calendar.py +41 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/contracts.py +164 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/curve_models.py +146 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/data.py +197 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/engine.py +476 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/full_tft.py +72 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/models.py +214 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/percentage_metrics.py +13 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/libraries/agentic_forecasting/src/agentic_forecasting/surfaces.py +78 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/monitor_learning.py +56 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/entrenamiento/visor/workspace.py +109 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/flujo_completo.py +157 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/__init__.py +1 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/account_previews.py +35 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/alert_taxonomy.py +56 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/alerts_view.py +241 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/analysis.py +47 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/aws.py +146 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/classic_charts.py +19 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/common.py +50 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/historical_sigma.py +85 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/mac_rules_reference.py +261 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/monitor_c2.py +89 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/observed_quantiles.py +14 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/prepare.py +292 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/repository.py +103 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/schemas.py +41 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/theme.py +1 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/training_charts.py +24 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/observatorio_athena/ui.py +242 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/publicar.py +17 -0
- model_arena_sdk-0.1/src/model_arena/_mac_runtime/scripts/runtime_bootstrap.py +168 -0
- model_arena_sdk-0.1/src/model_arena/_version.py +2 -0
- model_arena_sdk-0.1/src/model_arena/arena.py +405 -0
- model_arena_sdk-0.1/src/model_arena/aws.py +111 -0
- model_arena_sdk-0.1/src/model_arena/cli.py +23 -0
- model_arena_sdk-0.1/src/model_arena/contracts.py +151 -0
- model_arena_sdk-0.1/src/model_arena/dashboard.py +155 -0
- model_arena_sdk-0.1/src/model_arena/data.py +100 -0
- model_arena_sdk-0.1/src/model_arena/models/base.py +31 -0
- model_arena_sdk-0.1/src/model_arena/models/naive.py +33 -0
- model_arena_sdk-0.1/src/model_arena/models/tft.py +237 -0
- model_arena_sdk-0.1/src/model_arena/observatory.py +88 -0
- model_arena_sdk-0.1/src/model_arena/profiles/__init__.py +2 -0
- model_arena_sdk-0.1/src/model_arena/profiles/mac.py +133 -0
- model_arena_sdk-0.1/src/model_arena/profiles/mac_worker.py +103 -0
- model_arena_sdk-0.1/src/model_arena/results.py +59 -0
- model_arena_sdk-0.1/src/model_arena/storage.py +95 -0
- model_arena_sdk-0.1/src/model_arena/winner_selection.py +33 -0
- model_arena_sdk-0.1/tests/conftest.py +29 -0
- model_arena_sdk-0.1/tests/test_aws_and_dashboard.py +78 -0
- model_arena_sdk-0.1/tests/test_contracts.py +39 -0
- model_arena_sdk-0.1/tests/test_lifecycle.py +125 -0
- model_arena_sdk-0.1/tests/test_mac_profile.py +76 -0
- model_arena_sdk-0.1/tests/test_training.py +73 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Tests and distributions
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python: ['3.11', '3.12']
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v6
|
|
13
|
+
with:
|
|
14
|
+
persist-credentials: false
|
|
15
|
+
- uses: actions/setup-python@v6
|
|
16
|
+
with:
|
|
17
|
+
python-version: ${{ matrix.python }}
|
|
18
|
+
- run: python -m pip install --upgrade pip
|
|
19
|
+
- name: Install tested CPU PyTorch for CI
|
|
20
|
+
run: python -m pip install 'torch==2.6.0' --index-url https://download.pytorch.org/whl/cpu
|
|
21
|
+
- run: python -m pip install -e '.[dev]'
|
|
22
|
+
- run: python -m ruff check src/model_arena --exclude _mac_runtime
|
|
23
|
+
- run: python -m pytest --junitxml=test-results.xml
|
|
24
|
+
- run: python -m build
|
|
25
|
+
- run: python -m twine check dist/*
|
|
26
|
+
- uses: actions/upload-artifact@v5
|
|
27
|
+
with:
|
|
28
|
+
name: distributions-${{ matrix.python }}
|
|
29
|
+
path: dist/*
|
|
30
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v6
|
|
12
|
+
with:
|
|
13
|
+
persist-credentials: false
|
|
14
|
+
- uses: actions/setup-python@v6
|
|
15
|
+
with:
|
|
16
|
+
python-version: '3.12'
|
|
17
|
+
- name: Install tested CPU PyTorch for CI
|
|
18
|
+
run: python -m pip install 'torch==2.6.0' --index-url https://download.pytorch.org/whl/cpu
|
|
19
|
+
- run: python -m pip install -e '.[dev]'
|
|
20
|
+
- run: python -m ruff check src/model_arena --exclude _mac_runtime
|
|
21
|
+
- run: python -m pytest
|
|
22
|
+
- name: Verify release tag and package version
|
|
23
|
+
env:
|
|
24
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
25
|
+
run: python -c 'import os; from model_arena import __version__; assert os.environ["RELEASE_TAG"] == "v" + __version__'
|
|
26
|
+
- run: python -m build
|
|
27
|
+
- run: python -m twine check dist/*
|
|
28
|
+
- uses: actions/upload-artifact@v5
|
|
29
|
+
with:
|
|
30
|
+
name: distributions
|
|
31
|
+
path: dist/*
|
|
32
|
+
publish:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
needs: build
|
|
35
|
+
environment: pypi
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/download-artifact@v6
|
|
40
|
+
with:
|
|
41
|
+
name: distributions
|
|
42
|
+
path: dist/
|
|
43
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
44
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.pytest_cache/
|
|
5
|
+
.ruff_cache/
|
|
6
|
+
.coverage
|
|
7
|
+
htmlcov/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
.env
|
|
12
|
+
.env.*
|
|
13
|
+
!.env.example
|
|
14
|
+
runs/
|
|
15
|
+
publications/
|
|
16
|
+
private/
|
|
17
|
+
*.pt
|
|
18
|
+
*.parquet
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
test-results.xml
|
|
22
|
+
coverage.xml
|
|
23
|
+
|
|
24
|
+
.observatory/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jacobo León
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: model-arena-sdk
|
|
3
|
+
Version: 0.1
|
|
4
|
+
Summary: Explicit forecasting competition, fitted models and observable learning histories
|
|
5
|
+
Project-URL: Repository, https://github.com/JacoboGGLeon/model_arena
|
|
6
|
+
Author: Jacobo León
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Requires-Dist: boto3>=1.35
|
|
14
|
+
Requires-Dist: ipython>=8
|
|
15
|
+
Requires-Dist: numpy>=1.26
|
|
16
|
+
Requires-Dist: optuna<5,>=4
|
|
17
|
+
Requires-Dist: pandas>=2.1
|
|
18
|
+
Requires-Dist: plotly>=5.24
|
|
19
|
+
Requires-Dist: polars>=1
|
|
20
|
+
Requires-Dist: pyarrow>=17
|
|
21
|
+
Requires-Dist: pydantic<3,>=2.7
|
|
22
|
+
Requires-Dist: pyyaml>=6
|
|
23
|
+
Requires-Dist: scipy>=1.12
|
|
24
|
+
Requires-Dist: streamlit>=1.40
|
|
25
|
+
Requires-Dist: torch>=2.4
|
|
26
|
+
Provides-Extra: aws
|
|
27
|
+
Requires-Dist: boto3>=1.35; extra == 'aws'
|
|
28
|
+
Requires-Dist: polars>=1; extra == 'aws'
|
|
29
|
+
Requires-Dist: pyarrow>=17; extra == 'aws'
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
32
|
+
Requires-Dist: hatchling>=1.26; extra == 'dev'
|
|
33
|
+
Requires-Dist: nbformat>=5.10; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-cov>=5; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
36
|
+
Requires-Dist: ruff>=0.8; extra == 'dev'
|
|
37
|
+
Requires-Dist: twine>=6; extra == 'dev'
|
|
38
|
+
Provides-Extra: mac
|
|
39
|
+
Requires-Dist: boto3>=1.35; extra == 'mac'
|
|
40
|
+
Requires-Dist: ipython>=8; extra == 'mac'
|
|
41
|
+
Requires-Dist: optuna<5,>=4; extra == 'mac'
|
|
42
|
+
Requires-Dist: plotly>=5.24; extra == 'mac'
|
|
43
|
+
Requires-Dist: polars>=1; extra == 'mac'
|
|
44
|
+
Requires-Dist: pyarrow>=17; extra == 'mac'
|
|
45
|
+
Requires-Dist: scipy>=1.12; extra == 'mac'
|
|
46
|
+
Requires-Dist: streamlit>=1.40; extra == 'mac'
|
|
47
|
+
Requires-Dist: torch>=2.4; extra == 'mac'
|
|
48
|
+
Provides-Extra: monitor
|
|
49
|
+
Requires-Dist: boto3>=1.35; extra == 'monitor'
|
|
50
|
+
Requires-Dist: ipython>=8; extra == 'monitor'
|
|
51
|
+
Requires-Dist: plotly>=5.24; extra == 'monitor'
|
|
52
|
+
Requires-Dist: polars>=1; extra == 'monitor'
|
|
53
|
+
Requires-Dist: pyarrow>=17; extra == 'monitor'
|
|
54
|
+
Requires-Dist: streamlit>=1.40; extra == 'monitor'
|
|
55
|
+
Provides-Extra: train
|
|
56
|
+
Requires-Dist: optuna<5,>=4; extra == 'train'
|
|
57
|
+
Requires-Dist: torch>=2.4; extra == 'train'
|
|
58
|
+
Description-Content-Type: text/markdown
|
|
59
|
+
|
|
60
|
+
# Model Arena
|
|
61
|
+
|
|
62
|
+
Explicit forecasting competition and observable learning histories.
|
|
63
|
+
|
|
64
|
+
Version **0.1**. Install the complete SDK with `python -m pip install "model-arena-sdk==0.1"`.
|
|
65
|
+
Source: https://github.com/JacoboGGLeon/model_arena · PyPI: https://pypi.org/project/model-arena-sdk/.
|
|
66
|
+
|
|
67
|
+
The import remains `model_arena`. Default dependencies cover training, AWS publication and Observatory; no extras are required for the ADA workflow. This release includes a generic forecasting core and a MAC migration adapter. Local synthetic tests validate the engine layouts; live ADA validation remains pending.
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from model_arena import ModelArena
|
|
71
|
+
|
|
72
|
+
arena = ModelArena.from_config('arena.yaml')
|
|
73
|
+
study = arena.tune(df=history, static_df=metadata)
|
|
74
|
+
selection = arena.select(study)
|
|
75
|
+
arena.fit(df=history, static_df=metadata, selection=selection, epochs=75)
|
|
76
|
+
forecasts = arena.predict(futr_df=known_future)
|
|
77
|
+
release = arena.postprocess(forecasts)
|
|
78
|
+
publication = arena.publish(release, destination='publications')
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`fit` does not launch HPO or publish. `predict` never trains. Temporal selection folds are not an independent test. A global configuration can serve multiple entities; zero-shot entities are excluded from parameter fitting. Every target retains its own output head and learning history.
|
|
82
|
+
|
|
83
|
+
## ADA accounting workflow
|
|
84
|
+
|
|
85
|
+
`notebooks/10_ADA_Slow_System_End_to_End.ipynb` uses `model_arena.profiles.mac.MacProject` to preserve the established accounting engines and Athena dashboard during migration. `00_ADA_Fast_System_Observatory.ipynb` opens that monitor without training. Deployment configurations and the calendar are supplied separately, outside the public repository. See the implementation status for the explicit migration boundary.
|
|
86
|
+
|
|
87
|
+
## Installation
|
|
88
|
+
|
|
89
|
+
The default installation includes the complete forecasting and monitoring runtime. In ADA, retain the corporate pip/Artifactory configuration. Do not print `pip config list` or embed tokens in notebooks.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
python -m pip install "model-arena-sdk==0.1"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
In ADA, keep the existing Artifactory indexes and approved CUDA-compatible PyTorch installation. No package index or CUDA build is forced by the SDK. Default installation includes PyTorch and the dashboard dependencies; imports remain lazy and reading results does not initialize CUDA. Existing extras remain available for compatibility.
|
|
96
|
+
|
|
97
|
+
## Development
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
python -m pip install -e '.[dev]'
|
|
101
|
+
python -m pytest
|
|
102
|
+
python -m ruff check src/model_arena tests scripts --exclude _mac_runtime
|
|
103
|
+
python -m build
|
|
104
|
+
python -m twine check dist/*
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
See `docs/INSTALL_ADA.md`, `docs/RELEASE.md` and `docs/IMPLEMENTATION_STATUS.md`. Notebooks contain no credentials, internal endpoints or datasets. Corporate configuration is provided as a local file excluded from git.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Model Arena
|
|
2
|
+
|
|
3
|
+
Explicit forecasting competition and observable learning histories.
|
|
4
|
+
|
|
5
|
+
Version **0.1**. Install the complete SDK with `python -m pip install "model-arena-sdk==0.1"`.
|
|
6
|
+
Source: https://github.com/JacoboGGLeon/model_arena · PyPI: https://pypi.org/project/model-arena-sdk/.
|
|
7
|
+
|
|
8
|
+
The import remains `model_arena`. Default dependencies cover training, AWS publication and Observatory; no extras are required for the ADA workflow. This release includes a generic forecasting core and a MAC migration adapter. Local synthetic tests validate the engine layouts; live ADA validation remains pending.
|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
from model_arena import ModelArena
|
|
12
|
+
|
|
13
|
+
arena = ModelArena.from_config('arena.yaml')
|
|
14
|
+
study = arena.tune(df=history, static_df=metadata)
|
|
15
|
+
selection = arena.select(study)
|
|
16
|
+
arena.fit(df=history, static_df=metadata, selection=selection, epochs=75)
|
|
17
|
+
forecasts = arena.predict(futr_df=known_future)
|
|
18
|
+
release = arena.postprocess(forecasts)
|
|
19
|
+
publication = arena.publish(release, destination='publications')
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`fit` does not launch HPO or publish. `predict` never trains. Temporal selection folds are not an independent test. A global configuration can serve multiple entities; zero-shot entities are excluded from parameter fitting. Every target retains its own output head and learning history.
|
|
23
|
+
|
|
24
|
+
## ADA accounting workflow
|
|
25
|
+
|
|
26
|
+
`notebooks/10_ADA_Slow_System_End_to_End.ipynb` uses `model_arena.profiles.mac.MacProject` to preserve the established accounting engines and Athena dashboard during migration. `00_ADA_Fast_System_Observatory.ipynb` opens that monitor without training. Deployment configurations and the calendar are supplied separately, outside the public repository. See the implementation status for the explicit migration boundary.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
The default installation includes the complete forecasting and monitoring runtime. In ADA, retain the corporate pip/Artifactory configuration. Do not print `pip config list` or embed tokens in notebooks.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
python -m pip install "model-arena-sdk==0.1"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
In ADA, keep the existing Artifactory indexes and approved CUDA-compatible PyTorch installation. No package index or CUDA build is forced by the SDK. Default installation includes PyTorch and the dashboard dependencies; imports remain lazy and reading results does not initialize CUDA. Existing extras remain available for compatibility.
|
|
37
|
+
|
|
38
|
+
## Development
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python -m pip install -e '.[dev]'
|
|
42
|
+
python -m pytest
|
|
43
|
+
python -m ruff check src/model_arena tests scripts --exclude _mac_runtime
|
|
44
|
+
python -m build
|
|
45
|
+
python -m twine check dist/*
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
See `docs/INSTALL_ADA.md`, `docs/RELEASE.md` and `docs/IMPLEMENTATION_STATUS.md`. Notebooks contain no credentials, internal endpoints or datasets. Corporate configuration is provided as a local file excluded from git.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1",
|
|
3
|
+
"python": "3.12.14",
|
|
4
|
+
"tests": 37,
|
|
5
|
+
"failures": 0,
|
|
6
|
+
"errors": 0,
|
|
7
|
+
"skipped": 0,
|
|
8
|
+
"checks": {
|
|
9
|
+
"ruff": "passed",
|
|
10
|
+
"build_wheel_and_sdist": "passed",
|
|
11
|
+
"twine_metadata": "passed",
|
|
12
|
+
"wheel_content_no_deployment_inputs": "passed",
|
|
13
|
+
"notebook_syntax": "passed",
|
|
14
|
+
"generic_demo_execution": "passed",
|
|
15
|
+
"local_mac_cpu_pipeline": "passed",
|
|
16
|
+
"ada_live": "not_run"
|
|
17
|
+
},
|
|
18
|
+
"release_status_at_validation": "0.1 pending; 0.1.0rc1 previously published"
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Estado de implementación y límites de evidencia
|
|
2
|
+
|
|
3
|
+
Esta entrega es un versión 0.1 y separa dos rutas ejecutables:
|
|
4
|
+
|
|
5
|
+
1. **ModelArena**: núcleo genérico nuevo con contratos Pydantic, registro de modelos, datos tabulares, HPO explícito, CV, selección por entidad, fit/predict, curvas, guardado y publicación local/S3. Incluye TFT compacto de dimensiones de objetivos/features configurables y baseline de cuantiles históricos.
|
|
6
|
+
2. **MacProject**: adaptador de migración con etapas explícitas que conserva el motor contable y el dashboard Athena de 0.13.1. Es la ruta del notebook ADA para preservar el caso de uso existente. Su implementación todavía contiene código de compatibilidad aislado; no se afirma que el perfil ya esté reescrito íntegramente sobre el core nuevo.
|
|
7
|
+
|
|
8
|
+
El adaptador separa tune, select, fit, predict, postprocess y publish; el ganador de cada serie se conserva como configuración única en F1/F2/F3/FUTURO. Las curvas históricas usan los pesos de cada corte, no pesos finales retrospectivos. F1–F3 siguen siendo evidencia utilizada en selección.
|
|
9
|
+
|
|
10
|
+
El ajuste final es de 75 épocas. Se conserva TPESampler/NopPruner y el espacio configurado del perfil. El monitor por época cubre todas las entrenables, con filas por cuenta/objetivo. Los budgets siguen siendo la segmentación por entropía existente. Las atípicas conservan zero-shot para el ajuste y se evalúan como entrenables en el contrato de alertamiento.
|
|
11
|
+
|
|
12
|
+
`obs_training_entities` añade la evidencia desglosada de aprendizaje sin cambiar los esquemas antiguos de entrenamiento. Total, budget y cuenta se consultan agregando sus filas en Athena. La evaluación completa por época aumenta tiempo, disco y volumen publicado; no limita las cuentas entrenadas.
|
|
13
|
+
|
|
14
|
+
Los modelos de compatibilidad están en un recurso interno y se extraen a un proyecto local autocontenido. La copia de código se verifica; la configuración y el calendario se identifican por hash. Los notebooks permanecen editables y no son parte de esa validación de integridad.
|
|
15
|
+
|
|
16
|
+
## Pendiente de acreditar en ADA
|
|
17
|
+
|
|
18
|
+
- Ejecución real con el rol y las tablas Athena de la instalación destino.
|
|
19
|
+
- Publicación real de los nuevos datasets y verificación de permisos.
|
|
20
|
+
- Rendimiento y memoria con el universo completo y la evaluación por época de todas las cuentas.
|
|
21
|
+
- Disponibilidad del wheel en Artifactory y compatibilidad con el runtime CUDA aprobado.
|
|
22
|
+
|
|
23
|
+
## Límites de la API inicial
|
|
24
|
+
|
|
25
|
+
- El core genérico selecciona finalistas por input global; la selección por budget/divisa del proyecto está conservada en MacProject.
|
|
26
|
+
- Los adaptadores nuevos de arquitecturas o fuentes requieren registro e implementación; no basta cambiar un nombre en YAML.
|
|
27
|
+
- Los checkpoints del core son artefactos de inferencia. No se anuncia reanudación exacta de optimizador a mitad de época.
|
|
28
|
+
- `MacProject.resume()` reutiliza etapas y checkpoints completos compatibles; un ajuste interrumpido sin checkpoint completo se reinicia desde cero. La publicación continúa siendo explícita.
|
|
29
|
+
- La publicación genérica S3 es por manifiestos. El perfil MAC mantiene los layouts y las tablas Athena específicas; no se afirma equivalencia entre ambos formatos.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Instalación en ADA
|
|
2
|
+
|
|
3
|
+
Python soportado inicialmente: 3.11 y 3.12. La plataforma observada utiliza Python 3.12.9. Selecciona un kernel con el PyTorch/CUDA aprobado por ADA antes del entrenamiento.
|
|
4
|
+
|
|
5
|
+
## Paquete y configuración
|
|
6
|
+
|
|
7
|
+
- Distribución: `model-arena-sdk`.
|
|
8
|
+
- Import: `model_arena`.
|
|
9
|
+
- Repositorio: `JacoboGGLeon/model_arena`.
|
|
10
|
+
- Configuración corporativa: archivos locales de despliegue; no forman parte del paquete público.
|
|
11
|
+
|
|
12
|
+
No modifiques los índices corporativos de pip. La instalación utiliza su configuración existente. No ejecutes `pip config list` en un notebook compartido ni incluyas URLs autenticadas en sus celdas.
|
|
13
|
+
|
|
14
|
+
Cuando Artifactory tenga la versión publicada:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
python -m pip install 'model-arena-sdk==0.1'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Si aún no la replica, descarga el wheel y usa:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
python -m pip install './dist/model_arena_sdk-0.1-py3-none-any.whl'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Las dependencias siguen resolviéndose por los índices corporativos. El wheel no incluye PyTorch ni dependencias de terceros. No se fuerza un índice PyTorch público, no se desinstala el entorno y no se reutiliza el venv de otro bundle.
|
|
27
|
+
|
|
28
|
+
Para abrir únicamente el monitor:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
python -m pip install './dist/model_arena_sdk-0.1-py3-none-any.whl'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notebooks
|
|
35
|
+
|
|
36
|
+
Ejecuta `10_ADA_Slow_System_End_to_End.ipynb` desde la carpeta ADA entregada. Los archivos `private/training.json`, `private/publication.json` y `private/calendar_authoritative.csv` son los únicos insumos locales del despliegue. Las credenciales AWS proceden del rol del entorno.
|
|
37
|
+
|
|
38
|
+
`00_ADA_Fast_System_Observatory.ipynb` abre Athena sin necesitar el directorio del run. Solo requiere la configuración de publicación y permisos de lectura.
|
|
39
|
+
|
|
40
|
+
La réplica del paquete desde PyPI al repositorio corporativo depende de la configuración y políticas de Artifactory. Publicar en PyPI no demuestra por sí solo que ADA ya pueda resolver esa versión; la alternativa del wheel permite comprobar el mismo artefacto sin cambiar los índices.
|
|
41
|
+
|
|
42
|
+
Desde 0.1 la instalación predeterminada incluye entrenamiento, AWS y monitor. Los extras se conservan solo por compatibilidad; no reducen las dependencias de la instalación base. Consultar resultados mantiene imports diferidos y no inicializa CUDA.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Publicación de la primera versión
|
|
2
|
+
|
|
3
|
+
## Estado
|
|
4
|
+
|
|
5
|
+
Repositorio creado: https://github.com/JacoboGGLeon/model_arena. La fuente se publica mediante la conexión de GitHub. Trusted Publishing está configurado y la versión candidata anterior se publicó correctamente. La versión 0.1 se distribuye sin extras obligatorios; cada publicación se acredita con su recibo de GitHub Actions y PyPI.
|
|
6
|
+
|
|
7
|
+
## GitHub
|
|
8
|
+
|
|
9
|
+
Cuenta confirmada: JacoboGGLeon. Repositorio previsto: model_arena. Licencia confirmada: MIT. Sube únicamente esta carpeta de código. Los archivos de despliegue del paquete privado de ADA son externos a ella.
|
|
10
|
+
|
|
11
|
+
Una vez conectado GitHub, crear el repositorio, subir el commit validado y comprobar el resultado de CI. No incluir runs, checkpoints, datos, configuraciones corporativas o credenciales.
|
|
12
|
+
|
|
13
|
+
## PyPI
|
|
14
|
+
|
|
15
|
+
`model-arena` ya tiene distribuciones de otro proyecto. `model-arena-sdk` ya está registrado y conserva el import `model_arena`.
|
|
16
|
+
|
|
17
|
+
Trusted Publisher configurado para este proyecto:
|
|
18
|
+
|
|
19
|
+
- Project: model-arena-sdk
|
|
20
|
+
- Owner: JacoboGGLeon
|
|
21
|
+
- Repository: model_arena
|
|
22
|
+
- Workflow: release.yml
|
|
23
|
+
- Environment: pypi
|
|
24
|
+
|
|
25
|
+
La configuración de confianza debe corresponder exactamente al repositorio y workflow publicados. No se necesita pegar tokens en notebooks ni commits.
|
|
26
|
+
|
|
27
|
+
Crear el entorno GitHub `pypi` y publicar la release con tag `v0.1`. El workflow primero ejecuta tests, comprueba tag/versión, construye wheel/sdist y valida sus metadatos. Un job independiente publica esos artefactos con OIDC.
|
|
28
|
+
|
|
29
|
+
Tras el éxito del workflow, comprobar la versión, el nombre y los hashes de los artefactos disponibles en PyPI. Después comprobar su resolución desde ADA/Artifactory.
|
|
30
|
+
|
|
31
|
+
Referencias oficiales:
|
|
32
|
+
|
|
33
|
+
- https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
|
|
34
|
+
- https://docs.pypi.org/trusted-publishers/
|