-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Splitting utils static docs by utils module Differential Revision: D49612893
- Loading branch information
1 parent
cd2c4f8
commit 52f7a1f
Showing
6 changed files
with
291 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,270 @@ | ||
Utils | ||
============= | ||
|
||
.. automodule:: torchtnt.utils | ||
:members: | ||
:undoc-members: | ||
Training related utilities. These are independent of the framework and can be used as needed. | ||
|
||
|
||
Device Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
.. currentmodule:: torchtnt.utils.device | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
get_device_from_env | ||
copy_data_to_device | ||
record_data_in_stream | ||
get_nvidia_smi_gpu_stats | ||
get_psutil_cpu_stats | ||
maybe_enable_tf32 | ||
|
||
|
||
Distributed Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
.. currentmodule:: torchtnt.utils.distributed | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
PGWrapper | ||
get_global_rank | ||
get_local_rank | ||
get_world_size | ||
barrier | ||
destroy_process_group | ||
get_process_group_backend_from_device | ||
get_file_init_method | ||
get_tcp_init_method | ||
all_gather_tensors | ||
rank_zero_fn | ||
revert_sync_batchnorm | ||
sync_bool | ||
|
||
|
||
Early Stop Checker | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
.. currentmodule:: torchtnt.utils.early_stop_checker | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
EarlyStopChecker | ||
|
||
|
||
Environment Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.env | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
init_from_env | ||
seed | ||
|
||
|
||
Flops Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.flops | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
FlopTensorDispatchMode | ||
|
||
|
||
Filesystem Spec Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.fsspec | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
get_filesystem | ||
|
||
|
||
Memory Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.memory | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
RSSProfiler | ||
measure_rss_deltas | ||
|
||
|
||
Module Summary Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.module_summary | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
ModuleSummary | ||
get_module_summary | ||
get_summary_table | ||
prune_module_summary | ||
|
||
|
||
OOM Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.oom | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
is_out_of_cpu_memory | ||
is_out_of_cuda_memory | ||
is_out_of_memory_error | ||
log_memory_snapshot | ||
attach_oom_observer | ||
|
||
|
||
Precision Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.precision | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
convert_precision_str_to_dtype | ||
|
||
|
||
Prepare Module Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.prepare_module | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
prepare_module | ||
prepare_ddp | ||
prepare_fsdp | ||
convert_str_to_strategy | ||
|
||
|
||
Progress Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.progress | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
Progress | ||
estimated_steps_in_epoch | ||
estimated_steps_in_loop | ||
estimated_steps_in_fit | ||
|
||
|
||
Rank Zero Log Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.rank_zero_log | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
rank_zero_print | ||
rank_zero_debug | ||
rank_zero_info | ||
rank_zero_warn | ||
rank_zero_error | ||
rank_zero_critical | ||
|
||
|
||
Stateful | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.stateful | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
Stateful | ||
|
||
|
||
Test Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.test_utils | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
get_pet_launch_config | ||
is_asan | ||
is_tsan | ||
skip_if_asan | ||
spawn_multi_process | ||
|
||
|
||
Timer Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.timer | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
log_elapsed_time | ||
TimerProtocol | ||
Timer | ||
FullSyncPeriodicTimer | ||
BoundedTimer | ||
get_timer_summary | ||
get_durations_histogram | ||
get_synced_durations_histogram | ||
get_synced_timer_histogram | ||
get_recorded_durations_table | ||
|
||
|
||
TQDM Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.tqdm | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
create_progress_bar | ||
update_progress_bar | ||
close_progress_bar | ||
|
||
|
||
Version Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. currentmodule:: torchtnt.utils.version | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
is_windows | ||
get_python_version | ||
get_torch_version | ||
|
||
|
||
Misc Utils | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
.. currentmodule:: torchtnt.utils.misc | ||
.. autosummary:: | ||
:toctree: generated | ||
:nosignatures: | ||
|
||
days_to_secs | ||
transfer_batch_norm_stats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters