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

hotfix: go for FeaturesType instead of InputData in a pipeline tuning #1311

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

Lopa10ko
Copy link
Collaborator

@Lopa10ko Lopa10ko commented Jul 22, 2024

This is a 🙋 feature or enhancement.

Summary

  • change the signature of the tune function so that the input_data param can be of type FeaturesType. This allows passing one of the following data formats: str, PathLike, numpy array, pandas DataFrame, FEDOT-native InputData, FEDOT-native MultiModalData, dictionary, or tuple
  • perform several unit and integration tests to ensure the expected results
  • add unit tests with different data formats (covered with test/unit/api/test_main_api and test/integration/pipelines/tuning/test_pipeline_tuning)

Context

related to discussion in #1298

@Lopa10ko Lopa10ko self-assigned this Jul 22, 2024
@pep8speaks
Copy link

pep8speaks commented Jul 22, 2024

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

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-07-23 13:46:24 UTC

Copy link
Contributor

github-actions bot commented Jul 22, 2024

All PEP8 errors has been fixed, thanks ❤️

Comment last updated at

@Lopa10ko Lopa10ko marked this pull request as draft July 22, 2024 11:32
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.94%. Comparing base (e0b4ee7) to head (7269af5).
Report is 1 commits behind head on master.

Files Patch % Lines
fedot/api/main.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1311   +/-   ##
=======================================
  Coverage   79.93%   79.94%           
=======================================
  Files         146      146           
  Lines       10097    10102    +5     
=======================================
+ Hits         8071     8076    +5     
  Misses       2026     2026           

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

@Lopa10ko Lopa10ko marked this pull request as ready for review July 22, 2024 13:34
@Lopa10ko Lopa10ko requested a review from aPovidlo July 22, 2024 19:24
if input_data is None:
input_data = self.train_data
else:
input_data = self.data_processor.define_data(features=input_data, target=self.target, is_predict=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Если подаются новые данные для тюнинга, то у них скорее всего будет новый и target. Поэтому в tune нужно по аналогии и target: TargetType = 'target' добавить

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
Collaborator

Choose a reason for hiding this comment

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

@Lopa10ko Я мб еще учел если у нас input_data is None. то target должен быть также self.target. Или при вызове define_data он таким же и будет?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

кажется, если input_data is None, то пост-тюнинг запускают на уже обработанных данных (на self.train_data), просто на этот раз дольше, например

а возможность запустить с указанными данными нужна в случае, если тюним на данных, которые не видели раньше (тогда и указываем FeaturesType + TargetType)

@Lopa10ko Lopa10ko merged commit d33ca9e into master Jul 24, 2024
7 checks passed
@Lopa10ko Lopa10ko deleted the hotfix-tune-featurestype branch July 24, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants