# Renku-mls doesn't export the graph into the knowledgegraph

**URL:** <https://renku.discourse.group/t/renku-mls-doesnt-export-the-graph-into-the-knowledgegraph/1057>\
**Category:** General\
**Created:** [17 June 2024 13:48 UTC](https://renku.discourse.group/t/renku-mls-doesnt-export-the-graph-into-the-knowledgegraph/1057 "2024-06-17T13:48:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![micloc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/micloc/32/818_2.png) [@micloc](https://renku.discourse.group/u/micloc)\
**Post date:** [17 June 2024 13:48 UTC](https://renku.discourse.group/t/renku-mls-doesnt-export-the-graph-into-the-knowledgegraph/1057/1 "2024-06-17T13:48:14Z")

</div>

Hi together

We would like to use your plugin “Renku MLS” to log and track models. We will follow your example: [GitHub - SwissDataScienceCenter/renku-mls: MLSchema plugin for Renku](https://github.com/SwissDataScienceCenter/renku-mls) to export the specified model parameters. The problem is as follows:

**Trial run without renku command: in the CLI, “python main.py” leads to the following results** :  
a example “8738071270117.jsonld” is created with all the desired data in the .renku/ml/latest folder. However, the file cannot be found / or is not migrated to your knowledegraph and therefore the following command “renku mls params” cannot query query the Knowledge Graph to list the hyper-parameter settings of our models. The command should read the generated `.jsonld` file and extract the required metadata. But it doesn’t. I guessed this could be because it is not run via “renku run” to effectively create a knowledgegraph.

**Trial run with renku command: in the CLI “renku run workflow.yml” leads to the following results:**  
we encounter a bug:  
xdg-open: no method available for opening '[Sign in to GitHub · GitHub](https://github.com/SwissDataScienceCenter/renku-python/issues/new?title=cli%3A+renku+run+workflow.yml&body=%23%23+Describe+the+bug%0AA+clear+and+concise+description.%0A%0A%23%23+Details%0A%2APlease+verify+and+redact+the+details.%2A%0A%0A%2A%2ARenku+version%3A%2A%2A+2.9.2%0A%2A%2AOS%3A%2A%2A+Linux+%28%23117-Ubuntu+SMP+Fri+Apr+26+12%3A26%3A49+UTC+2024%29%0A%2A%2APython%3A%2A%2A+3.9.13%0A%0A%23%23%23+Traceback%0A%0A%60%60%60%0ATraceback+%28most+recent+call+last%29%3A%0A++File+%22%5B...%5D%2Fsite-packages%2Fpluggy%2F_callers.py%22%2C+line+77%2C+in+_multicall%0A++++res+%3D+hook_impl.function%28%2Aargs%29%0A++File+%22%5B...%5D%2Fsite-packages%2Frenkumls%2Fplugin.py%22%2C+line+72%2C+in+activity_annotations%0A++++return+mls.annotations%0A++File+%22%5B...%5D%2Fsite-packages%2Frenkumls%2Fplugin.py%22%2C+line+60%2C+in+annotations%0A++++mls_annotation+%3D+self._load_model%28p%29%0A++File+%22%5B...%5D%2Fsite-packages%2Frenkumls%2Fplugin.py%22%2C+line+50%2C+in+_load_model%0A++++return+json.load%28path.open%28%29%29%0A++File+%22%5B...%5D%2Fpathlib.py%22%2C+line+1252%2C+in+open%0A++++return+io.open%28self%2C+mode%2C+buffering%2C+encoding%2C+errors%2C+newline%2C%0AIsADirectoryError%3A+%5BErrno+21%5D+Is+a+directory%3A+%27%2Fopt%2Fgurobi%2Fwork%2Fpilot-matlab-gurobi%2F.renku%2Fml%2Flatest%2F.ipynb_checkpoints%27%0A%60%60%60%0A%0A%23%23+Additional+context%0AAdd+any+other+context+about+the+problem).  
furthermore, inside the output folder: ‘.renku/ml/latest’ a new folder is created ‘.ipynb.checkpoints’ with the new exported file: 8757505264216-checkpoint.jsonld.

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/af188ca9490c4dfb44840dff2e1dcf034f2ea60e.png)  
if we rerun the command ‘renku run workflow.yml’. inside this “.ipynb.checkpoints” a new .jsonId is generated plus a new folder named ‘.ipynb.checkpoint’. Furthermore the statement “renku mls params” still doesn’t display any values.

I am not sure if this behavior is normal. I also would appreciate to know how to access your knowledgegraph to check if the metadata migration into the project specific knowledgraph was successful.

In case you need furhter information or my description wasn’t clear, let me know.

thanks for your help,  
Michael

---

<div class="post-metadata">

**Author:** ![ralf.grubenmann](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/ralf.grubenmann/32/78_2.png) [@ralf.grubenmann](https://renku.discourse.group/u/ralf.grubenmann)\
**Post date:** [21 June 2024 12:29 UTC](https://renku.discourse.group/t/renku-mls-doesnt-export-the-graph-into-the-knowledgegraph/1057/2 "2024-06-21T12:29:23Z")

</div>

Hi Michael,

the way this is supposed to work is:

- renku run starts the command in the workflow
- the command tracks things with mls, which writes to that folder
- when the command finishes, it returns control back to renku
- renku reads all files in that directory to add them to the metadata

In this case it seems jupyterlab created a checkpoint folder in the ml directory, which is not something the plugin understands. I’m not sure why jupyterlab created that checkpoint, usually it does that when the user navigates to the folder/opens files there.

You could try to just delete the whole `.renku/ml/` folder (just not the parent `.renku` folder itself) and `renku run` again.  
If there is no error, the metadata should be there and the way to check is with the `renku mls` command, there’s not really an easy other way to check.
