utils.rc.dtos.recipe

Module Contents

Classes

Recipe

Attributes

logger

utils.rc.dtos.recipe.logger
class utils.rc.dtos.recipe.Recipe(data={})
setData(data={})
add_condition(condition: utils.rcclient.entities.segment.ItemExpression)
stop()
getChildrenDatasets() dict

Get all children datasets of the recipe

Returns:

all children datasets indexed by name

Return type:

dict

get_output_models() dict

Get all children charts of the recipe

Returns:

all children datasets indexed by name

Return type:

dict

get_output_charts() dict

Get all children charts of the recipe

Returns:

all children datasets indexed by name

Return type:

dict

getChildrenViewNames()
showChildrenView(viewName)
add_transform(transform: utils.rc.dtos.transform.Transform | utils.rcclient.entities.recipe.Code)

This adds a transform to the recipe

Parameters:

transform (Transform) – transform to be added

Raises:

TemplateInputValidationError

deleteTransform(transform_name: str)
run(wait_till_completed=False)

Runs the recipe

download_output(out_type='notebook')

Download the recipe output files :param out_type: notebook for output notebook, log for output log file :return:

static print_logs(logs)
getStatus()
get_recipe_run_details()
test(transform: List[utils.rc.dtos.transform.Transform] | utils.rcclient.entities.recipe.Code, notebookPath=None)

Test the specified transform or code in the provided notebook. :param transform: The Transform or Code object to be tested. :type transform: Union[Transform, Code] :param This represents the data transformation logic to be validated in the test.: :param notebookPath: The file path to the notebook where the testing will be performed. :type notebookPath: str, optional :param If not provided: :type If not provided: None

Returns:

RecipeTestResponse object

generate_code(user_input: str = str(), ask_ai: bool = False, with_signature: bool = True, outputs: List[str] = [], charts: List[str] = [])

Generate code based on the provided parameters. :param self: The instance of the class. :param scenario_id: ID of the scenario (optional). :type scenario_id: str :param user_input: User input for the code generation process (optional). :type user_input: str :param ask_ai: Flag to determine whether to use AI assistance (default: False). :type ask_ai: bool :param Set this to True to use AI assistance.: :param with_signature: Flag to include a signature in the generated code (default: True). :type with_signature: bool :param outputs: List of desired outputs from the generated code (default: []). :type outputs: List[str] :param charts: List of desired charts from the generated code (default: []). :type charts: List[str]

Returns:

The generated code based on the provided parameters.

Return type:

ReturnType

get_variables(transform)
prepareForLocal(transform, contextId=None, row_limit=1000000)
getOutputDatasetId()
static __download_artifact(artifact_name)
static __download_model(model_name, model_version='default')