# Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#     http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# have to explicitly bring these in here to resolve circular import issues
from .aliases import alias, resolve_name
from .decorators import MethodReplacer, RestartGenerator
from .deprecated import DeprecatedError, deprecated, deprecated_arg
from .enums import (
    Activation,
    Average,
    BlendMode,
    ChannelMatching,
    CommonKeys,
    ForwardMode,
    GridSampleMode,
    GridSamplePadMode,
    InterpolateMode,
    InverseKeys,
    LossReduction,
    Method,
    MetricReduction,
    Normalization,
    NumpyPadMode,
    PytorchPadMode,
    SkipMode,
    UpsampleMode,
    Weight,
)
from .jupyter_utils import StatusMembers, ThreadContainer
from .misc import (
    MAX_SEED,
    ImageMetaKey,
    copy_to_device,
    dtype_numpy_to_torch,
    dtype_torch_to_numpy,
    ensure_tuple,
    ensure_tuple_rep,
    ensure_tuple_size,
    evenly_divisible_all_gather,
    fall_back_tuple,
    first,
    get_dist_device,
    get_seed,
    is_scalar,
    is_scalar_tensor,
    issequenceiterable,
    list_to_dict,
    progress_bar,
    set_determinism,
    star_zip_with,
    string_list_all_gather,
    zip_with,
)
from .module import (
    PT_BEFORE_1_7,
    InvalidPyTorchVersionError,
    OptionalImportError,
    exact_version,
    export,
    get_full_type_name,
    get_package_version,
    get_torch_version_tuple,
    has_option,
    load_submodules,
    min_version,
    optional_import,
)
from .profiling import PerfContext, torch_profiler_full, torch_profiler_time_cpu_gpu, torch_profiler_time_end_to_end
from .state_cacher import StateCacher
