Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor PymfeExtractor interface #83

Merged
merged 13 commits into from
Dec 12, 2023
Merged

Conversation

MorrisNein
Copy link
Collaborator

@MorrisNein MorrisNein commented Nov 24, 2023

Changes:

@pep8speaks
Copy link

pep8speaks commented Nov 24, 2023

Hello @MorrisNein! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1:1: F401 '.dataset_base.DatasetBase' imported but unused
Line 1:1: F401 '.dataset_base.DatasetData' imported but unused
Line 1:1: F401 '.dataset_base.DatasetIDType' imported but unused
Line 1:1: F401 '.dataset_base.TabularData' imported but unused
Line 1:1: F401 '.dataset_base.TimeSeriesData' imported but unused
Line 2:1: F401 '.custom_dataset.CustomDataset' imported but unused
Line 2:1: F401 '.custom_dataset.DataNotFoundError' imported but unused
Line 3:1: F401 '.openml_dataset.OpenMLDataset' imported but unused
Line 3:1: F401 '.openml_dataset.OpenMLDatasetIDType' imported but unused
Line 4:1: F401 '.time_series_dataset.TimeSeriesDataset' imported but unused

Line 1:1: F401 'meta_automl.data_preparation.file_system.file_system.PathType' imported but unused
Line 1:1: F401 'meta_automl.data_preparation.file_system.file_system.get_project_root' imported but unused
Line 1:1: F401 'meta_automl.data_preparation.file_system.file_system.get_data_dir' imported but unused
Line 2:1: F401 'meta_automl.data_preparation.file_system.cache.CacheOperator' imported but unused
Line 2:1: F401 'meta_automl.data_preparation.file_system.cache.get_cache_dir' imported but unused
Line 2:1: F401 'meta_automl.data_preparation.file_system.cache.get_dataset_cache_path' imported but unused
Line 2:1: F401 'meta_automl.data_preparation.file_system.cache.get_dataset_cache_path_by_id' imported but unused
Line 2:1: F401 'meta_automl.data_preparation.file_system.cache.update_openml_cache_dir' imported but unused

Line 4:1: F401 'pandas as pd' imported but unused

Comment last updated at 2023-12-12 18:24:44 UTC

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 46 lines in your changes are missing coverage. Please review.

Comparison is base (bffab03) 29.33% compared to head (2d61733) 28.42%.

❗ Current head 2d61733 differs from pull request most recent head e25ccdd. Consider uploading reports for the commit e25ccdd to get more accurate results

Files Patch % Lines
...ion/feature_preprocessors/feature_preprocessors.py 11.11% 24 Missing ⚠️
..._preparation/surrogate_dataset/dataset_generate.py 0.00% 7 Missing ⚠️
...ta_automl/data_preparation/dataset/dataset_base.py 76.19% 5 Missing ⚠️
...ration/meta_features_extractors/pymfe_extractor.py 88.88% 5 Missing ⚠️
...meta_algorithm/model_advisors/surrogate_advisor.py 0.00% 3 Missing ⚠️
.../meta_features_extractors/dataset_meta_features.py 91.66% 1 Missing ⚠️
...rity_assessors/model_based_similarity_assessors.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
- Coverage   29.33%   28.42%   -0.91%     
==========================================
  Files          53       54       +1     
  Lines        2359     2318      -41     
==========================================
- Hits          692      659      -33     
+ Misses       1667     1659       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

forecast_length: int = 1


class DatasetBase(ABC, CacheOperator):
DatasetDataType_co = TypeVar('DatasetDataType_co', bound=DatasetData, covariant=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему _co?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP рекомендуют суффиксы _co и _contra для covariant и contravariant типов соответственно

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@nicl-nno nicl-nno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вроде каких-то возражений нет.

@@ -7,6 +7,24 @@
from sklearn.preprocessing import StandardScaler


def explode_ungrouped_metafeatures(df: pd.DataFrame, n_features: int) -> pd.DataFrame:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавить описание, для чего этот метод.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MorrisNein MorrisNein force-pushed the refactor-pymfe-interface branch from 8f36254 to 2d61733 Compare December 12, 2023 18:24
@MorrisNein MorrisNein merged commit ce147ff into main Dec 12, 2023
1 check passed
@MorrisNein MorrisNein deleted the refactor-pymfe-interface branch December 12, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants