From 7dc88cfb152cd3696c1daa7bb409fd2238bafb6f Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 2 Sep 2021 15:49:11 +0300 Subject: [PATCH] Fix poetry toml file without requirements.txt (issue #444) --- clearml/backend_interface/task/populate.py | 3 ++- clearml/task.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clearml/backend_interface/task/populate.py b/clearml/backend_interface/task/populate.py index b9c77861..2479d235 100644 --- a/clearml/backend_interface/task/populate.py +++ b/clearml/backend_interface/task/populate.py @@ -250,7 +250,8 @@ class CreateAndPopulate(object): elif not self.repo and repo_info and not repo_info.script.get('requirements'): # we are in local mode, make sure we have "requirements.txt" it is a must reqs_txt_file = Path(repo_info.script['repo_root']) / "requirements.txt" - if self.raise_on_missing_entries and not reqs_txt_file.is_file(): + poetry_toml_file = Path(repo_info.script['repo_root']) / "pyproject.toml" + if self.raise_on_missing_entries and not reqs_txt_file.is_file() and not poetry_toml_file.is_file(): raise ValueError( "requirements.txt not found [{}] " "Use --requirements or --packages".format(reqs_txt_file.as_posix())) diff --git a/clearml/task.py b/clearml/task.py index 99a0b317..36b39f9e 100644 --- a/clearml/task.py +++ b/clearml/task.py @@ -1088,7 +1088,7 @@ class Task(_Task): - Class type - A Class type, storing all class properties (excluding '_' prefix properties) - Object - A class instance, storing all instance properties (excluding '_' prefix properties) - :param str name: A section name associated with the connected object. Default: 'General' + :param str name: A section name associated with the connected object, if 'name' is None defaults to 'General' Currently only supported for `dict` / `TaskParameter` objects Examples: name='General' will put the connected dictionary under the General section in the hyper-parameters