Skip to content

Experiment reporter

fyt.core.experiment_reporter

Experiment reporting — logs metrics, artifacts, and plots to an experiment tracker.

Extracted from Trainer to follow the Single Responsibility Principle. All logging is delegated to a BaseExperimentLogger implementation.

ExperimentReporter

Handles all experiment logging, artifact creation, and plot generation.

Delegates actual logging operations to a BaseExperimentLogger implementation.

Parameters:

Name Type Description Default
experiment_logger 'BaseExperimentLogger'

Logger backend (e.g. MlflowLogger).

required
feature_importance_config FeatureImportanceConfig

Configuration for feature importance computation.

required

experiment_logger property

The underlying experiment logger.

report(metrics, data_split, model, model_type, model_params, best_params=None, optuna_results=None, optimization_metric=None, optimization_direction=None)

Log a complete experiment run: params, metrics, model, and artifacts.

Parameters:

Name Type Description Default
metrics MetricResults

Computed evaluation metrics.

required
data_split DataSplit

Data split used for evaluation.

required
model Any

Trained model instance.

required
model_type str

Model type identifier.

required
model_params dict[str, Any]

Base model parameters.

required
best_params dict[str, Any] | None

Best parameters from hyperparameter optimization.

None
optuna_results DataFrame | None

DataFrame of Optuna trial results.

None
optimization_metric str | None

Normalized name of the tuned metric (the column holding trial scores in optuna_results).

None
optimization_direction str | None

"maximize" or "minimize".

None