From 56d4de04e4e23af632a1410a694d0f73f1d41fd1 Mon Sep 17 00:00:00 2001 From: pollfly <75068813+pollfly@users.noreply.github.com> Date: Tue, 30 May 2023 15:40:43 +0300 Subject: [PATCH] Edit docstrings (#1024) --- clearml/logger.py | 34 +++++++++++++++++++--------------- clearml/task.py | 34 +++++++++++++++++----------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/clearml/logger.py b/clearml/logger.py index 884136a3..1c4159f6 100644 --- a/clearml/logger.py +++ b/clearml/logger.py @@ -309,7 +309,7 @@ class Logger(object): extra_data=None, # type: Optional[dict] ): """ - For explicit report, report a table plot. + For explicit reporting, report a table plot. One and only one of the following parameters must be provided. @@ -340,25 +340,29 @@ class Logger(object): See full details on the supported configuration: https://plotly.com/javascript/reference/layout/ For example: - .. code block:: py - logger.report_table( - title='table example', - series='pandas DataFrame', - iteration=0, - table_plot=df, - extra_layout={'height': 600}) + .. code-block:: py + + logger.report_table( + title='table example', + series='pandas DataFrame', + iteration=0, + table_plot=df, + extra_layout={'height': 600} + ) :param extra_data: optional dictionary for data configuration, like column width, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/table/ For example: - .. code block:: py - logger.report_table( - title='table example', - series='pandas DataFrame', - iteration=0, - table_plot=df, - extra_data={'columnwidth': [2., 1., 1., 1.]}) + .. code-block:: py + + logger.report_table( + title='table example', + series='pandas DataFrame', + iteration=0, + table_plot=df, + extra_data={'columnwidth': [2., 1., 1., 1.]} + ) """ mutually_exclusive( diff --git a/clearml/task.py b/clearml/task.py index 5e72e3e5..a876b636 100644 --- a/clearml/task.py +++ b/clearml/task.py @@ -1703,30 +1703,30 @@ class Task(_Task): :param total_num_nodes: The total number of nodes to be enqueued, including the master node, which should already be enqueued when running remotely - :param port: Port opened by the master node. If the environment variable `CLEARML_MULTI_NODE_MASTER_DEF_PORT` - is set, the value of this parameter will be set to the one defined in `CLEARML_MULTI_NODE_MASTER_DEF_PORT`. - If `CLEARML_MULTI_NODE_MASTER_DEF_PORT` doesn't exist, but `MASTER_PORT` does, then the value of this - parameter will be set to the one defined in `MASTER_PORT`. If neither environment variables exist, + :param port: Port opened by the master node. If the environment variable ``CLEARML_MULTI_NODE_MASTER_DEF_PORT`` + is set, the value of this parameter will be set to the one defined in ``CLEARML_MULTI_NODE_MASTER_DEF_PORT``. + If ``CLEARML_MULTI_NODE_MASTER_DEF_PORT`` doesn't exist, but ``MASTER_PORT`` does, then the value of this + parameter will be set to the one defined in ``MASTER_PORT``. If neither environment variables exist, the value passed to the parameter will be used - :param queue: The queue to enqueue the nodes to. Can be different than the queue the master + :param queue: The queue to enqueue the nodes to. Can be different from the queue the master node is enqueued to. If None, the nodes will be enqueued to the same queue as the master node :param wait: If True, the master node will wait for the other nodes to start :param addr: The address of the master node's worker. If the environment variable - `CLEARML_MULTI_NODE_MASTER_DEF_ADDR` is set, the value of this parameter will be set to - the one defined in `CLEARML_MULTI_NODE_MASTER_DEF_ADDR`. - If `CLEARML_MULTI_NODE_MASTER_DEF_ADDR` doesn't exist, but `MASTER_ADDR` does, then the value of this - parameter will be set to the one defined in `MASTER_ADDR`. If neither environment variables exist, + ``CLEARML_MULTI_NODE_MASTER_DEF_ADDR`` is set, the value of this parameter will be set to + the one defined in ``CLEARML_MULTI_NODE_MASTER_DEF_ADDR``. + If ``CLEARML_MULTI_NODE_MASTER_DEF_ADDR`` doesn't exist, but ``MASTER_ADDR`` does, then the value of this + parameter will be set to the one defined in ``MASTER_ADDR``. If neither environment variables exist, the value passed to the parameter will be used. If this value is None (default), the private IP of the machine the master node is running on will be used. - :return: A dictionary containing relevant information regarding the multi node run. This dictionary - has the following entries: - - `master_addr` - the address of the machine that the master node is running on - - `master_port` - the open port of the machine that the master node is running on - - `total_num_nodes` - the total number of nodes, including the master - - `queue` - the queue the nodes are enqueued to, excluding the master - - `node_rank` - the rank of the current node (master has rank 0) - - `wait` - if True, the master node will wait for the other nodes to start + :return: A dictionary containing relevant information regarding the multi node run. This dictionary has the following entries: + + - `master_addr` - the address of the machine that the master node is running on + - `master_port` - the open port of the machine that the master node is running on + - `total_num_nodes` - the total number of nodes, including the master + - `queue` - the queue the nodes are enqueued to, excluding the master + - `node_rank` - the rank of the current node (master has rank 0) + - `wait` - if True, the master node will wait for the other nodes to start """ def set_launch_multi_node_runtime_props(task, conf): # noinspection PyProtectedMember