changed the assert value in the test
@@ -8,6 +8,7 @@ import json
import shutil
from tests.notebooks_common import OUTPUT_NOTEBOOK, KERNEL_NAME
+ABS_TOL = 0.1
@pytest.mark.gpu
@pytest.mark.integration
@@ -31,20 +32,22 @@ def test_entailment_bert_azureml(notebooks,
subscription_id,
resource_group,
workspace_name,
- workspace_region):
+ workspace_region,
+ cluster_name):
notebook_path = notebooks["entailment_bert_azureml"]
pm.execute_notebook(notebook_path,
OUTPUT_NOTEBOOK,
parameters={'DATA_PERCENT_USED': 0.0025,
- 'subscription_id': subscription_id,
- 'resource_group': resource_group,
- 'workspace_name': workspace_name,
- 'workspace_region': workspace_region},
+ "subscription_id": subscription_id,
+ "resource_group": resource_group,
+ "workspace_name": workspace_name,
+ "workspace_region": workspace_region,
+ "cluster_name": cluster_name},
kernel_name=KERNEL_NAME,)
with open("outputs/results.json", "r") as handle:
result_dict = json.load(handle)
- assert result_dict["weighted avg"]["f1-score"] > 0.5
+ assert result_dict["weighted avg"]["f1-score"] == pytest.approx(0.2, abs=ABS_TOL)
if os.path.exists("outputs"):
shutil.rmtree("outputs")
