From e05c9d2ad6a03ed88975ed7288f62c53fbb02b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Ma=C3=ABl=20MAYN=C3=89?= Date: Thu, 9 Dec 2021 09:26:36 +0100 Subject: [PATCH 1/2] Added documentation on EvaluationRecipeCreator --- dataikuapi/dss/recipe.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/dataikuapi/dss/recipe.py b/dataikuapi/dss/recipe.py index 0c4a837e..534c97d9 100644 --- a/dataikuapi/dss/recipe.py +++ b/dataikuapi/dss/recipe.py @@ -1328,7 +1328,7 @@ class EvaluationRecipeCreator(DSSRecipeCreator): .. code-block:: python - # Create a new prediction scoring recipe outputing to a new dataset + # Create a new evaluation recipe outputing to a new dataset, to a metrics dataset and/or to a model evaluation store project = client.get_project("MYPROJECT") builder = EvaluationRecipeCreator("my_scoring_recipe", project) @@ -1340,6 +1340,27 @@ class EvaluationRecipeCreator(DSSRecipeCreator): builder.with_output_evaluation_store(evaluation_store_id) new_recipe = builder.build() + + # Access the settings + + er_settings = new_recipe.get_settings() + json_payload = er_settings.get_json_payload() + + # Change the settings + + json_payload['dontComputePerformance'] = True + json_payload['outputProbabilities'] = False + + # Manage evaluation labels + + json_payload['labels'] = [dict(key="label_1", value="value_1"), dict(key="label_2", value="value_2")] + + # Save the settings and run the recipe + + er_settings.set_json_payload(json_payload) + er_settings.save() + + new_recipe.run() Outputs must exist. They can be created using the following: From 52b81aa65dc8a6a0d8026afff2a62c027311de33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Ma=C3=ABl=20MAYN=C3=89?= Date: Thu, 9 Dec 2021 09:28:52 +0100 Subject: [PATCH 2/2] Fixed typo --- dataikuapi/dss/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataikuapi/dss/recipe.py b/dataikuapi/dss/recipe.py index 534c97d9..fb2846b9 100644 --- a/dataikuapi/dss/recipe.py +++ b/dataikuapi/dss/recipe.py @@ -1331,7 +1331,7 @@ class EvaluationRecipeCreator(DSSRecipeCreator): # Create a new evaluation recipe outputing to a new dataset, to a metrics dataset and/or to a model evaluation store project = client.get_project("MYPROJECT") - builder = EvaluationRecipeCreator("my_scoring_recipe", project) + builder = EvaluationRecipeCreator("my_evaluation_recipe", project) builder.with_input_model(saved_model_id) builder.with_input("dataset_to_evaluate")