misc#

Miscellaneous Helpers.

Functions

get_free_tcp_port

Get free socket port to use as MASTER_PORT.

is_model_deepspeed

Whether model is an instance of a DeepSpeedEngine.

is_notebook

Whether Composer is running in a IPython/Jupyter Notebook.

warning_on_one_line

Force Python warnings to consolidate into one line.

composer.utils.misc.get_free_tcp_port()[source]#

Get free socket port to use as MASTER_PORT.

composer.utils.misc.is_model_ddp(model)[source]#

Whether model is an instance of a DistributedDataParallel.

composer.utils.misc.is_model_deepspeed(model)[source]#

Whether model is an instance of a DeepSpeedEngine.

composer.utils.misc.is_notebook()[source]#

Whether Composer is running in a IPython/Jupyter Notebook.

composer.utils.misc.warning_on_one_line(message, category, filename, lineno, file=None, line=None)[source]#

Force Python warnings to consolidate into one line.