madminer-tool / madminer-workflow

Madminer complete cloud-based analysis
MIT License
4 stars 4 forks source link

Fix MLFlow local storage of metrics #40

Closed Sinclert closed 3 years ago

Sinclert commented 3 years ago

This issue describes the mandatory requirement of an up-and-running MLFlow Tracking server when using REANA to deploy the workflow. This requirement should not be mandatory, and an alternative way of locally storing the MLFlow generated metrics must be found.


Issue

Currently, REANA-target runs needs the set-up of a MLFLOW_TRACKING_URI valid URL when configuring the environment where the workflow will be launched. This value gets picked up by the Makefile high-level command to inject it into the environment where the contains will be executed.

If there is no MLFLOW_TRACKING_URI specified, the workflow steps try to store those metrics on the Docker containers local file system, which is forbidden under the user privileges those containers are run.


Proposal

After a Zoom call between @cranmer, @irinaespejo and myself, we agreed to try to inject the implicitly set up WORKDIR environment variable that both REANA and Yadage natively provide, into the MLFLOW_TRACKING_URI that the user may have specified.

It is important to consider that this should only happens when the MLFLOW_TRACKING SERVER is not provided, or it is provided but points to the local file-system (file://...). Therefore, there needs to be some logic differentiating this case for the one where a valid remote URL is specified (https://...).


Necessary changes:

Changes need to be applied into 2 repositories:

Sinclert commented 3 years ago

Given the initial testing by Irina, this seems to be solved 🚀

Let me know if it is not the case.

cranmer commented 3 years ago

also worked for me 👍