mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
Fix docstring format (#1223)
This commit is contained in:
parent
399f76ffa8
commit
f930b9fe53
@ -826,13 +826,14 @@ class BaseStrategy(metaclass=ABCMeta):
|
||||
) -> Optional[dict]:
|
||||
"""Load checkpoint or resume from checkpoint.
|
||||
|
||||
Keyword Args: load_from (str, optional): The checkpoint file to
|
||||
load from. Defaults to None. resume (bool or str): Whether
|
||||
to resume training. Defaults to False. If ``resume`` is True
|
||||
and ``load_from`` is None, automatically to find latest
|
||||
checkpoint from ``work_dir``. If not found, resuming does
|
||||
nothing. If ``resume`` is a string, it will be treated as the
|
||||
checkpoint file to resume from.
|
||||
Args:
|
||||
load_from (str, optional): The checkpoint file to load from.
|
||||
Defaults to None.
|
||||
resume (bool or str): Whether to resume training. Defaults to
|
||||
False. If ``resume`` is True and ``load_from`` is None,
|
||||
automatically to find latest checkpoint from ``work_dir``.
|
||||
If not found, resuming does nothing. If ``resume`` is a string,
|
||||
it will be treated as the checkpoint file to resume from.
|
||||
"""
|
||||
from mmengine.runner import find_latest_checkpoint
|
||||
|
||||
|
@ -42,7 +42,7 @@ FSDP_CONFIGS.register_module(module=LocalStateDictConfig)
|
||||
class FSDPStrategy(DDPStrategy):
|
||||
"""Support training model with FullyShardedDataParallel (FSDP).
|
||||
|
||||
Keyword Args::
|
||||
Keyword Args:
|
||||
model_wrapper (dict, optional): Config dict for model wrapper. The
|
||||
default configuration is:
|
||||
|
||||
|
@ -19,7 +19,7 @@ from mmengine.testing._internal import MultiProcessTestCase
|
||||
from mmengine.utils.dl_utils import TORCH_VERSION
|
||||
from mmengine.utils.version_utils import digit_version
|
||||
|
||||
if digit_version(TORCH_VERSION) >= digit_version('1.11.0'):
|
||||
if digit_version(TORCH_VERSION) >= digit_version('2.0.0'):
|
||||
from mmengine.model import MMFullyShardedDataParallel # noqa: F401
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user