Skip to content

Commit 9492097

Browse files
committed
improved create scenario public api in order to ease it [close ch33707]
1 parent 94bab83 commit 9492097

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dataikuapi/dss/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,14 +646,14 @@ def get_scenario(self, scenario_id):
646646
"""
647647
return DSSScenario(self.client, self.project_key, scenario_id)
648648

649-
def create_scenario(self, scenario_name, type, definition={}):
649+
def create_scenario(self, scenario_name, type, definition={'params': {}}):
650650
"""
651651
Create a new scenario in the project, and return a handle to interact with it
652652
653653
:param str scenario_name: The name for the new scenario. This does not need to be unique
654654
(although this is strongly recommended)
655655
:param str type: The type of the scenario. MUst be one of 'step_based' or 'custom_python'
656-
:param object definition: the JSON definition of the scenario. Use ``get_definition`` on an
656+
:param object definition: the JSON definition of the scenario. Use ``get_definition(with_status=False)`` on an
657657
existing ``DSSScenario`` object in order to get a sample definition object
658658
659659
:returns: a :class:`.scenario.DSSScenario` handle to interact with the newly-created scenario

0 commit comments

Comments
 (0)