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

Add agent type #1142

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Add agent type #1142

wants to merge 9 commits into from

Conversation

maypink
Copy link
Collaborator

@maypink maypink commented Aug 14, 2023

Add adaptive optimization params in FEDOT + Method for getting all available operations from node factory

@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

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

Comparison is base (17b2ecd) 79.70% compared to head (a6e0764) 79.74%.
Report is 16 commits behind head on master.

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

Files Patch % Lines
fedot/core/pipelines/pipeline_node_factory.py 25.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1142      +/-   ##
==========================================
+ Coverage   79.70%   79.74%   +0.03%     
==========================================
  Files         141      142       +1     
  Lines        9851     9884      +33     
==========================================
+ Hits         7852     7882      +30     
- Misses       1999     2002       +3     

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

@maypink maypink requested a review from gkirgizov August 14, 2023 15:10
Comment on lines 164 to 168
NB! 'adaptive_mutation_type' and 'context_agent_type' can be specified with 'composer_tuner_params'.
With default 'adaptive_mutation_type' context agent is not used, however, when 'adaptive_mutation_type'
is specified as not a default one be careful choosing 'context_agent_type'
since the default one is only considering the number of nodes in graph.
The full range of context agents can be obtained here: golem.core.optimizers.adaptive.context_agents
Copy link
Collaborator

@gkirgizov gkirgizov Aug 22, 2023

Choose a reason for hiding this comment

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

Вряд ли этот комментарий кому-то пригодиться. Его с разбегу поймешь только ты, мне пришлось 5 раз вчитаться, Люба еще поймет. А те кто не знает -- им это не поможет и только вызовет больше вопросов. Предлагаю написать что-нибудь краткое, что поймет потенциальный рядовой пользователь и без технических деталей. Мол, "экспериментальная функциональность для адаптивной эволюции.... За деталями -- туда-то"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

available_operations += self.advisor.models
if self.advisor.data_operations:
available_operations += self.advisor.data_operations
return available_operations
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.

там чтобы получать ембеддинги графов нужно либо иметь выбранный контекстнуальный агент как синглтон (чтобы он помнил все операции/модели в графах, что через него проходили), либо изначально подавать ему список всех доступных операций

@@ -160,6 +160,10 @@ class Fedot:
Default optimizer is :class:`~golem.core.optimisers.genetic.gp_optimizer.EvoGraphOptimizer`.
See the `example \
<https://github.com/aimclub/FEDOT/blob/master/examples/advanced/fedot_based_solutions/external_optimizer.py>`_

NB! 'adaptive_mutation_type' and 'context_agent_type' can be specified with 'composer_tuner_params'.
Both these params are a part of experimental functionality for adaptive evolution.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Может быть все-таки добавить что-то типа: "...Both these params are a part of experimental functionality for adaptive evolution. Adaptive evolution uses multi-armed bandits to choose most promising mutation at each iteration...."?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

как скажете

@pep8speaks
Copy link

pep8speaks commented Nov 30, 2023

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

Line 91:9: F841 local variable 'ex' is assigned to but never used

Line 6:1: F403 'from fedot.core.data.array_utilities import *' used; unable to detect undefined names
Line 30:21: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 31:31: F405 'find_common_elements' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 33:30: F541 f-string is missing placeholders
Line 60:72: F405 'Optional' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 81:32: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 89:44: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 108:50: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 108:69: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 110:25: F405 'atleast_2d' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 112:45: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 112:59: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 114:16: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 116:53: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 116:66: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 120:46: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 120:75: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 123:22: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 125:18: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 140:36: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 147:50: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 147:69: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 149:38: F405 'atleast_4d' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 162:53: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 162:66: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 164:16: F405 'flatten_extra_dim' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 169:45: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 169:59: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 176:26: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 180:53: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities
Line 180:66: F405 'np' may be undefined, or defined from star imports: fedot.core.data.array_utilities

Line 1:1: F401 'typing.Callable' imported but unused

Line 72:5: F811 redefinition of unused 'get_all_available_operations' from line 20

Line 80:67: W291 trailing whitespace
Line 81:80: W291 trailing whitespace

Comment last updated at 2023-12-07 10:59:34 UTC

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.

None yet

4 participants