MCPcopy Create free account

hub / github.com/open-mmlab/mmengine / types & classes

Types & classes482 in github.com/open-mmlab/mmengine

↓ 68 callersClassRegistry
A registry to map strings to classes or functions. Registered object could be built from registry. Meanwhile, registered functions could be c
mmengine/registry/registry.py:18
↓ 52 callersClassBaseDataElement
A base data interface that supports Tensor-like and dict-like operations. A typical data elements refer to predicted results or ground truth
mmengine/structures/base_data_element.py:9
↓ 46 callersClassOptimWrapper
Optimizer wrapper provides a common interface for updating parameters. Optimizer wrapper provides a unified interface for single precision tr
mmengine/optim/optimizer/optimizer_wrapper.py:17
↓ 43 callersClassPetrelBackend
Petrel storage backend (for internal usage). PetrelBackend supports reading and writing data to multiple clusters. If the file path contains
mmengine/fileio/backends/petrel_backend.py:16
↓ 37 callersClassCheckpointHook
Save checkpoints periodically. Args: interval (int): The saving period. If ``by_epoch=True``, interval indicates epochs, othe
mmengine/hooks/checkpoint_hook.py:22
↓ 34 callersClassBaseDataset
r"""BaseDataset for open source projects in OpenMMLab. The annotation format is shown as follows. .. code-block:: none {
mmengine/dataset/base_dataset.py:120
↓ 32 callersClassRunner
A training helper for PyTorch. Runner object can be built from config by ``runner = Runner.from_cfg(cfg)`` where the ``cfg`` usually contains
mmengine/runner/runner.py:77
↓ 29 callersClassConfig
A facility for config and config files. It supports common file formats as configs: python/json/yaml. ``Config.fromfile`` can parse a diction
mmengine/config/config.py:352
↓ 28 callersClassOptimWrapperDict
A dictionary container of :obj:`OptimWrapper`. If runner is training with multiple optimizers, all optimizer wrappers should be managed by :o
mmengine/optim/optimizer/optimizer_wrapper_dict.py:11
↓ 27 callersClassVisualizer
MMEngine provides a Visualizer class that uses the ``Matplotlib`` library as the backend. It has the following functions: - Basic drawing met
mmengine/visualization/visualizer.py:32
↓ 26 callersClassFileClient
A general file client to access files in different backends. The client loads a file or text in a specified backend from its path and returns
mmengine/fileio/file_client.py:29
↓ 26 callersClassHook
Base hook class. All hooks should inherit from this class.
mmengine/hooks/hook.py:9
↓ 24 callersClassFlopAnalyzer
Provides access to per-submodule model flop count obtained by tracing a model with pytorch's jit tracing functionality. By default, comes wit
mmengine/analysis/complexity_analysis.py:52
↓ 23 callersClassConfigDict
A dictionary for config which has the same interface as python's built- in dictionary and can be used as a normal dictionary. The Config clas
mmengine/config/config.py:62
↓ 22 callersClassLoggerHook
Collect logs from different components of ``Runner`` and write them to terminal, JSON file, tensorboard and wandb .etc. ``LoggerHook`` is use
mmengine/hooks/logger_hook.py:24
↓ 21 callersClassDefaultOptimWrapperConstructor
Default constructor for optimizers. By default, each parameter share the same optimizer settings, and we provide an argument ``paramwise_cfg`
mmengine/optim/optimizer/default_constructor.py:20
↓ 20 callersClassLocalBackend
Raw local storage backend.
mmengine/fileio/backends/local_backend.py:13
↓ 19 callersClassLazyObject
LazyObject is used to lazily initialize the imported module during parsing the configuration file. During parsing process, the syntax like:
mmengine/config/lazy.py:8
↓ 18 callersClassHistoryBuffer
Unified storage format for different log types. ``HistoryBuffer`` records the history of log for further statistics. Examples: >>> h
mmengine/logging/history_buffer.py:8
↓ 17 callersClassEarlyStoppingHook
Early stop the training when the monitored metric reached a plateau. Args: monitor (str): The monitored metric key to decide early stoppi
mmengine/hooks/early_stopping_hook.py:13
↓ 16 callersClassLogProcessor
A log processor used to format log information collected from ``runner.message_hub.log_scalars``. ``LogProcessor`` instance is built by runne
mmengine/runner/log_processor.py:18
↓ 16 callersClassToyModel
tests/test_model/test_base_model/test_base_model.py:39
↓ 15 callersClassAmpOptimWrapper
A subclass of :class:`OptimWrapper` that supports automatic mixed precision training based on torch.cuda.amp. ``AmpOptimWrapper`` provides a
mmengine/optim/optimizer/amp_optimizer_wrapper.py:24
↓ 15 callersClassEvaluator
Wrapper class to compose multiple :class:`BaseMetric` instances. Args: metrics (dict or BaseMetric or Sequence): The config of metrics.
mmengine/evaluator/evaluator.py:11
↓ 15 callersClassFSDPStrategy
Support training model with FullyShardedDataParallel (FSDP). Keyword Args: model_wrapper (dict, optional): Config dict for model wrapper.
mmengine/_strategy/fsdp.py:44
↓ 15 callersClassProfilerHook
A hook to analyze performance during training and inference. PyTorch Profiler is a tool that allows the collection of the performance metrics
mmengine/hooks/profiler_hook.py:27
↓ 15 callersClassToyInferencer
tests/test_infer/test_infer.py:25
↓ 14 callersClassReduceOnPlateauLR
Reduce the learning rate of each parameter group when a metric has stopped improving. Models often benefit from reducing the learning rate by
mmengine/optim/scheduler/lr_scheduler.py:326
↓ 14 callersClassReduceOnPlateauMomentum
Reduce the momentum of each parameter group when a metric has stopped improving. Models often benefit from reducing the momentum by a factor of
mmengine/optim/scheduler/momentum_scheduler.py:292
↓ 14 callersClassReduceOnPlateauParamScheduler
Reduce the parameters of each parameter group when a metric has stopped improving. Models often benefit from reducing the parameters by a factor o
mmengine/optim/scheduler/param_scheduler.py:1289
↓ 13 callersClassMultiStepLR
Decays the specified learning rate in each parameter group by gamma once the number of epoch reaches one of the milestones. Notice that such decay
mmengine/optim/scheduler/lr_scheduler.py:150
↓ 12 callersClassImgDataPreprocessor
Image pre-processor for normalization and bgr to rgb conversion. Accepts the data sampled by the dataloader, and preprocesses it into the for
mmengine/model/base_model/data_preprocessor.py:154
↓ 12 callersClassLinearLR
Decays the learning rate of each parameter group by linearly changing small multiplicative factor until the number of epoch reaches a pre-defined
mmengine/optim/scheduler/lr_scheduler.py:121
↓ 12 callersClassStepParamScheduler
Decays the parameter value of each parameter group by gamma every step_size epochs. Notice that such decay can happen simultaneously with othe
mmengine/optim/scheduler/param_scheduler.py:225
↓ 11 callersClassLinearMomentum
Decays the momentum of each parameter group by linearly changing small multiplicative factor until the number of epoch reaches a pre-defined m
mmengine/optim/scheduler/momentum_scheduler.py:151
↓ 11 callersClassStepMomentum
Decays the momentum of each parameter group by gamma every step_size epochs. Notice that such decay can happen simultaneously with other changes
mmengine/optim/scheduler/momentum_scheduler.py:207
↓ 10 callersClassDefaultSampler
The default data sampler for both distributed and non-distributed environment. It has several differences from the PyTorch ``DistributedSampl
mmengine/dataset/sampler.py:14
↓ 10 callersClassLinearParamScheduler
Decays the parameter value of each parameter group by linearly changing small multiplicative factor until the number of epoch reaches a pre-define
mmengine/optim/scheduler/param_scheduler.py:708
↓ 10 callersClassStepLR
Decays the learning rate of each parameter group by gamma every step_size epochs. Notice that such decay can happen simultaneously with other
mmengine/optim/scheduler/lr_scheduler.py:175
↓ 9 callersClassConfigParsingError
Raise error when failed to parse pure Python style config files.
mmengine/config/utils.py:46
↓ 9 callersClassExponentialMomentum
Decays the momentum of each parameter group by gamma every epoch. Args: optimizer (Optimizer or OptimWrapper): optimizer or Wrapped
mmengine/optim/scheduler/momentum_scheduler.py:130
↓ 9 callersClassLocalVisBackend
Local visualization backend class. It can write image, config, scalars, etc. to the local hard disk. You can get the drawing backend thro
mmengine/visualization/vis_backend.py:169
↓ 9 callersClassWandbVisBackend
Wandb visualization backend class. Examples: >>> from mmengine.visualization import WandbVisBackend >>> import numpy as np
mmengine/visualization/vis_backend.py:330
↓ 8 callersClassApexOptimWrapper
A subclass of :class:`OptimWrapper` that supports automatic mixed precision training based on apex.amp. ``ApexOptimWrapper`` provides a unifi
mmengine/optim/optimizer/apex_optimizer_wrapper.py:21
↓ 8 callersClassCompose
Compose multiple transforms sequentially. Args: transforms (Sequence[dict, callable], optional): Sequence of transform object
mmengine/dataset/base_dataset.py:20
↓ 8 callersClassConcatDataset
A wrapper of concatenated dataset. Same as ``torch.utils.data.dataset.ConcatDataset`` and support lazy_init. Note: ``ConcatDataset``
mmengine/dataset/dataset_wrapper.py:18
↓ 8 callersClassCosineAnnealingParamScheduler
r"""Set the parameter value of each parameter group using a cosine annealing schedule, where :math:`\eta_{max}` is set to the initial value and
mmengine/optim/scheduler/param_scheduler.py:567
↓ 8 callersClassExponentialLR
Decays the learning rate of each parameter group by gamma every epoch. Args: optimizer (Optimizer or OptimWrapper): Wrapped optimizer.
mmengine/optim/scheduler/lr_scheduler.py:101
↓ 8 callersClassExponentialParamScheduler
Decays the parameter value of each parameter group by gamma every epoch. Args: optimizer (Optimizer or BaseOptimWrapper): optimizer or Wr
mmengine/optim/scheduler/param_scheduler.py:493
↓ 8 callersClassMLflowVisBackend
MLflow visualization backend class. It can write images, config, scalars, etc. to a mlflow file. Examples: >>> from mmengine.vis
mmengine/visualization/vis_backend.py:638
↓ 7 callersClassAimVisBackend
Aim visualization backend class. Examples: >>> from mmengine.visualization import AimVisBackend >>> import numpy as np >>
mmengine/visualization/vis_backend.py:1322
↓ 7 callersClassClearMLVisBackend
Clearml visualization backend class. It requires `clearml`_ to be installed. Examples: >>> from mmengine.visualization import ClearML
mmengine/visualization/vis_backend.py:859
↓ 7 callersClassCosineAnnealingMomentum
r"""Set the momentum of each parameter group using a cosine annealing schedule, where :math:`\eta_{max}` is set to the initial value and :math
mmengine/optim/scheduler/momentum_scheduler.py:75
↓ 7 callersClassDVCLiveVisBackend
DVCLive visualization backend class. Examples: >>> from mmengine.visualization import DVCLiveVisBackend >>> import numpy as np
mmengine/visualization/vis_backend.py:1144
↓ 7 callersClassInfiniteSampler
It's designed for iteration-based runner and yields a mini-batch indices each time. The implementation logic is referred to https://githu
mmengine/dataset/sampler.py:107
↓ 7 callersClassNeptuneVisBackend
Neptune visualization backend class. Examples: >>> from mmengine.visualization import NeptuneVisBackend >>> from mmengine import
mmengine/visualization/vis_backend.py:1000
↓ 7 callersClassNestedNet
A network with nested submodules for testing the ability to correctly capture scope information.
tests/test_analysis/test_jit_analysis.py:72
↓ 7 callersClassTensorboardVisBackend
Tensorboard visualization backend class. It can write images, config, scalars, etc. to a tensorboard file. Examples: >>> from mm
mmengine/visualization/vis_backend.py:514
↓ 7 callersClassToyModel
tests/test_model/test_wrappers/test_model_wrapper.py:33
↓ 7 callersClassToyModel
tests/test_optim/test_optimizer/test_optimizer_wrapper.py:43
↓ 6 callersClassCosineAnnealingLR
r"""Set the learning rate of each parameter group using a cosine annealing schedule, where :math:`\eta_{max}` is set to the initial value and
mmengine/optim/scheduler/lr_scheduler.py:48
↓ 6 callersClassCosineRestartMomentum
Sets the momentum of each parameter group according to the cosine annealing with restarts scheme. The cosine restart policy anneals the moment
mmengine/optim/scheduler/momentum_scheduler.py:259
↓ 6 callersClassCosineRestartParamScheduler
Sets the parameters of each parameter group according to the cosine annealing with restarts scheme. The cosine restart policy anneals the para
mmengine/optim/scheduler/param_scheduler.py:1138
↓ 6 callersClassEMAHook
A Hook to apply Exponential Moving Average (EMA) on the model during training. Note: - EMAHook takes priority over CheckpointHook.
mmengine/hooks/ema_hook.py:14
↓ 6 callersClassExampleModel
tests/test_optim/test_optimizer/test_optimizer.py:65
↓ 6 callersClassExponentialMovingAverage
r"""Implements the exponential moving average (EMA) of the model. All parameters are updated by the formula as below: .. math::
mmengine/model/averaged_model.py:147
↓ 6 callersClassMMDistributedDataParallel
A distributed model wrapper used for training,testing and validation in loop. Different from DistributedDataParallel, MMDistributedDataParall
mmengine/model/wrappers/distributed.py:16
↓ 6 callersClassMultiStepMomentum
Decays the specified momentum in each parameter group by gamma once the number of epoch reaches one of the milestones. Notice that such decay can
mmengine/optim/scheduler/momentum_scheduler.py:181
↓ 6 callersClassParamSchedulerHook
A hook to update some hyper-parameters in optimizer, e.g., learning rate and momentum.
mmengine/hooks/param_scheduler_hook.py:13
↓ 6 callersClassToyMetric1
tests/test_runner/test_runner.py:212
↓ 6 callersClassToyModel
mmengine/testing/runner_test_case.py:28
↓ 5 callersClassCosineRestartLR
Sets the learning rate of each parameter group according to the cosine annealing with restarts scheme. The cosine restart policy anneals the l
mmengine/optim/scheduler/lr_scheduler.py:294
↓ 5 callersClassInstanceData
Data structure for instance-level annotations or predictions. Subclass of :class:`BaseDataElement`. All value in `data_fields` should have th
mmengine/structures/instance_data.py:34
↓ 5 callersClassMMLogger
Formatted logger used to record messages. ``MMLogger`` can create formatted logger to log message with different log levels and get instance
mmengine/logging/logger.py:128
↓ 5 callersClassModel
tests/test_runner/test_checkpoint.py:39
↓ 5 callersClassMultiStepParamScheduler
Decays the specified parameter in each parameter group by gamma once the number of epoch reaches one of the milestones. Notice that such decay can
mmengine/optim/scheduler/param_scheduler.py:312
↓ 5 callersClassNPUProfilerHook
NPUProfiler to analyze performance during training. NPU Profiling is used to count the device execution time of all operators. The torch_npu.
mmengine/hooks/profiler_hook.py:252
↓ 4 callersClassActivationAnalyzer
Provides access to per-submodule model activation count obtained by tracing a model with pytorch's jit tracing functionality. By default, com
mmengine/analysis/complexity_analysis.py:129
↓ 4 callersClassBlock
tests/test_runner/test_checkpoint.py:31
↓ 4 callersClassComplexModel
tests/test_model/test_wrappers/test_model_wrapper.py:51
↓ 4 callersClassDumpResults
Dump model predictions to a pickle file for offline evaluation. Args: out_file_path (str): Path of the dumped file. Must end with '.pkl'
mmengine/evaluator/metric.py:152
↓ 4 callersClassJitModelAnalysis
Provides access to per-submodule model statistics obtained by tracing a model with pytorch's jit tracing functionality. Calculates a statisti
mmengine/analysis/jit_analysis.py:202
↓ 4 callersClassMMFullyShardedDataParallel
A wrapper for sharding Module parameters across data parallel workers. Different from FullyShardedDataParallel, MMFullyShardedDataParallel im
mmengine/model/wrappers/fully_sharded_distributed.py:30
↓ 4 callersClassMMSeparateDistributedDataParallel
A DistributedDataParallel wrapper for models in MMGeneration. In MMedting and MMGeneration there is a need to wrap different modules in the m
mmengine/model/wrappers/seperate_distributed.py:16
↓ 4 callersClassPolyMomentum
Decays the momentum of each parameter group in a polynomial decay scheme. Notice that such decay can happen simultaneously with other changes
mmengine/optim/scheduler/momentum_scheduler.py:232
↓ 4 callersClassStochasticWeightAverage
Implements the stochastic weight averaging (SWA) of the model. Stochastic Weight Averaging was proposed in `Averaging Weights Leads to Wider
mmengine/model/averaged_model.py:121
↓ 4 callersClassTestSkip
mmengine/testing/_internal/distributed.py:26
↓ 4 callersClassTimeCounter
A tool that counts the average running time of a function or a method. Users can use it as a decorator or context manager to calculate the average
mmengine/utils/dl_utils/time_counter.py:12
↓ 3 callersClassBaseDataPreprocessor
Base data pre-processor used for copying data to the target device. Subclasses inherit from ``BaseDataPreprocessor`` could override the forwa
mmengine/model/base_model/data_preprocessor.py:19
↓ 3 callersClassClassBalancedDataset
A wrapper of class balanced dataset. Suitable for training on class imbalanced datasets like LVIS. Following the sampling strategy in the `pa
mmengine/dataset/dataset_wrapper.py:318
↓ 3 callersClassConstantMomentum
Decays the momentum value of each parameter group by a small constant factor until the number of epoch reaches a pre-defined milestone: ``end``.
mmengine/optim/scheduler/momentum_scheduler.py:50
↓ 3 callersClassCustomHook
tests/test_hooks/test_hook.py:199
↓ 3 callersClassDetDataSample
tests/test_structures/test_data_element.py:12
↓ 3 callersClassHTTPBackend
HTTP and HTTPS storage bachend.
mmengine/fileio/backends/http_backend.py:12
↓ 3 callersClassImportTransformer
Convert the import syntax to the assignment of :class:`mmengine.config.LazyObject` and preload the base variable before parsing the configurat
mmengine/config/utils.py:187
↓ 3 callersClassLazyAttr
The attribute of the LazyObject. When parsing the configuration file, the imported syntax will be parsed as the assignment ``LazyObject``. Du
mmengine/config/lazy.py:135
↓ 3 callersClassMessageHub
Message hub for component interaction. MessageHub is created and accessed in the same way as ManagerMixin. ``MessageHub`` will record log inf
mmengine/logging/message_hub.py:17
↓ 3 callersClassMockParamScheduler
tests/test_hooks/test_param_scheduler_hook.py:87
↓ 3 callersClassMomentumAnnealingEMA
r"""Exponential moving average (EMA) with momentum annealing strategy. Args: model (nn.Module): The model to be averaged. momentu
mmengine/model/averaged_model.py:212
↓ 3 callersClassOneCycleLR
r"""Sets the learning rate of each parameter group according to the 1cycle learning rate policy. The 1cycle policy anneals the learning rate from
mmengine/optim/scheduler/lr_scheduler.py:225
next →1–100 of 482, ranked by callers