Skip to content

Commit

Permalink
update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
DRMPN authored Apr 1, 2024
1 parent 1e5da5f commit 4ec7f33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/unit/api/test_main_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,17 @@ def test_specific_baseline_with_api():
"""
Check that ``get_metrics`` works correctly if ``target`` is defined as a string and ``test_data`` doesn't contain it
"""
train_data, test_data, threshold = get_dataset("classification")
train_data, test_data, _ = get_dataset("classification")

baseline_model = Fedot(problem="classification")
baseline_model = Fedot(problem="classification", metric=["f1"])

baseline_model.fit(features=train_data.features, target="target", predefined_model="xgboost")
baseline_model.fit(features=train_data.features, target="target")

prediction = baseline_model.predict(features=test_data.features)

assert len(prediction) == len(test_data.target)
# assert len(prediction) == len(test_data.target)

baseline_metrics = baseline_model.get_metrics(metric_names="f1")
baseline_metrics = baseline_model.get_metrics()

assert baseline_metrics["f1"] > 0

Expand Down

0 comments on commit 4ec7f33

Please sign in to comment.