{"id":2381,"date":"2014-07-22T05:51:20","date_gmt":"2014-07-22T05:51:20","guid":{"rendered":"https:\/\/notebooks.dataone.org\/?p=2381"},"modified":"2014-07-22T05:54:04","modified_gmt":"2014-07-22T05:54:04","slug":"week-5-provenance-reunion","status":"publish","type":"post","link":"https:\/\/notebooks.dataone.org\/prov-notebooks\/week-5-provenance-reunion\/","title":{"rendered":"Week 5 – Provenance Reunion"},"content":{"rendered":"

This week, I spent some time to find out what NoWorkflow can actually do for us. So first,\u00a0we start with a summary of NoWorkflow system including what kind of provenance can be captured and how we can access that. NoWorkflow system stores all the provenance captured in a local Sqlite database with the following tables (words in\u00a0italic are table names, FK stands for foreign key)<\/span>:<\/p>\n

Definition provenance (wf specification):<\/strong>
\nfunction_def<\/i>: with schema (id, name, trial_id(FK to id in trial))
\nobject<\/i>: with schema (id, name, type, function_def_id(FK to id in function_def)); three types: argument, globe and function calls (internal functions)<\/p>\n

Deployment provenance:<\/strong>
\nmodule: <\/i>list of Python modules been used
\ndependency<\/i>: showing which trial using which module
\nenvorinment_attr<\/i>: list of environmental attributes (JAVA_HOME, PID, etc.)<\/p>\n

Execution provenance:<\/strong>
\nfunction_activation<\/i>: same schema as in Prolog, FK to id in trial<\/i> and FK to id in itself for caller_id indicating function call hierarchy.
\nobject_value<\/i>: with schema (id, name, value, type, function_activation_id(FK to id in function_activation<\/i>)), two types: global and argument (indicating input data value to a function)
\nfile_access<\/i>: same schema as in Prolog, FK to id in trial<\/i> and FK to id in function_activation<\/i> indicating which function call triggered this file access<\/p>\n

Other auxiliary tables:<\/strong>
\ntrial: <\/i>with trial id been referenced as foreign key
\nsqlite_sequence:<\/i> <\/i><\/b>not sure is useful information or not<\/p>\n

Of course we\u00a0can directly query the Sqlite database to get the provenance information, but\u00a0NoWorkflow system have several options that the provenance information can be\u00a0exported into two different forms: Prolog rules and visualization graphs. Prolog rules have the same information of\u00a0function_activation <\/i>and\u00a0file_access\u00a0<\/i>with the same schema but we can use logic rules to query the provenance and even some rules are provided by the NoWorkflow system.\u00a0<\/span><\/i>The visualization graph only show information of function activations that\u00a0each node representing one function call, the edges indicating the control flow and the color of each node showing the relative runtime. An example as follows:<\/p>\n

\"Screenshot<\/a><\/p>\n

Another front is the use case from EVA WG. I’ve done with the translation from Matlab to Python, I will not say it’s a exact translation since some of the functions or configurations are slightly different between two languages, but the one I have will do 98% of the job. Here is an example output of the script in Python (dataset:\u00a0BIOME-BGC_RG1_V1_Monthly_GPP_NA_2010.nc4):<\/p>\n

\"sample_output\"<\/p>\n

One big challenge here is that testing or running the script against some large dataset is time and space consuming. Unfortunately, most of the NetCDF data sets we have is really large since it captures the whole dataset of certain simulations which usually spans across multiple years on a large area.<\/p>\n

Based on what we have\u00a0on both of the above fronts, I think it’s a good time for the “big reunion” of these two fronts that we can now start to study the provenance of that\u00a0particular use case. So the questions now is what kind of questions we can ask for this use case, how would provenance information helps us understand and improve this use case and of course how we achieve that.<\/p>\n

As a start point, I have run NoWorkflow system on the Python script, but the result is actually not very existing. The reason is because of the following: 1) the script only read one file and no output file, so the file access provenance is just one “line”, and 2) the script itself is not “function oriented”, which means it’s one big function with a large “for” statement. So the function definition and function activation provenance is very straightforward. I think we should think about at which level or how fine-grained we’d like to capture provenance and we can define different functions for each portion of the code so NoWorkflow system can treat each portion of the code as different functions.<\/p>\n

Though I wrote this Python script in iPython notebook but as I found several weeks ago, iPython notebook is not built to be a “heavy-duty” IDE and it’s difficult to split the script into different cells. So it’s one of the reasons why testing this script is little bit difficult and more importantly, there is not a lot of provenance information we can capture if we run the script in iPython notebook. But next week, I’ll start to look at two new tools we heard during Provenance Week 2014 last month. One tool is actually used to capture iPython notebook provenance, so that should be interesting and I’ll investigate how we can integrate this tool with ours.<\/p>\n

 <\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

This week, I spent some time to find out what NoWorkflow can actually do for us. So first,\u00a0we start with a summary of NoWorkflow system including what kind of provenance can be captured and how we can access that. NoWorkflow system stores all the provenance captured in a local Sqlite Continue reading Week 5 – Provenance Reunion<\/span>→<\/span><\/a><\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[275],"tags":[],"_links":{"self":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts\/2381"}],"collection":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/comments?post=2381"}],"version-history":[{"count":7,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts\/2381\/revisions"}],"predecessor-version":[{"id":2417,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/posts\/2381\/revisions\/2417"}],"wp:attachment":[{"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/media?parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/categories?post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notebooks.dataone.org\/wp-json\/wp\/v2\/tags?post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}