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.69k stars 655 forks source link

Bugfix/cwd flag closes #1160 #1161

Closed dimidagd closed 9 months ago

dimidagd commented 12 months ago

closes #1160 # A bug was preventing the use of --cwd and --folder. More specifically a function call to Path(path1).relative_to(path2) , where path1 has been stripped of the trailing directories, resulted in a specific exception being raised.

How to test fix

Given a tree structure

project_root
        ├── notebooks
        │   ├── run_clearml.py

Running

clearml-task --project testing --name test_run --script notebooks/run_clearml.py --task-type testing  --folder $PWD --queue default --cwd notebooks

Expected behaviour

Creating new task
Repository Detected
{
  "repository": "###",
  "version_num": "5946cd78e5a69e0a6916af8fb734c907de5feace",
  "branch": "main",
  "working_dir": "notebooks",
  "entry_point": "run_clearml.py"
}

New task created id=9a140105541a40478b8e0dac87317d2b
eugen-ajechiloae-clearml commented 9 months ago

Hi @dimidagd ! I think this is a good change, but can you please make some changes such that the section you changed is a bit clearer? It's a bit hard to follow. You could add some comments that exemplifies what is going on in this section.

Also, looks like there are some conflicts, can you resolve those please?

jkhenning commented 9 months ago

@dimidagd any update on this?

dimidagd commented 9 months ago

Would you like some comments on the actual code changes?

[image: photo]

eugen-ajechiloae-clearml commented 9 months ago

@dimidagd yes, the section itself (even excluding the changes) is a bit hard to read. Can you please add a few comments that could make it a bit easier to follow?

dimidagd commented 9 months ago

@dimidagd yes, the section itself (even excluding the changes) is a bit hard to read. Can you please add a few comments that could make it a bit easier to follow?

Have added comments now.

jkhenning commented 9 months ago

@dimidagd it seems there are conflicts - can you please resolve them?