Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • F FEDOT
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 87
    • Issues 87
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ITMO-NSS-team
  • FEDOT
  • Issues
  • #500

Closed
Open
Created Nov 19, 2021 by Elizaveta Lutsenko@LizLutsenkoOwner

Bug with test_cv_api_correct

Created by: valer1435

Sometimes the test didn't work. I wrote a special test to reproduce the exception https://github.com/nccr-itmo/FEDOT/blob/617cc8dcd1e101ef36d1ab75703c758b1c7f9978/test/unit/validation/test_table_cv.py#L155

Use bug_test_cv_api_correct branch

..\..\..\fedot\core\pipelines\pipeline.py:179: in fit
    train_predicted = self._fit(input_data=copied_input_data,
..\..\..\fedot\core\pipelines\pipeline.py:147: in _fit
    train_predicted = self.root_node.fit(input_data=input_data)
..\..\..\fedot\core\pipelines\node.py:309: in fit
    secondary_input = self._input_from_parents(input_data=input_data, parent_operation='fit')
..\..\..\fedot\core\pipelines\node.py:336: in _input_from_parents
    parent_results, target = _combine_parents(parent_nodes, input_data,
..\..\..\fedot\core\pipelines\node.py:375: in _combine_parents
    prediction = parent.fit(input_data=input_data)
..\..\..\fedot\core\pipelines\node.py:309: in fit
    secondary_input = self._input_from_parents(input_data=input_data, parent_operation='fit')
..\..\..\fedot\core\pipelines\node.py:336: in _input_from_parents
    parent_results, target = _combine_parents(parent_nodes, input_data,
..\..\..\fedot\core\pipelines\node.py:375: in _combine_parents
    prediction = parent.fit(input_data=input_data)
..\..\..\fedot\core\pipelines\node.py:243: in fit
    return super().fit(input_data)
..\..\..\fedot\core\pipelines\node.py:161: in fit
    self.fitted_operation, operation_predict = self.operation.fit(params=self.content['params'],
..\..\..\fedot\core\operations\operation.py:83: in fit
    predict_train = self.predict(self.fitted_operation, data, is_fit_pipeline_stage, params)
..\..\..\fedot\core\operations\operation.py:104: in predict
    prediction = self._eval_strategy.predict(
..\..\..\fedot\core\operations\evaluation\classification.py:148: in predict
    prediction = trained_operation.transform(predict_data,
..\..\..\fedot\core\operations\evaluation\operation_implementations\data_operations\sklearn_imbalanced_class.py:84: in transform
    min_data, maj_data = self._get_data_by_target(features, target,
..\..\..\fedot\core\operations\evaluation\operation_implementations\data_operations\sklearn_imbalanced_class.py:125: in _get_data_by_target
    minority_data = np.hstack((features[min_idx], np.expand_dims(target[min_idx], 1)))
<__array_function__ internals>:5: in hstack
    ???
..\..\..\..\fedotenv_3_8\lib\site-packages\numpy\core\shape_base.py:346: in hstack
    return _nx.concatenate(arrs, 1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ([array([[ 0.95715102, 40.        ,  0.        , ...,  0.        ,
         0.        ,  1.        ],
       [ 0.65818...rray([[[0]],

       [[0]],

       [[0]],

       ...,

       [[0]],

       [[0]],

       [[0]]], dtype=int64)], 1)
kwargs = {}
relevant_args = [array([[ 0.95715102, 40.        ,  0.        , ...,  0.        ,
         0.        ,  1.        ],
       [ 0.658180...), array([[[0]],

       [[0]],

       [[0]],

       ...,

       [[0]],

       [[0]],

       [[0]]], dtype=int64)]

>   ???
E   ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 3 dimension(s)

<__array_function__ internals>:5: ValueError```
Assignee
Assign to
Time tracking