Skip to content

Commit

Permalink
add logging in PymfeExtractor
Browse files Browse the repository at this point in the history
  • Loading branch information
MorrisNein committed Jul 19, 2023
1 parent 9d1c20e commit 2296871
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import List, Union, Dict, Any

import pandas as pd
from golem.core.log import default_log
from pymfe.mfe import MFE

from meta_automl.data_preparation.dataset import DatasetCache
Expand All @@ -18,6 +19,7 @@ def __init__(self, extractor_params: Dict[str, Any] = None, datasets_loader: Dat
self.extractor_params = extractor_params if extractor_params is not None else self.DEFAULT_PARAMS
self._datasets_loader = datasets_loader or OpenMLDatasetsLoader()
self._extractor = MFE(**self.extractor_params)
self._logger = default_log(self)

@property
def datasets_loader(self) -> DatasetsLoader:
Expand All @@ -34,6 +36,7 @@ def extract(self, datasets: List[Union[DatasetCache, str]], fill_input_nans: boo
if isinstance(dataset, str):
dataset = DatasetCache(dataset)

self._logger.info(f'Extracting meta features of the dataset {dataset.name}...')
if (use_cached and
(mfs := self._get_meta_features_cache(dataset.name, meta_feature_names))):
meta_features[dataset.name] = mfs
Expand Down

0 comments on commit 2296871

Please sign in to comment.