FEDOT
FEDOT copied to clipboard
Operation repo refactor
This is a 🔨 code refactoring.
Summary
Рефактор тегов и пресетов:
- Разделение. Теперь пресеты никак не пересекаются с тегами и служат лишь как апи.
- Использование
Enum
везде, где только можно. - Контроль совпадения тегов в репозитории и в коде.
- Упрощение кода, в связи с чем стало проще добавлять новые виды моделей.
Главная задача - утвердить или отклонить предлагаемые изменения. В связи с их большим количеством, предлагаю сначала сделать ревью этого PR, потом доработать в других PR, но в мастер влить одновременно все доработки.
В отдельных PR будет доработано:
- Пресет GPU. Сейчас не работает так как надо.
- Удален пресет TREE. Сейчас он в коде есть, но по факту его нет. Нужно вычищать код и тесты от него.
- TODO.
- Будут добавлены новые пресеты, которые будут выбираться автоматически при использовании PresetsEnum.AUTO (выбор моделей в зависимости от времени, выделенного на композицию, и размера данных так, чтобы в композицию не попали слишком требовательные по времени модели).
- Фикс тегов atomized_model. Сейчас это просто костыль.
После завершения этого цикла PR добавлять новые типы моделей и теги станет гораздо проще. До этого добавление неминуемо вело к усложнению и еще большему запутыванию системы пресетов/тегов.
Hello @kasyanovse! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
- In the file
fedot/api/api_utils/presets.py
:
Line 43:1: W293 blank line contains whitespace Line 47:1: W293 blank line contains whitespace Line 52:1: W293 blank line contains whitespace Line 83:1: W293 blank line contains whitespace Line 113:1: W293 blank line contains whitespace
Line 9:121: E501 line too long (143 > 120 characters) Line 76:121: E501 line too long (133 > 120 characters)
- In the file
fedot/core/operations/data_operation.py
:
Line 3:121: E501 line too long (124 > 120 characters) Line 27:121: E501 line too long (132 > 120 characters)
- In the file
fedot/core/pipelines/pipeline_advisor.py
:
Line 14:121: E501 line too long (126 > 120 characters)
- In the file
fedot/core/pipelines/verification_rules.py
:
Line 8:1: F401 'fedot.core.repository.operation_tags_n_repo_enums.DataOperationTagsEnum' imported but unused
- In the file
fedot/core/repository/operation_tags_n_repo_enums.py
:
Line 9:1: E305 expected 2 blank lines after class or function definition, found 1 Line 10:121: E501 line too long (123 > 120 characters) Line 11:121: E501 line too long (127 > 120 characters) Line 12:121: E501 line too long (127 > 120 characters) Line 13:121: E501 line too long (133 > 120 characters) Line 14:121: E501 line too long (137 > 120 characters) Line 16:121: E501 line too long (127 > 120 characters) Line 20:121: E501 line too long (136 > 120 characters)
- In the file
fedot/core/repository/operation_types_repo_enum.py
:
Line 13:1: F401 'fedot.core.repository.tasks.Task' imported but unused Line 15:1: E302 expected 2 blank lines, found 1 Line 45:65: F821 undefined name 'EvaluationStrategy' Line 71:1: W293 blank line contains whitespace Line 74:1: W293 blank line contains whitespace Line 75:32: E251 unexpected spaces around keyword / parameter equals Line 75:34: E251 unexpected spaces around keyword / parameter equals Line 77:1: W293 blank line contains whitespace Line 91:1: W293 blank line contains whitespace Line 95:1: W293 blank line contains whitespace Line 105:1: W293 blank line contains whitespace Line 113:1: W293 blank line contains whitespace Line 116:1: W293 blank line contains whitespace Line 120:1: W293 blank line contains whitespace Line 127:9: E117 over-indented Line 130:1: W293 blank line contains whitespace Line 174:1: W293 blank line contains whitespace Line 178:24: E127 continuation line over-indented for visual indent Line 179:24: E127 continuation line over-indented for visual indent
- In the file
fedot/core/repository/operation_types_repository.py
:
Line 1:1: F401 'enum.Enum' imported but unused Line 1:1: F401 'enum.IntEnum' imported but unused Line 2:1: F401 'itertools.chain' imported but unused Line 3:1: F401 'json' imported but unused Line 4:1: F401 'collections.defaultdict' imported but unused Line 5:1: F401 'dataclasses.dataclass' imported but unused Line 6:1: F401 'pathlib.Path' imported but unused Line 7:1: F401 'typing.Union' imported but unused Line 10:1: F401 'fedot.core.repository.operation_tags_n_repo_enums.ALL_TAGS' imported but unused Line 10:1: F401 'fedot.core.repository.operation_tags_n_repo_enums.DataOperationTagsEnum' imported but unused Line 10:1: F401 'fedot.core.repository.operation_tags_n_repo_enums.ModelTagsEnum' imported but unused Line 10:121: E501 line too long (136 > 120 characters) Line 16:1: F401 'fedot.core.repository.json_evaluation.import_enums_from_str' imported but unused Line 16:1: F401 'fedot.core.repository.json_evaluation.import_strategy_from_str' imported but unused Line 16:1: F401 'fedot.core.repository.json_evaluation.read_field' imported but unused Line 20:5: F401 'fedot.core.operations.evaluation.evaluation_interfaces.EvaluationStrategy' imported but unused Line 33:1: W293 blank line contains whitespace Line 40:1: W293 blank line contains whitespace Line 44:1: W293 blank line contains whitespace Line 102:1: W293 blank line contains whitespace Line 104:121: E501 line too long (125 > 120 characters)
Line 7:1: F401 'fedot.core.repository.operation_types_repo_enum.OperationReposEnum' imported but unused
- In the file
fedot/preprocessing/structure.py
:
Line 23:42: F821 undefined name 'Pipeline'
Code in this pull request still contains PEP8 errors, please write the /fix-pep8
command in the comments below to create commit with automatic fixes.
Comment last updated at
/fix-pep8
Codecov Report
Attention: Patch coverage is 79.82196%
with 68 lines
in your changes are missing coverage. Please review.
Project coverage is 78.90%. Comparing base (
5e726e9
) to head (f049db2
). Report is 7 commits behind head on master.
:exclamation: Current head f049db2 differs from pull request most recent head 8dc0dc3. Consider uploading reports for the commit 8dc0dc3 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #1253 +/- ##
==========================================
- Coverage 80.05% 78.90% -1.15%
==========================================
Files 149 152 +3
Lines 10278 10316 +38
==========================================
- Hits 8228 8140 -88
- Misses 2050 2176 +126
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closed as obsolete