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 Quick Start example to readme with several usability fixes #86

Merged
merged 16 commits into from
Apr 24, 2023

Conversation

gkirgizov
Copy link
Collaborator

@gkirgizov gkirgizov commented Apr 19, 2023

Changes:

  • Add self-sufficient simple_run.py example with simple setup of Optimizer
  • Objective can now be simple constructed from simple metric
  • Change usages of OptGraph to just Graph in some places of Optimzier
  • Default parameter changes (max_arity=4, max_depth=10, early_stopping_iterations=50)
  • Default mutation set is changed to simple single-point mutations

Closes #48

@gkirgizov gkirgizov added documentation Improvements or additions to documentation examples Update of cases or examples labels Apr 19, 2023
@aim-pep8-bot
Copy link
Collaborator

aim-pep8-bot commented Apr 19, 2023

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

Line 12:1: F401 'golem.core.optimisers.genetic.operators.crossover.CrossoverTypesEnum' imported but unused
Line 17:1: F403 'from golem.metrics.graph_metrics import *' used; unable to detect undefined names
Line 20:38: F405 'nx' may be undefined, or defined from star imports: golem.metrics.graph_metrics
Line 22:36: F405 'Sequence' may be undefined, or defined from star imports: golem.metrics.graph_metrics
Line 56:31: F405 'spectral_dist' may be undefined, or defined from star imports: golem.metrics.graph_metrics
Line 57:32: F405 'spectral_dist' may be undefined, or defined from star imports: golem.metrics.graph_metrics
Line 60:31: F405 'degree_distance' may be undefined, or defined from star imports: golem.metrics.graph_metrics
Line 61:35: F405 'size_diff' may be undefined, or defined from star imports: golem.metrics.graph_metrics
Line 67:55: E226 missing whitespace around arithmetic operator

Line 74:70: W291 trailing whitespace
Line 77:1: W293 blank line contains whitespace

Comment last updated at 2023-04-24 05:38:25 UTC

@gkirgizov
Copy link
Collaborator Author

Ppe8 issues for graph_search & tree_search are already fixed in parallel PR, so I ignore them to avoid conflicts

@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2023

Codecov Report

Merging #86 (b1dc622) into main (577dd6f) will increase coverage by 0.01%.
The diff coverage is 95.45%.

@@            Coverage Diff             @@
##             main      #86      +/-   ##
==========================================
+ Coverage   71.31%   71.32%   +0.01%     
==========================================
  Files         115      115              
  Lines        6456     6456              
==========================================
+ Hits         4604     4605       +1     
+ Misses       1852     1851       -1     
Impacted Files Coverage Δ
golem/core/optimisers/objective/objective.py 84.90% <75.00%> (-1.37%) ⬇️
golem/core/adapter/adapter.py 89.74% <100.00%> (ø)
golem/core/optimisers/genetic/gp_optimizer.py 97.61% <100.00%> (-0.03%) ⬇️
golem/core/optimisers/genetic/gp_params.py 100.00% <100.00%> (ø)
golem/core/optimisers/optimization_parameters.py 97.05% <100.00%> (ø)
golem/core/optimisers/optimizer.py 94.36% <100.00%> (ø)
golem/core/optimisers/populational_optimizer.py 89.41% <100.00%> (-0.13%) ⬇️

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@maypink maypink self-requested a review April 19, 2023 10:25
README_en.rst Outdated Show resolved Hide resolved
README.rst Outdated
Быстрый старт
=============

Следующий пример показывает поиск графа по графу-эталону с помощью метрики расстояния редактирования (Edit Distance). Оптимизатор настраивается с минимальным набором параметров и простыми одноточечными мутациями. Более подробные примеры можно найти в файлах `examples/synthetic_graph_evolution/simple_run.py`, `graph_search.py` и `tree_search.py` (в той же директории).
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.

добавил

@gkirgizov gkirgizov requested review from nicl-nno and maypink April 24, 2023 05:40
@gkirgizov gkirgizov merged commit c7c910c into main Apr 24, 2023
@gkirgizov gkirgizov deleted the minimal-run branch April 24, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation examples Update of cases or examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add simple example to README
5 participants