Hi Facundo,
Thanks again! I have managed to get my code running on Azure using the job definition YAML file like you proposed.
However, I am still struggling about using the same train.py file for both locally and running on Azure.
If I place the following code inside the train.py file, I can run the train.py file locally with the command you proposed and everything is logged on Azure just as it should be.
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace)
tracking_uri = ml_client.workspaces.get(name=workspace).mlflow_tracking_uri
mlflow.set_tracking_uri(tracking_uri)
experiment_name = 'pytorch-test-yml'
mlflow.set_experiment(experiment_name)
However, if I have this code snipped inside my train.py function I cannot run the train.py file on Azure anymore using the YAML file. I get some errors on Azure about the credentials that I do not understand. I have included a screenshot of the error.
Is it your idea to place this code snippet inside the train.py file or where do you mean to place it? If I understood it correctly so far, I do not need that code if I run my code with the YAML file on Azure but I do need it if I run the file locally.
Best regards and thank you so much!