Skip to content

Commit

Permalink
temp: add workaround for poor output_mode passing
Browse files Browse the repository at this point in the history
  • Loading branch information
Lopa10ko committed Jul 17, 2024
1 parent 8c116f4 commit 6bd2581
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/integration/repository/test_pipeline_tuning.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest

from fedot.api.main import Fedot
from fedot_ind.core.architecture.settings.computational import backend_methods as np
from fedot.core.composer.metrics import F1
from fedot.core.pipelines.pipeline_builder import PipelineBuilder
from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
Expand All @@ -15,12 +16,16 @@ def test_fedot_multi_series():
with IndustrialModels():
train_data, test_data = initialize_multi_data()
pipeline = PipelineBuilder() \
.add_node('eigen_basis', params={'window_size': None}) \
.add_node('eigen_basis') \
.add_node('quantile_extractor') \
.add_node('rf') \
.build()
pipeline.fit(train_data)
predict = pipeline.predict(test_data, output_mode='labels')
# TODO: output_mode doesn't affect predict form
# TODO: remove temp workaround with argmax
if test_data.target.shape != predict.predict.shape:
predict.predict = np.argmax(predict.predict, axis=1)
print(F1.metric(test_data, predict))


Expand Down

0 comments on commit 6bd2581

Please sign in to comment.