-
Notifications
You must be signed in to change notification settings - Fork 87
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
Time consuming report after composition #1257
Conversation
All PEP8 errors has been fixed, thanks ❤️ Comment last updated at |
fedot/utilities/industrial_timer.py
Outdated
from contextlib import contextmanager | ||
|
||
|
||
class FedotIndustrialTimer: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Видимо надо как-то переименовать
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1257 +/- ##
==========================================
- Coverage 79.82% 79.80% -0.03%
==========================================
Files 150 150
Lines 10322 10344 +22
==========================================
+ Hits 8240 8255 +15
- Misses 2082 2089 +7 ☔ View full report in Codecov by Sentry. |
/fix-pep8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Перед композированием Федот обучается inital pipeline и выдаёт в консоль время его обучения. То же самое происходит, если не включать композирование (передать в API predefined_model=auto
, например)
Это время где-то учитывается? Возможно, на стадии 'Data Preprocessing'?
Думаю, может быть полезно вынести это в отдельную строчку отчёта
Соглашусь, что стоит учитывать это.
Не знаю, нужно посмотреть, но навряд ли в обработке.
Не уверен. Может быть есть смысл все заносить в общее время |
Да, можно и так |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Мне кажется, для практического применения в целом не так важно знать, сколько времени занимал препроцессинг на каждой стадии обучения (композинг, тюнинг, всё такое). Поэтому выводить суммарное время препроцессинга - это хорошо и удобно, согласен
- Я посмотрел на процесс .fit(), и мне кажется, что можно легко рассчитать время композинга, обернув в таймер строчки, где производится композинг. Тогда fitting = composing + tuning (fit) + остатки
- Самая весомая часть остатков - это метод
train_on_full_dataset
. Он может занимать значимое количество времени, потому что обучает модель на всём датасете + может быть информативен и полезен, потому что в связке с Predicting даст понятное представление, сколько времени уже найденная модель фитится, а сколько предиктится. Поэтому можно тоже выводить эту величину в отчёт - И методу
report
не хватает хорошего докстринга, где будет объяснено, что значит и как считается каждая величина. Например, крайне важным будет указать, что Data Preprocessing - это суммарное время препроцессинга за всё время запуска, а Fitting - это сумма композинга, тюнинга и обучения полученной модели на всём датасете
self.log.message('Final pipeline was fitted') | ||
else: | ||
self.log.message('Already fitted initial pipeline is used') | ||
with fedot_composer_timer.launch_train_inference(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Только комментарий "# Final fit for obtained pipeline on full dataset" лучше не убирать, наверное
fedot/api/main.py
Outdated
@@ -497,6 +512,28 @@ def explain(self, features: FeaturesType = None, | |||
|
|||
return explainer | |||
|
|||
def return_report(self) -> pd.DataFrame: | |||
""" Functions returns report of time-consuming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно немного подправить текст:
Function returns a report on time consumption.
The following steps are presented in this report:
- 'Data Definition (fit)': Time spent on data definition in fit().
- 'Data Preprocessing': Total time spent on preprocessing data, includes fitting and predicting stages.
- 'Fitting (summary)': Total time spent on Composing, Tuning and Training Inference.
- 'Composing': Time spent on searching for the best pipeline.
- 'Train Inference': Time spent on training the pipeline found during composing.
- 'Tuning (composing)': Time spent on hyperparameters tuning in the whole fitting, if with_tune
is True.
- 'Tuning (after)': Time spent on .tune() (hyperparameters tuning) after composing.
- 'Data Definition (predict)': Time spent on data definition in predict().
- 'Predicting': Time spent on predicting (inference).
|
||
@property | ||
def report(self) -> dict: | ||
""" Return dict with the next columns: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут то же самое
- 'Data Definition (fit)': Time spent on data definition in fit().
- 'Data Preprocessing': Total time spent on preprocessing data, includes fitting and predicting stages.
- 'Fitting (summary)': Total time spent on Composing, Tuning and Training Inference.
- 'Composing': Time spent on searching for the best pipeline.
- 'Train Inference': Time spent on training the pipeline found during composing.
- 'Tuning (composing)': Time spent on hyperparameters tuning in whole fitting, if
with_tune
is True. - 'Tuning (after)': Time spent on .tune() (hyperparameters tuning) after composing.
- 'Data Definition (predict)': Time spent on data definition in predict().
- 'Predicting': Time spent on predicting (inference).
521091c
to
d7944b7
Compare
Добавление таймера для подсчета времени выполнения основных процессов во время композирования пайплайна:
После завершения обучения в композировании, можно вызвать метод
return_report()
из API, который вернетDataFrame
с временем работы конкретной стадии.