mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Edit docstring formatting and spacing (#1403)
This commit is contained in:
parent
95baa6ba16
commit
b6d358c1f4
@ -580,23 +580,58 @@ class TaskScheduler(BaseScheduler):
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
Launch every 15 minutes
|
Launch every 15 minutes:
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', minute=15)
|
add_task(schedule_task_id='1235', queue='default', minute=15)
|
||||||
Launch every 1 hour
|
|
||||||
|
Launch every 1 hour:
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', hour=1)
|
add_task(schedule_task_id='1235', queue='default', hour=1)
|
||||||
Launch every 1 hour at hour:30 minutes (i.e. 1:30, 2:30 etc.)
|
|
||||||
|
Launch every 1 hour at hour:30 minutes (i.e. 1:30, 2:30 etc.):
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', hour=1, minute=30)
|
add_task(schedule_task_id='1235', queue='default', hour=1, minute=30)
|
||||||
Launch every day at 22:30 (10:30 pm)
|
|
||||||
|
Launch every day at 22:30 (10:30 pm):
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', minute=30, hour=22, day=1)
|
add_task(schedule_task_id='1235', queue='default', minute=30, hour=22, day=1)
|
||||||
Launch every other day at 7:30 (7:30 am)
|
|
||||||
|
Launch every other day at 7:30 (7:30 am):
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', minute=30, hour=7, day=2)
|
add_task(schedule_task_id='1235', queue='default', minute=30, hour=7, day=2)
|
||||||
Launch every Saturday at 8:30am (notice `day=0`)
|
|
||||||
|
Launch every Saturday at 8:30am (notice `day=0`):
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', minute=30, hour=8, day=0, weekdays=['saturday'])
|
add_task(schedule_task_id='1235', queue='default', minute=30, hour=8, day=0, weekdays=['saturday'])
|
||||||
Launch every 2 hours on the weekends Saturday/Sunday (notice `day` is not passed)
|
|
||||||
|
Launch every 2 hours on the weekends Saturday/Sunday (notice `day` is not passed):
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', hour=2, weekdays=['saturday', 'sunday'])
|
add_task(schedule_task_id='1235', queue='default', hour=2, weekdays=['saturday', 'sunday'])
|
||||||
Launch once a month at the 5th of each month
|
|
||||||
|
Launch once a month at the 5th of each month:
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', month=1, day=5)
|
add_task(schedule_task_id='1235', queue='default', month=1, day=5)
|
||||||
Launch once a year on March 4th
|
|
||||||
|
Launch once a year on March 4th:
|
||||||
|
|
||||||
|
.. code-block:: py
|
||||||
|
|
||||||
add_task(schedule_task_id='1235', queue='default', year=1, month=3, day=4)
|
add_task(schedule_task_id='1235', queue='default', year=1, month=3, day=4)
|
||||||
|
|
||||||
:param schedule_task_id: ID of Task to be cloned and scheduled for execution
|
:param schedule_task_id: ID of Task to be cloned and scheduled for execution
|
||||||
|
@ -2467,12 +2467,18 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
"""
|
"""
|
||||||
Force the adding of a package to the requirements list. If ``package_version`` is None, use the
|
Force the adding of a package to the requirements list. If ``package_version`` is None, use the
|
||||||
installed package version, if found.
|
installed package version, if found.
|
||||||
Example: Task.add_requirements('tensorflow', '2.4.0')
|
|
||||||
Example: Task.add_requirements('tensorflow', '>=2.4')
|
Example: ``Task.add_requirements('tensorflow', '2.4.0')``
|
||||||
Example: Task.add_requirements('tensorflow') -> use the installed tensorflow version
|
|
||||||
Example: Task.add_requirements('tensorflow', '') -> no version limit
|
Example: ``Task.add_requirements('tensorflow', '>=2.4')``
|
||||||
Alternatively, you can add all requirements from a file.
|
|
||||||
Example: Task.add_requirements('/path/to/your/project/requirements.txt')
|
Example: ``Task.add_requirements('tensorflow')`` -> use the installed tensorflow version
|
||||||
|
|
||||||
|
Example: ``Task.add_requirements('tensorflow', '')`` -> no version limit
|
||||||
|
|
||||||
|
Alternatively, you can add all requirements from a file:
|
||||||
|
|
||||||
|
Example: ``Task.add_requirements('/path/to/your/project/requirements.txt')``
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Task.add_requirements does not directly modify the task's requirements. Instead, it improves the accuracy
|
Task.add_requirements does not directly modify the task's requirements. Instead, it improves the accuracy
|
||||||
|
@ -448,8 +448,7 @@ class Task(_Task):
|
|||||||
- ``True`` - Automatically create resource monitoring plots. (default)
|
- ``True`` - Automatically create resource monitoring plots. (default)
|
||||||
- ``False`` - Do not automatically create.
|
- ``False`` - Do not automatically create.
|
||||||
- Class Type - Create ResourceMonitor object of the specified class type.
|
- Class Type - Create ResourceMonitor object of the specified class type.
|
||||||
- dict - Dictionary of kwargs to be passed to the ResourceMonitor instance.
|
- dict - Dictionary of kwargs to be passed to the ResourceMonitor instance. The keys can be:
|
||||||
The keys can be:
|
|
||||||
- `report_start_sec` OR `first_report_sec` OR `seconds_from_start` - Maximum number of seconds
|
- `report_start_sec` OR `first_report_sec` OR `seconds_from_start` - Maximum number of seconds
|
||||||
to wait for scalar/plot reporting before defaulting
|
to wait for scalar/plot reporting before defaulting
|
||||||
to machine statistics reporting based on seconds from experiment start time
|
to machine statistics reporting based on seconds from experiment start time
|
||||||
@ -459,8 +458,8 @@ class Task(_Task):
|
|||||||
- `max_wait_for_first_iteration_to_start_sec` - Set the maximum time (seconds) to allow the resource
|
- `max_wait_for_first_iteration_to_start_sec` - Set the maximum time (seconds) to allow the resource
|
||||||
monitoring to revert back to iteration reporting x-axis after starting to report `seconds_from_start`
|
monitoring to revert back to iteration reporting x-axis after starting to report `seconds_from_start`
|
||||||
- `report_mem_used_per_process` OR `report_global_mem_used` - Compatibility feature,
|
- `report_mem_used_per_process` OR `report_global_mem_used` - Compatibility feature,
|
||||||
report memory usage for the entire machine
|
report memory usage for the entire machine.
|
||||||
default (false), report only on the running process and its sub-processes
|
Default (false), report only on the running process and its sub-processes
|
||||||
|
|
||||||
:param auto_connect_streams: Control the automatic logging of stdout and stderr.
|
:param auto_connect_streams: Control the automatic logging of stdout and stderr.
|
||||||
The values are:
|
The values are:
|
||||||
|
Loading…
Reference in New Issue
Block a user