Skip to content

Commit 0fd738a

Browse files
authored
Added documentation on EvaluationRecipeCreator (#197)
* Added documentation on EvaluationRecipeCreator * Fixed typo
1 parent c948318 commit 0fd738a

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

dataikuapi/dss/recipe.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,10 +1328,10 @@ class EvaluationRecipeCreator(DSSRecipeCreator):
13281328
13291329
.. code-block:: python
13301330
1331-
# Create a new prediction scoring recipe outputing to a new dataset
1331+
# Create a new evaluation recipe outputing to a new dataset, to a metrics dataset and/or to a model evaluation store
13321332
13331333
project = client.get_project("MYPROJECT")
1334-
builder = EvaluationRecipeCreator("my_scoring_recipe", project)
1334+
builder = EvaluationRecipeCreator("my_evaluation_recipe", project)
13351335
builder.with_input_model(saved_model_id)
13361336
builder.with_input("dataset_to_evaluate")
13371337
@@ -1340,6 +1340,27 @@ class EvaluationRecipeCreator(DSSRecipeCreator):
13401340
builder.with_output_evaluation_store(evaluation_store_id)
13411341
13421342
new_recipe = builder.build()
1343+
1344+
# Access the settings
1345+
1346+
er_settings = new_recipe.get_settings()
1347+
json_payload = er_settings.get_json_payload()
1348+
1349+
# Change the settings
1350+
1351+
json_payload['dontComputePerformance'] = True
1352+
json_payload['outputProbabilities'] = False
1353+
1354+
# Manage evaluation labels
1355+
1356+
json_payload['labels'] = [dict(key="label_1", value="value_1"), dict(key="label_2", value="value_2")]
1357+
1358+
# Save the settings and run the recipe
1359+
1360+
er_settings.set_json_payload(json_payload)
1361+
er_settings.save()
1362+
1363+
new_recipe.run()
13431364
13441365
Outputs must exist. They can be created using the following:
13451366

0 commit comments

Comments
 (0)