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

1027 remove separation on primary secondary pipeline nodes #1031

Merged

Conversation

maypink
Copy link
Collaborator

@maypink maypink commented Jan 30, 2023

There is no more separation between PrimaryNode and SecondaryNode -- only PipelineNode. For now PrimaryNode and SecondaryNode are just the same as PipelineNode for backward compatibility.

PrimaryNode = PipelineNode
SecondaryNode = PipelineNode

Determinion of node type can be done with is_primary method.

@maypink maypink linked an issue Jan 30, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Attention: Patch coverage is 96.69421% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.64%. Comparing base (8c4efb3) to head (5fe9a25).
Report is 138 commits behind head on master.

Files with missing lines Patch % Lines
...ot/core/composer/gp_composer/specific_operators.py 71.42% 2 Missing ⚠️
fedot/core/pipelines/node.py 95.83% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1031      +/-   ##
==========================================
- Coverage   87.80%   87.64%   -0.17%     
==========================================
  Files         208      210       +2     
  Lines       13970    14091     +121     
==========================================
+ Hits        12267    12350      +83     
- Misses       1703     1741      +38     

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

@maypink maypink force-pushed the 1027-remove-separation-on-primary-secondary-pipeline-nodes branch from 53c1972 to 08cc2ce Compare January 31, 2023 13:16
Copy link
Collaborator

@andreygetmanov andreygetmanov left a comment

Choose a reason for hiding this comment

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

Прекрасная работа!
Скажи, а как будет вести себя композер с нодами-источниками данных в мультимодальных пайплайнах?

examples/advanced/gpu_example.py Outdated Show resolved Hide resolved
fedot/core/pipelines/node.py Outdated Show resolved Hide resolved
fedot/core/pipelines/node.py Show resolved Hide resolved
fedot/preprocessing/structure.py Outdated Show resolved Hide resolved
@@ -295,13 +283,6 @@ def test_pipeline_with_primary_nodes_correct():
assert has_primary_nodes(pipeline)


def test_pipeline_without_primary_nodes_raise_exception():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Мне кажется, подобный тест будет актуален для мультимодальных пайплайнов, т.к. там есть смысл в primary node: через неё подаются данные в пайплайн (нода data_source_table и т.п.)
Мб его чуточку поменять?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Поменять определенно стоит, потому что для обычных пайплайнов отсутствие primary ноды тоже не норма, а этот тест это покрывал

Copy link
Collaborator

Choose a reason for hiding this comment

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

Так вроде с новым подходом вроде вообще нет такой ситуации, как "отсутствие primary ноды". Можно только проверять, что конкретно находится в начальных PipelineNode

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

кажется, что теперь отсутствие primary PipelineNode означает, что в пайплайне есть цикл, а это проверяется тестом ниже. убранный тест же покрывал именно проверку типов, а не по факту наличие/отсутствие чего-либо в nodes_from

Copy link
Collaborator

Choose a reason for hiding this comment

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

Имела в виду наличие is_primary хотя бы в одной ноде, но как хотите



PrimaryNode = PipelineNode
SecondaryNode = PipelineNode
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.

@@ -295,13 +283,6 @@ def test_pipeline_with_primary_nodes_correct():
assert has_primary_nodes(pipeline)


def test_pipeline_without_primary_nodes_raise_exception():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Поменять определенно стоит, потому что для обычных пайплайнов отсутствие primary ноды тоже не норма, а этот тест это покрывал

@gkirgizov gkirgizov mentioned this pull request Feb 15, 2023
4 tasks
@maypink maypink force-pushed the 1027-remove-separation-on-primary-secondary-pipeline-nodes branch from 5d1f445 to 5fe9a25 Compare February 16, 2023 07:45
@maypink maypink merged commit f0c4c2f into master Feb 16, 2023
@maypink maypink deleted the 1027-remove-separation-on-primary-secondary-pipeline-nodes branch May 2, 2023 09:00
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.

Remove separation on Primary & Secondary Pipeline nodes
5 participants