clearml icon indicating copy to clipboard operation
clearml copied to clipboard

Allow a script to `create()` & `enqueue()` a script from another repo

Open federicovallucci opened this issue 3 years ago • 2 comments
trafficstars

Following this thread in the Slack of clearml https://app.slack.com/client/TT9ATQXJ5/activity-page/thread/CTK20V944-1651522011.920739, I open this issue.

To sum up I would like to know if it is possible:

case A : my running application (whose source code is in ./git/repo_1/) wants to launch a simple clearml task (python script withTask.init() ) whose source code is ./git/repo_2 and specify branch, script and requirments_file ... the requirements_file is in repo_2

case B : my running application (whose source code is in ./git/repo_1/) wants to create a controller (with components using this syntax, https://www.youtube.com/watch?v=UVBk337xzZo) whose source code is ./git/repo_2 and specify branch, script and requirments_file ... the requirements_file is in repo_2

The real case usage is an API repository and a machine learning repository.

federicovallucci avatar May 16 '22 13:05 federicovallucci

To be specific, the behaviour @federicovallucci is talking about is similar to what happens below: https://github.com/milongo/dummy_test/blob/master/dummy_create_enqueue.py

I had talked to @bmartinn about it a couple of weeks ago.

milongo avatar May 18 '22 21:05 milongo

Hi @federicovallucci and @milongo,

You guys are right :) This is on our roadmap. We'll update here once it's out!

erezalg avatar Jun 23 '22 20:06 erezalg

Hi @federicovallucci ,

You can configure any task execution section with the set_script function:

            task.set_script(repository='https://github.com/allegroai/clearml.git,
                            branch='main',
                            working_dir='examples/reporting',
                            entry_point='artifacts.py')


So in your case, you just need to change the repository to ./git/repo_2 (If it's only the repo, you can also use set_repo).

Regarding the requirements file, you can use set_packages

shomratalon avatar Jan 02 '23 15:01 shomratalon