You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module centralizes all configuration parameters for the AlphaTriangle project *except* for the core environment settings. It uses separate **Pydantic models** for different aspects of the application (model, training, persistence, MCTS, **statistics**) to promote modularity, clarity, and automatic validation.
5
+
This module centralizes configuration parameters for the AlphaTriangle agent itself, *excluding* statistics logging and data persistence which are now handled by the `trieye` library. It uses separate **Pydantic models** for different aspects of the agent (model, training loop, MCTS) to promote modularity, clarity, and automatic validation.
7
6
8
-
**Core environment configuration (`EnvConfig`) is now defined and imported directly from the `trianglengin` library.**
7
+
**Core environment configuration (`EnvConfig`) is imported directly from the `trianglengin` library.**
8
+
**Statistics and Persistence configuration (`StatsConfig`, `PersistenceConfig`) are defined and managed within the `trieye` library via `TrieyeConfig`.**
9
9
10
10
-**Modularity:** Separating configurations makes it easier to manage parameters for different components.
11
11
-**Type Safety & Validation:** Using Pydantic models (`BaseModel`) provides strong type hinting, automatic parsing, and validation of configuration values based on defined types and constraints (e.g., `Field(gt=0)`).
12
-
-**Validation Script:** The [`validation.py`](validation.py) script instantiates all configuration models (including importing and validating `trianglengin.EnvConfig`), triggering Pydantic's validation, and prints a summary.
13
-
-**Dynamic Defaults:** Some configurations, like `RUN_NAME` in `TrainConfig`, use `default_factory` for dynamic defaults (e.g., timestamp).
14
-
-**Computed Fields:** Properties like `MLFLOW_TRACKING_URI` in `PersistenceConfig` are defined using `@computed_field` for clarity.
15
-
-**Tuned Defaults:** The default values in `TrainConfig` and `ModelConfig` are tuned for substantial learning runs. `AlphaTriangleMCTSConfig` defaults to 128 simulations. `StatsConfig` defines a default set of metrics to track.
16
-
-**Data Paths:**`PersistenceConfig` defines the structure within the `.alphatriangle_data` directory where all local artifacts (runs, checkpoints, logs, TensorBoard data) and MLflow data (`mlruns`) are stored.
12
+
-**Validation Script:** The [`validation.py`](validation.py) script instantiates the AlphaTriangle-specific configuration models (including importing and validating `trianglengin.EnvConfig`), triggering Pydantic's validation, and prints a summary. **Note:** It does *not* validate `TrieyeConfig` directly; `trieye` handles its own validation upon actor initialization.
13
+
-**Dynamic Defaults:** Some configurations, like `RUN_NAME` in `TrainConfig`, use `default_factory` for dynamic defaults (e.g., timestamp). This default is often overridden by the `TrieyeConfig` setting.
14
+
-**Tuned Defaults:** The default values in `TrainConfig` and `ModelConfig` are tuned for substantial learning runs. `AlphaTriangleMCTSConfig` defaults to 128 simulations.
17
15
18
16
## Exposed Interfaces
19
17
20
18
-**Pydantic Models:**
21
19
-`EnvConfig` (Imported from `trianglengin`): Environment parameters (grid size, shapes, rewards).
-[`StatsConfig`](stats_config.py): Statistics collection and logging parameters (metrics, aggregation, frequency).
27
23
-**Constants:**
28
-
-[`APP_NAME`](app_config.py): The name of the application.
24
+
-[`APP_NAME`](app_config.py): The name of the application (used by `trieye` for namespacing).
29
25
-**Functions:**
30
-
-`print_config_info_and_validate(mcts_config_instance: AlphaTriangleMCTSConfig | None)`: Validates and prints a summary of all configurations.
26
+
-`print_config_info_and_validate(mcts_config_instance: AlphaTriangleMCTSConfig | None)`: Validates and prints a summary of AlphaTriangle-specific configurations.
31
27
32
28
## Dependencies
33
29
@@ -40,4 +36,4 @@ This module primarily defines configurations and relies heavily on **Pydantic**.
40
36
41
37
---
42
38
43
-
**Note:** Please keep this README updated when adding, removing, or significantly modifying configuration parameters or the structure of the Pydantic models. Accurate documentation is crucial for maintainability.
39
+
**Note:** Please keep this README updated when adding, removing, or significantly modifying configuration parameters or the structure of the Pydantic models within this module.
0 commit comments