allegroai / clearml

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution
https://clear.ml/docs
Apache License 2.0
5.71k stars 657 forks source link

Clearml does not respect diffs in requirements.txt #445

Open InCogNiTo124 opened 3 years ago

InCogNiTo124 commented 3 years ago

If I change requirements.txt and not commit the changes, ClearML disregards the uncomitted changes as installs older packages.

The wanted behaviour is to apply the uncommited changes for requirements.txt before installing requirements

bmartinn commented 3 years ago

Hi @InCogNiTo124

CearML disregards the uncomitted changes as installs older packages.

Notice that if you have packages under the "Installed Packages" section of the Task the agent will ignore the "requirements.txt" and install only the listed packages. If you want the agent to use the repo "requirements.txt" you can:

  1. Clear the "Installed packages" section (when you hove over it you should have a button for that)
  2. Since the format of the "installed packages" is compatible to a requirements.txt format, you can edit in the UI, and add a line -r requirements.txt which will add the requirements.txt at runtime (by the agent). You can do the same programmatically with: Task.add_requirements("-r requirements.txt") notice it has to be called Before the Task.init(...) call
InCogNiTo124 commented 3 years ago

Hi @InCogNiTo124

CearML disregards the uncomitted changes as installs older packages.

Notice that if you have packages under the "Installed Packages" section of the Task the agent will ignore the "requirements.txt" and install only the listed packages. If you want the agent to use the repo "requirements.txt" you can:

  1. Clear the "Installed packages" section (when you hove over it you should have a button for that)
  2. Since the format of the "installed packages" is compatible to a requirements.txt format, you can edit in the UI, and add a line -r requirements.txt which will add the requirements.txt at runtime (by the agent). You can do the same programmatically with: Task.add_requirements("-r requirements.txt") notice it has to be called Before the Task.init(...) call

Hey, it seems that Task.add_requirements("-r requirements.txt") does not work at all; somehow, and we do not know why, the space gets propagated and the system tries to load the requirements.txt file instead of requirements.txt. Notice the starting space in the filename.

We successfully fixed it by two different approaches:

  1. Task.add_requirements("-rrequirements.txt") works (lack of space)
  2. Alternatively, for our use case we wanted Task.force_requirements_env_freeze(False, "requirements.txt") which we'll be using further on
jkhenning commented 3 years ago

Hi @InCogNiTo124 ,

it seems that Task.add_requirements("-r requirements.txt") does not work at all; somehow, and we do not know why, the space gets propagated and the system tries to load the requirements.txt file instead of requirements.txt. Notice the starting space in the filename.

I think the formatting messed things up here - I assume you mean the file the system tried to load is " requirements.txt"? We'll take a look at the code to figure it out 🙂

InCogNiTo124 commented 3 years ago

@jkhenning yes that is correct, thank you

bmartinn commented 3 years ago

Hi @InCogNiTo124

it seems that Task.add_requirements("-r requirements.txt") does not work at all;

My apologies, you need the latest cleaml-agent RC for "-r" support, could you try with:

pip install clearml-agent==1.0.1rc5
InCogNiTo124 commented 3 years ago

Hi @InCogNiTo124

it seems that Task.add_requirements("-r requirements.txt") does not work at all;

My apologies, you need the latest cleaml-agent RC for "-r" support, could you try with:

pip install clearml-agent==1.0.1rc5

Thank you for the offer but we'll wait for v1.0.1