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

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 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.
furthermore, inside the output folder: ‘.renku/ml/latest’ a new folder is created ‘.ipynb.checkpoints’ with the new exported file: 8757505264216-checkpoint.jsonld.


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

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.