1. 22 Jul, 2022 3 commits
  2. 11 Jul, 2022 1 commit
    • Peter's avatar
      Individuals inheritance fix & OptHistory improvement (#724) · 751bf701
      Peter authored
      These changes elaborate the PR #700.
      
      1. Python objects change list:
      * `Individual` and `ParentOperator` classes are now frozen data classes;
      * Every uid now normally exists in a single Individual object. This is a soft restriction, though, and any violation will be noticed with warning;
      * `fitness` and `graph` of `Individual` now can be updated only once - during its evaluation;
      * `Individual` has a new attribute called `native_generation`. It points to the number of generation in which the individual is obtained;
      * `parent_operators` of individuals are not cleaned in every generation any more;
      * `Individual.parent_operators` and `ParentOperator.parent_individuals` are now tuples;
      * Side change: Moved `SingletonMeta` from `fedot.core.log` to `fedot.core.utilities.singleton_meta`
      * Bug fix: `OptNode` now accepts `content` with `params`, not replacing parameters with default stub.
      * Minor: `ind` argument of `mutate()` now has explicit name `individual`;
      * Minor: many typing fixes.
      
      2. `OptHitsory` serialization change list:
      * Serialized `OptHistory` now has an attribute called `individuals_pool`. It contains all unique individuals from the history;
      * In history JSON, `individuals` and `archive_history` now contain only uids that point to the elements of  `individuals_pool`;
      * Any intermediate parent, that is not represented in any generation, is placed to `individuals_pool`. Its children point to it via its uid;
      * As a bonus, newly-saved history JSONs now take much less size (about 10+ times lesser);
      * All individuals not found in loaded histories now are re-created with the same uid. Their metadata contains an explicit message explaining that they are missing;
      * Added support for relatively recent histories;
      * Improved `OptHistory` tests to guarantee stability and backward compatibility;
      * Updated the histories stored in Git repo.
      751bf701
  3. 08 Jul, 2022 1 commit
    • Lyubov Yamshchikova's avatar
      706 node factory mutation (#746) · 4d96fe01
      Lyubov Yamshchikova authored
      * First draft of abstract node factory and it's implementation for ml pipeline.
      
      * Creation of nodes while mutation done using node factory. _add_separate_parent_node need fixing)
      
      * Factory methods modified, tests for PipelineOptNodeFactory added
      
      * OptNodeFactory is placed in GraphGenerationParams.
      
      * advisor and requirements are now class attributes, default implementation of OptNodeFabric, methods of factory refactored.
      
      * Test for DefaultOptNodeFactory
      
      * Creation of nodes while mutation done using node factory. _add_separate_parent_node need fixing)
      
      * OptNodeFactory is placed in GraphGenerationParams.
      
      * advisor and requirements are now class attributes, default implementation of OptNodeFabric, methods of factory refactored.
      
      * Test for DefaultOptNodeFactory
      
      * Method to compose generation params for pipeline.
      
      * docStrings and typeHints for mutation operators added, change_node method renamed to exchanged_node, advisor is added as an attribute of GraphGenerationParams class.
      
      * Import of Sequence fixed
      
      * Typing of requirements in PipelineOptNodeFactory changed to PipelineComposerRequirements
      
      * Logging fixed
      
      * ABC import fixed
      4d96fe01
  4. 01 Jul, 2022 1 commit
    • Pinchuk Maya's avatar
      622 logger as singleton (#710) · 50d8406d
      Pinchuk Maya authored
      * rebase commit
      
      * minors
      
      * rebase commit & minors after rebase
      
      * pep8 fixes & verbosity_level
      
      * minors
      
      * one more rebase
      
      * remove unused imports
      
      * replace os with pathlib & add log tests & fix other tests
      
      * incapsulate getting class name & fix verbose_level
      
      * a little cleanup
      
      * change default log level
      
      * add prefix & clean up
      
      * change verbosity levels to 'logging'
      
      * clean imports
      
      * minors
      
      * add max depth
      
      * minors after rebase
      50d8406d
  5. 29 Jun, 2022 1 commit
    • Valerii Pokrovskii's avatar
      Remove duplicate params (#747) · 6ceb6ff9
      Valerii Pokrovskii authored
      Fix for #744 issue.
      Duplicates are deleted from api params and composer_metric and tuner_metric are divided
      Significantly refactored parameters setting in api, please notice that.
      6ceb6ff9
  6. 21 Jun, 2022 1 commit
    • Grigorii's avatar
      Extract GraphValidator instead of validate() (#730) · 434c8c3c
      Grigorii authored
      Small PR that abstract graph validation functionality as a separate class residing in GraphGenerationParams.verifier.
      This PR also renames validation as a verification to avoid confusion with validation in a sense of ML.
      434c8c3c
  7. 14 Jun, 2022 1 commit
    • Peter's avatar
      Consistency and backward compatibility of OptHistory (#700) · 28b46da2
      Peter authored
      Consistency & backward compatibility of OptHistory:
      
      * GraphOptimiser and InitialGenerationBuilder now use initial_individuals instead of initial_graphs in favor of OptHistory consistency.
      * Individual serialization: fitness that was saved as float in older histories is now converted to SingleObjFitness when loaded.
      * OptHistory.load() is now able to get os.Pathlike objects, as its signature says.
      * A new test for backward compatibility of OptHistory.load() is added.
      * ParentOperator class is temporary imported at opt_history
      28b46da2
  8. 03 Jun, 2022 1 commit
    • Grigorii's avatar
      Generalize Evaluation subsystem and Objective interface (#697) · 37e3f8cb
      Grigorii authored
      - Use generic ObjectiveFunction (Callable) instead of ObjectiveEvaluate in .optimise interface.
        This generalises Optimiser interface and allows passing arbitrary Callables as Objective functions.
      - Introduce ObjectiveEvaluationDispatcher:
        Dispatcher accepts objective function and returns population evaluator.
        Its role is to define details of how objective must be actually evaluated,
        e.g. using multiprocessing, evaluation cache or remote evaluation.
        Rename EvaluationDispatcher to MultiprocessingDispatcher, which reflects its implementation.
      - Introduce evaluation_callback functionality in Optimiser.
        This allows extracting the need for computing intermediate metrics.
        Now gp_composer defines this callback.
      
      This is a continuation of PR #678 and part of the issue #608
      37e3f8cb
  9. 24 May, 2022 1 commit
    • Grigorii's avatar
      Abstract notion of Objective, its evaluation and refactor usages of metrics (#678) · 3a6f06b2
      Grigorii authored
      Part of the big issue #608
      
      Main introduced abstractions:
      * Objective -- Represents objective functions, encapsulates a set of metrics, the kind of objective (single/multi) and can provide some info about them (metric names).
      * ObjectiveEvaluate -- Responsible for specific evaluation policy of (a) Objective and (b) Graphs. It hides domain specifics of what are the graphs and what's additionally requried for evaluating objective.
        For example, Pipelines are evaluated by DataObjectiveEvaluate, that encapsulates necessary pipeline.fit on the train data and objective evaluation on the test data.
      * Evaluate (introduced in a previous PR  #639) is renamed to EvaluateDispatcher -- Responsible for how computing ObjectiveEvaluation must be distributed over processes.
      
      So, following these abstractions, main changes in API:
      * Now Objective must be used instead of just a list of metrics with boolean flag is_multi_objective. All useages of metrics list are dropped from composers, optimsiers etc.
      * GraphOptimiser.optimise now accepts ObjectiveEvaluate as an argument.
        For tests and ad-hoc usages there is a way to contruct trivial ObjectiveEvaluate with trivial Objective from a simple Callable: e.g. see run_custom_example.py.
      * Correspondence between old/new code for metric calculation:
        1. `calc_metric_for_folds` -> `ObjectiveEvaluate.evaluate` (for data_producer with K folds)
        2. `composer.compose_metric` -> `ObjectiveEvaluate.evaluate` (for trivial data_producer with 1 fold)
      3a6f06b2
  10. 17 May, 2022 1 commit
    • Grigorii's avatar
      Refactor improvement checking and adaptive population size in GP Optimisers (#662) · 135b9c5d
      Grigorii authored
      Primary changes:
      - Introduce GenerationKeeper:
        It encapsulates watching improvements/stagnation and keeping best individuals through generations
      - Drop usages of supplementary metrics in optimisers:
        In favor of using compound SingleObjFitness with supplementary metrics.
      - Encapsulate dynamic parameter of next offspring size in AdaptiveParameter.
        This simplifies main optimiser loop a lot, allowing to drop many variables with duplicate functionality,
        thanks to combination of GenerationKeeper and Fitness. See AdaptivePopulationSize class.
      - Other minor code refactorings (notably dropping custom ParetoFront)
      
      Important notes on changes in API:
      - Now if only 1 metric is provided, additional default complexity metric is appended to metrics
        The appended metric is the previously used and scattered in Optimisers supplementary metric,
        which is used for distinguishing individuals with equal fitness.
        See usages of ComposerBuilder._default_complexity_metrics()
      
      This PR is a part of big refactoring #608
      135b9c5d
  11. 19 Apr, 2022 1 commit
    • Grigorii's avatar
      Refactoring of evaluate individuals in optimiser (#639) · 9d325d48
      Grigorii authored
      - Introduce generic Operator interface for Optimiser operators.
      I will use it more in following PR-s related to #608 to make logic and abstraction of evo algo clear & reusable.
      
      - Current PR introduces only one specfic Evaluate operator.
      It keeps everything related to evaluation in one place.
      No new logic is added, mostly cleanup and reorganization of the code.
      
      - Also refined type signatures of Graph adapters and added no-op behavior
      for already adapted graphs (to avoid excessive checks a-la `adapt if not already adapted)
      
      - Refactor a bit ComposerBuilder to avoid late-initialisation through assignment of composer.optimiser
      9d325d48
  12. 15 Apr, 2022 2 commits
  13. 07 Apr, 2022 1 commit
  14. 28 Mar, 2022 1 commit
  15. 23 Mar, 2022 1 commit
  16. 22 Mar, 2022 1 commit
  17. 30 Dec, 2021 2 commits
  18. 02 Dec, 2021 1 commit
  19. 19 Nov, 2021 1 commit
  20. 29 Jul, 2021 1 commit
  21. 01 Jul, 2021 1 commit
  22. 30 Jun, 2021 1 commit
    • Rosneft rosneft's avatar
      Custom graph model optimization (#324) · b7123d58
      Rosneft rosneft authored
      * Graph/GraphNode as prototypes for Chain/Node
      * OptGraph/OptNode as obtimisation object
      * adapter to converrt Chain to OptGraph and back
      * simplified example of custom model learning
      * custon constraints customization for implemented
      * custom mutain and crossover can be used
      b7123d58
  23. 17 May, 2021 1 commit