def test_fetch_execute_task_list_of_floats(flyteclient, flyte_workflows_register): remote = FlyteRemote(Config.auto(), PROJECT, "development") flyte_task = remote.fetch_task( name="workflows.basic.list_float_wf.concat_list", version=f"v{VERSION}") xs: typing.List[float] = [0.1, 0.2, 0.3, 0.4, -99999.7] execution = remote.execute(flyte_task, {"xs": xs}, wait=True) assert execution.outputs["o0"] == "[0.1, 0.2, 0.3, 0.4, -99999.7]"
def test_fetch_execute_task(flyteclient, flyte_workflows_register): remote = FlyteRemote(Config.auto(), PROJECT, "development") flyte_task = remote.fetch_task(name="workflows.basic.basic_workflow.t1", version=f"v{VERSION}") execution = remote.execute(flyte_task, {"a": 10}, wait=True) assert execution.outputs["t1_int_output"] == 12 assert execution.outputs["c"] == "world" assert execution.raw_inputs.get("a", int) == 10 assert execution.raw_outputs.get("c", str) == "world"
def test_fetch_execute_task_convert_dict(flyteclient, flyte_workflows_register): remote = FlyteRemote(Config.auto(), PROJECT, "development") flyte_task = remote.fetch_task( name="workflows.basic.dict_str_wf.convert_to_string", version=f"v{VERSION}") d: typing.Dict[str, str] = {"key1": "value1", "key2": "value2"} execution = remote.execute(flyte_task, {"d": d}, wait=True) assert json.loads(execution.outputs["o0"]) == { "key1": "value1", "key2": "value2" }