mirror of
https://github.com/clearml/clearml
synced 2025-02-24 13:17:03 +00:00
Improve force_requirements_env_freeze docstring (#1225)
This commit is contained in:
parent
2ac637bfc6
commit
b295d0177c
@ -2305,13 +2305,14 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
def force_requirements_env_freeze(cls, force=True, requirements_file=None):
|
def force_requirements_env_freeze(cls, force=True, requirements_file=None):
|
||||||
# type: (bool, Optional[Union[str, Path]]) -> None
|
# type: (bool, Optional[Union[str, Path]]) -> None
|
||||||
"""
|
"""
|
||||||
Force using `pip freeze` / `conda list` to store the full requirements of the active environment
|
Force the use of ``pip freeze`` or ``conda list`` to capture the requirements from the active
|
||||||
(instead of statically analyzing the running code and listing directly imported packages)
|
environment (instead of statically analyzing the running code and listing directly imported packages).
|
||||||
Notice: Must be called before `Task.init` !
|
Notice: Must be called before `Task.init` !
|
||||||
|
|
||||||
:param force: Set force using `pip freeze` flag on/off
|
:param force: If ``True`` (default), force the use of ``pip freeze`` or ``conda list`` to capture the
|
||||||
:param requirements_file: Optional pass requirements.txt file to use (instead of `pip freeze` or automatic
|
requirements. If ``False``, ClearML statistically analyzes the code for requirements.
|
||||||
analysis)
|
:param requirements_file: (Optional) Pass a requirements.txt file to specify the required packages (instead of
|
||||||
|
``pip freeze`` or automatic analysis). This will overwrite any existing requirement listing.
|
||||||
"""
|
"""
|
||||||
cls._force_use_pip_freeze = requirements_file if requirements_file else bool(force)
|
cls._force_use_pip_freeze = requirements_file if requirements_file else bool(force)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user