Skip to content

Commit 7bf9222

Browse files
committed
small edits
1 parent a29212e commit 7bf9222

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/source/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Environment variables in the launcher process that match the ``default_env_vars`
100100
Custom logging
101101
--------------
102102
103-
We forward all logs (i.e. from :mod:`logging` and :mod:`sys.stdin`/:mod:`sys.stdout`) from workers and agents to the launcher. By default, the logs from the first agent and its first worker are printed into the launcher's ``stdout`` stream. Logs from all agents and workers are written to files in ``$TORCHRUNX_LOG_DIR`` (default: ``./torchrunx_logs``) and are named by timestamp, hostname, and local_rank.
103+
We forward all logs (i.e. from :mod:`logging` and :mod:`sys.stdout`/:mod:`sys.stderr`) from workers and agents to the launcher. By default, the logs from the first agent and its first worker are printed into the launcher's ``stdout`` stream. Logs from all agents and workers are written to files in ``$TORCHRUNX_LOG_DIR`` (default: ``./torchrunx_logs``) and are named by timestamp, hostname, and local_rank.
104104
105105
:mod:`logging.Handler` objects can be provided via the ``log_handlers`` argument to provide further customization (mapping specific agents/workers to custom output streams).
106106

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"sphinx.ext.linkcode",
2323
]
2424

25-
autodoc_mock_imports = ["torch", "fabric", "cloudpickle", "typing_extensions"]
25+
autodoc_mock_imports = ["torch", "fabric", "cloudpickle", "sys", "logging", "typing_extensions"]
2626
autodoc_typehints = "both"
2727
autodoc_typehints_description_target = "documented_params"
2828

src/torchrunx/utils/logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ def add_filter_to_handler(
4141
local_rank: int | None, # None indicates agent
4242
log_level: int = logging.NOTSET,
4343
) -> None:
44-
"""A filter for :mod:`logging.Handler` such that only specific agent/worker logs are handled.
44+
"""Apply a filter to :mod:`logging.Handler` so only specific worker logs are handled.
4545
4646
Args:
4747
handler: Handler to be modified.
4848
hostname: Name of specified host.
49-
local_rank: Rank of specified worker (or ``None`` for agent).
49+
local_rank: Rank of specified worker on host (or ``None`` for agent itself).
5050
log_level: Minimum log level to capture.
5151
"""
5252

0 commit comments

Comments
 (0)