Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions autointent/context/optimization_info/_data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class Trial(BaseModel):
"""Value of the evaluation metric for this trial."""
module_dump_dir: str | None
"""Directory where the module is dumped."""
metrics: dict[str, float]


class Trials(BaseModel):
Expand Down
2 changes: 2 additions & 0 deletions autointent/context/optimization_info/_optimization_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def log_module_optimization(
module_params: dict[str, Any],
metric_value: float,
metric_name: str,
metrics: dict[str, float],
artifact: Artifact,
module_dump_dir: str | None,
module: "Module | None" = None,
Expand All @@ -97,6 +98,7 @@ def log_module_optimization(
metric_value=metric_value,
module_params=module_params,
module_dump_dir=module_dump_dir,
metrics=metrics,
)
self.trials.add_trial(node_type, trial)
self._logger.debug("module %s fitted and saved to optimization info", module_name, extra=trial.model_dump())
Expand Down
1 change: 1 addition & 0 deletions autointent/nodes/_optimization/_node_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def objective(
config,
target_metric,
self.target_metric,
all_metrics,
module.get_assets(), # retriever name / scores / predictions
module_dump_dir,
module=module if not context.is_ram_to_clear() else None,
Expand Down