Fix poetry toml file without requirements.txt (issue #444)

This commit is contained in:
allegroai 2021-09-02 15:49:11 +03:00
parent 6e15349b76
commit 7dc88cfb15
2 changed files with 3 additions and 2 deletions

View File

@ -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()))

View File

@ -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