Only log certain metrics with spacy.MLflowLogger.v2

54 views Asked by At

I am using the spacy.MLflowLogger.v2 logger in spaCy while training a textcat model. Here's how my logger config looks like:

[training.logger]
@loggers = "spacy.MLflowLogger.v2"
experiment_id = "1"
run_name = "somemetrics"
nested = False
remove_config_values = ["paths.train", "paths.dev", "corpora.train.path", "corpora.dev.path"]

The logging works well, however, it is logging metrics I do not plan to track and I would therefore only like to track a couple of metrics e.g. cats_macro_f and cats_micro_f.

I have tried using the log_custom_stats = ["cats_micro_f"] option, however, it still logs all the other metrics. In fact, when looking at the logger source code, I can see the following function: def log_step(info: Optional[Dict[str, Any]]): _log_step_mlflow(mlflow, info) _log_custom_stats(mlflow, info, match_stat)

Which will anyway log all metrics in _log_step_mlflow before using the regular expressions listed in log_custom_stats.

Could anyone please explain how I prevent spacy.MLflowLogger.v2 from logging all metrics and only log specific metrics?

0

There are 0 answers