Skip to content

Commit db7356d

Browse files
authored
Remove artifacts from final metrics (#216)
* Update wandb.py * Update wandb.py * Update wandb.py * Update _optimization_info.py * remove print
1 parent 8f016e8 commit db7356d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

autointent/_callbacks/wandb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,14 @@ def log_final_metrics(self, metrics: dict[str, Any]) -> None:
112112
}
113113

114114
try:
115-
self.wandb.init(config=metrics, **wandb_run_init_args)
115+
config = metrics["configs"]
116+
self.wandb.init(config=config, **wandb_run_init_args)
117+
self.wandb.log(metrics)
116118
except Exception as e:
117119
if "run config cannot exceed" not in str(e):
118120
# https://github.com/deeppavlov/AutoIntent/issues/202
119121
raise
122+
self._close_current_run()
120123
logger.warning("W&B run config is too large, skipping logging modules configs")
121124
logger.warning("'final_metrics' will be logged to W&B with pipeline_metrics only")
122125
logger.warning("If you want to access modules configs in future, address to the individual modules runs")

autointent/context/optimization_info/_optimization_info.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ def dump_evaluation_results(self) -> dict[str, Any]:
225225
"pipeline_metrics": self.pipeline_metrics,
226226
"metrics": node_wise_metrics,
227227
"configs": self.trials.model_dump(),
228-
"artifacts": self.artifacts.model_dump(),
229228
}
230229

231230
def dump(self, path: Path) -> None:

0 commit comments

Comments
 (0)