UReport

Urgap offers a standardized way to investigate meta data, retrieve files, and visualize execution via the class, the urgap.ureport

[ ]:
import urgap
[ ]:
wid = "u_writhing_minister_calculates_near_growth"
[ ]:
ur = urgap.UReport(wid=wid)

The UReport uses the UMeta interface to retrieve

  • the history of the execution (run time, etc.)

  • the execution traces (which parameter was used in which node with which input files creating which output files)

The most common way to use a UReport is by investigating a specific “wid”. However, one can also intialize the UReport using e.g. an object_name or node_exe_id.

The node_exe_id is urgap generated output file name consistent of

<wrapper_name>_<wrapper_version>_<md5_hash_of_parameters_that_trigger_rerun>/<md5_of_input_files>

One can list all node_exe_ids in the ureport using its attribute:

[ ]:
ur.node_exe_ids

Equaly, since one can initialize the UReport also with node_exe_ids, one can get a list of wids that executed or skipped a specific node execution.

[ ]:
ur.wids
[ ]:
for node_exe_id, wid in list(ur.uhistory.keys()):
    ut = ur.get_trace(node_exe_id, wid)
    print(node_exe_id)

One can get the specific utrace that was created during runtime using:

[ ]:
ut = ur.get_trace(node_exe_id=list(ur.node_exe_ids)[0], wid=wid)

See urgap.UTrace for more detail about the utrace.

Common operations are for example:

[ ]:
ut.unode_meta
[ ]:

One can visualize the execution graph in jupyter by executing:

[ ]:
ur.draw_execution_dag()

From this graph one can identify which files were produced by which node. For example, hovering over the simplified dag with alias plot, one can see that each node has an alias - an integer.

[ ]:
ulist = ur.query_node_outputs_by_aliases(nodes={0: []})
[ ]:
ulist

This urgap UFile list has UFiles and those can be used to retreive the files as well, e.g.:

[ ]:
ulist[0].path

Note: If one just wants to visualize the execution graph and some run time information, one can equally use the uctl command like:

uctl dashboard wid u_writhing_minister_calculates_near_growth