mirror of
https://github.com/clearml/clearml
synced 2025-02-11 23:33:21 +00:00
Add Task.set_packages docstring notes (#1224)
This commit is contained in:
parent
b295d0177c
commit
409c588373
@ -2267,6 +2267,11 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
Alternatively, you can add all requirements from a file.
|
Alternatively, you can add all requirements from a file.
|
||||||
Example: Task.add_requirements('/path/to/your/project/requirements.txt')
|
Example: Task.add_requirements('/path/to/your/project/requirements.txt')
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Task.add_requirements does not directly modify the task's requirements. Instead, it improves the accuracy
|
||||||
|
of capturing a task's Python packages. To explicitly change task requirements, use
|
||||||
|
Task.set_packages, which overwrites existing packages with the specified ones.
|
||||||
|
|
||||||
:param str package_name: The package name or path to a requirements file
|
:param str package_name: The package name or path to a requirements file
|
||||||
to add to the "Installed Packages" section of the task.
|
to add to the "Installed Packages" section of the task.
|
||||||
:param package_version: The package version requirements. If ``None``, then use the installed version.
|
:param package_version: The package version requirements. If ``None``, then use the installed version.
|
||||||
|
@ -1580,7 +1580,8 @@ class Task(_Task):
|
|||||||
def set_packages(self, packages):
|
def set_packages(self, packages):
|
||||||
# type: (Union[str, Path, Sequence[str]]) -> ()
|
# type: (Union[str, Path, Sequence[str]]) -> ()
|
||||||
"""
|
"""
|
||||||
Manually specify a list of required packages or a local requirements.txt file.
|
Manually specify a list of required packages or a local requirements.txt file. Note that this will
|
||||||
|
overwrite all existing packages.
|
||||||
|
|
||||||
When running remotely this call is ignored
|
When running remotely this call is ignored
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user