Skip to content

Commit

Permalink
chore: bring back cgru and cgru in default pipeline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lopa10ko committed Jul 23, 2024
1 parent e0b4ee7 commit a7c4022
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions test/integration/real_applications/test_heavy_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,15 @@
from fedot.core.pipelines.pipeline_builder import PipelineBuilder


@pytest.mark.skip(reason="Fails due to the https://github.com/aimclub/FEDOT/issues/1240")
def test_cgru_forecasting():
@pytest.mark.parametrize('pipeline', (
PipelineBuilder().add_node('lagged', params={'window_size': 200}).add_node('cgru').build(),
cgru_pipeline(),
), ids=str)
def test_cgru_forecasting(pipeline):
horizon = 5
window_size = 200
train_data, test_data = get_ts_data('salaries', horizon)

pipeline = PipelineBuilder().add_node('lagged', params={'window_size': window_size}).add_node('cgru').build()
pipeline.fit(train_data)
predicted = pipeline.predict(test_data).predict[0]

assert len(predicted) == horizon


@pytest.mark.skip(reason="Fails due to the https://github.com/aimclub/FEDOT/issues/1240")
def test_cgru_in_pipeline():
horizon = 5
train_data, test_data = train_data, test_data = get_ts_data('salaries', horizon)

pipeline = cgru_pipeline()
train_data, test_data, _ = get_ts_data('salaries', horizon)
pipeline.fit(train_data)
predicted = pipeline.predict(test_data).predict[0]
predicted = pipeline.predict(test_data).predict

assert predicted is not None
assert len(predicted) == horizon

0 comments on commit a7c4022

Please sign in to comment.