-{"metadata":{"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.12.10"}},"nbformat_minor":5,"nbformat":4,"cells":[{"id":"377fef56-484d-491c-b19e-1be6931e44eb","cell_type":"code","source":"import pickle","metadata":{"trusted":true},"outputs":[],"execution_count":4},{"id":"92e3921b-2bb8-4333-8cfe-4bd27f785d24","cell_type":"code","source":"from python_workflow_definition.cwl.export import load_workflow_json","metadata":{"trusted":true},"outputs":[],"execution_count":17},{"id":"5303c059-8ae4-4557-858e-b4bd64eac711","cell_type":"code","source":"load_workflow_json(file_name=\"workflow.json\")","metadata":{"trusted":true},"outputs":[],"execution_count":18},{"id":"df302bd2-e9b6-4595-979c-67c46414d986","cell_type":"code","source":"! cwltool workflow.cwl workflow.yml","metadata":{"trusted":true},"outputs":[{"name":"stdout","output_type":"stream","text":"/srv/conda/envs/notebook/bin/cwltool:11: DeprecationWarning: Nesting argument groups is deprecated.\n sys.exit(run())\n\u001b[1;30mINFO\u001b[0m /srv/conda/envs/notebook/bin/cwltool 3.1.20250110105449\n\u001b[1;30mINFO\u001b[0m Resolved 'workflow.cwl' to 'file:///home/jovyan/workflow.cwl'\n\u001b[1;30mINFO\u001b[0m [workflow ] start\n\u001b[1;30mINFO\u001b[0m [workflow ] starting step get_prod_and_div\n\u001b[1;30mINFO\u001b[0m [step get_prod_and_div] start\n\u001b[1;30mINFO\u001b[0m [job get_prod_and_div] /tmp/abngt5eq$ python \\\n /tmp/7pxhgcet/stg6ba69a25-7dc0-46be-9bbe-5c08e6ce1925/wrapper.py \\\n --function=workflow.get_prod_and_div \\\n --arg_x=/tmp/7pxhgcet/stg007c65c6-d1cd-44cd-b761-e181c0cc37d8/x.pickle \\\n --arg_y=/tmp/7pxhgcet/stg23ac56f7-9c1d-43d9-a90c-86036b3cbafc/y.pickle\n\u001b[1;30mINFO\u001b[0m [job get_prod_and_div] completed success\n\u001b[1;30mINFO\u001b[0m [step get_prod_and_div] completed success\n\u001b[1;30mINFO\u001b[0m [workflow ] starting step get_sum\n\u001b[1;30mINFO\u001b[0m [step get_sum] start\n\u001b[1;30mINFO\u001b[0m [job get_sum] /tmp/wzuzdwec$ python \\\n /tmp/lz9a89rn/stg44b61930-48fe-423d-a68a-593e237e0477/wrapper.py \\\n --function=workflow.get_sum \\\n --arg_x=/tmp/lz9a89rn/stgb7917545-93cd-45b4-833a-01559a22e620/prod.pickle \\\n --arg_y=/tmp/lz9a89rn/stg0c04cf0f-bc08-494d-ae4b-b12bde14f87a/div.pickle\n\u001b[1;30mINFO\u001b[0m [job get_sum] completed success\n\u001b[1;30mINFO\u001b[0m [step get_sum] completed success\n\u001b[1;30mINFO\u001b[0m [workflow ] completed success\n{\n \"result_file\": {\n \"location\": \"file:///home/jovyan/result.pickle\",\n \"basename\": \"result.pickle\",\n \"class\": \"File\",\n \"checksum\": \"sha1$3dfd802cefb317cc7138af1e3a299f565c74ddec\",\n \"size\": 21,\n \"path\": \"/home/jovyan/result.pickle\"\n }\n}\u001b[1;30mINFO\u001b[0m Final process status is success\n"}],"execution_count":19},{"id":"2942dbba-ea0a-4d20-be5c-ed9992d09ff8","cell_type":"code","source":"with open(\"result.pickle\", \"rb\") as f:\n print(pickle.load(f))","metadata":{"trusted":true},"outputs":[{"name":"stdout","output_type":"stream","text":"2.5\n"}],"execution_count":20},{"id":"60e909ee-d0d0-4bd1-81c8-dd5274ae5834","cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}
0 commit comments