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
Use the class that matches the saved model type. Using the wrong class will raise an error with a clear message pointing to the mismatch.
27
+
`load()` reconstructs whatever model type was saved, regardless of which estimator class you call it on. Calling `MLPRegressor.load("classifier.deeptab")` still returns an `MLPClassifier`. Calling `load()` from the matching class keeps the intent clear, but the returned object always has the saved type.
28
28
```
29
29
30
30
### What is inside the artifact
31
31
32
32
The bundle saved to disk is a PyTorch-serialised dictionary containing:
@@ -142,7 +142,7 @@ The schema grows with the number of features, not the number of rows. It is the
142
142
143
143
## Model Inspection
144
144
145
-
All DeepTab estimators inherit `InspectionMixin`, which provides four read-only methods and one dry-run profiler. They are safe to call before or after fitting.
145
+
All DeepTab estimators inherit `InspectionMixin`, which provides four read-only methods and one dry-run profiler. `describe()`, `summary()`, and `runtime_info()`are safe to call before or after fitting; `parameter_table()` requires a built model and raises otherwise.
146
146
147
147
### `describe()`: structured dict
148
148
@@ -151,15 +151,19 @@ Returns a structured snapshot of the estimator and its fitted state:
The `Device`, `Precision`, and `Accelerator` lines appear only once a trainer is attached (after building or fitting); they are omitted when the value is unknown.
| Primary use | Production and long-running projects | Prototyping and research comparisons |
55
+
| Reproducibility | Stable across minor releases | Requires pinning an exact version |
56
+
| API stability | Compatible within a major version | May introduce breaking changes |
57
+
| Maintenance burden | Lower; safe baseline for collaborators | Higher; tracks recent, evolving research |
58
+
| Goal | Reliable deployment | Early evaluation and research feedback |
59
+
60
+
```{note}
61
+
**Version pinning.** For stable-only projects, pin a compatible range such as
62
+
`deeptab>=2.0,<3.0`. For projects that use experimental models, pin the exact
63
+
version (`deeptab==2.0.0`), since their APIs may change between releases.
72
64
```
73
65
74
-
For experimental-model projects, pin the exact version:
75
-
76
-
```text
77
-
deeptab==2.0.0
78
-
```
79
-
80
-
## Documentation Policy
81
-
82
-
Stable model docs should document both the paper idea and the actual DeepTab implementation. Experimental docs should be even more explicit about implementation differences, config limitations, and expected API volatility.
Copy file name to clipboardExpand all lines: docs/core_concepts/observability.md
+40-22Lines changed: 40 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,20 @@ DeepTab can record what happens during training without you writing a single cal
6
6
Observability is entirely opt-in. Estimators created without an `ObservabilityConfig` train exactly as before and emit nothing, so notebooks stay quiet by default.
7
7
```
8
8
9
+
The default `pip install deeptab` does not include the observability backends. Install the extra you need:
|`root_dir`|`"deeptab_runs"`| Base directory for all observability outputs. |
86
+
|`experiment_name`|`"default"`| Logical label used to group related runs. |
87
+
|`structured_logging`|`False`| Enable structured runtime logging via `structlog`. |
88
+
|`log_to_console`|`True`| Stream compact human-readable output to stdout. |
89
+
|`log_to_file`|`False`| Write a per-run `lifecycle.jsonl` inside the run directory. |
90
+
|`verbosity`|`1`| Which lifecycle events are emitted when `structured_logging=True` (see below). |
91
+
|`experiment_trackers`|`[]`| Lightning loggers to activate: `"tensorboard"`, `"mlflow"`, or both. |
92
+
|`tensorboard_save_dir`|`""`| Resolved to `<root_dir>/tensorboard` when empty. |
93
+
|`tensorboard_name`|`"deeptab"`|Reserved label field; the TensorBoard sub-directory currently uses `experiment_name`.|
94
+
|`mlflow_experiment_name`|`"deeptab"`| Name of the MLflow experiment. |
95
+
|`mlflow_tracking_uri`|`""`| Resolved to a local SQLite store under `<root_dir>/mlflow` when empty. |
96
+
|`mlflow_artifact_location`|`""`| Resolved to `<root_dir>/mlflow/artifacts` when empty. |
97
+
|`mlflow_run_name`|`None`| Human-readable label for the MLflow run. |
98
+
|`mlflow_log_model`|`True`| Upload model checkpoints as MLflow artifacts. |
99
+
|`logger`|`None`| A user-provided Lightning logger appended alongside any built-in trackers. |
86
100
87
101
```{note}
88
102
`experiment_trackers` is a list, not a single string. Pass `["tensorboard"]`, `["mlflow"]`, or `["mlflow", "tensorboard"]` to activate one or both.
@@ -135,13 +149,17 @@ from deeptab.core.observability import ObservabilityConfig
135
149
136
150
obs = ObservabilityConfig(
137
151
logger=WandbLogger(project="churn"), # your existing tracker
138
-
experiment_trackers=["tensorboard"], #optional: keep DeepTab trackers too
152
+
experiment_trackers=["tensorboard"], #needed for the custom logger to attach
139
153
)
140
154
141
155
model = MambularClassifier(observability_config=obs)
142
156
model.fit(X_train, y_train, max_epochs=50)
143
157
```
144
158
159
+
```{warning}
160
+
A custom `logger` is only attached when `experiment_trackers` has at least one entry. With an empty `experiment_trackers`, DeepTab suppresses all Lightning loggers (so no stray `lightning_logs/` directory is created) and the `logger` is dropped. Keep at least one tracker active, such as `["tensorboard"]` above, for your logger to be picked up.
161
+
```
162
+
145
163
```{note}
146
164
The `logger` field accepts a single Lightning logger instance. To attach several at once, wire them through the trackers you control or compose them in your own framework, then hand DeepTab the one entry point.
0 commit comments