Skip to content

Commit

Permalink
[Refactor] Replace if '_base_' with read_base(). (open-mmlab#1665)
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyixiao18 authored Jun 28, 2023
1 parent 70ff2ab commit 10685fc
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) OpenMMLab. All rights reserved.
# This is a BETA new format config file, and the usage may change recently.
if '_base_':
from mmengine.config import read_base

with read_base():
from .._base_.default_runtime import *

from mmengine.dataset import DefaultSampler, default_collate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) OpenMMLab. All rights reserved.
# This is a BETA new format config file, and the usage may change recently.
if '_base_':
from mmengine.config import read_base

with read_base():
from .._base_.datasets.imagenet_bs64_swin_384 import *
from .._base_.default_runtime import *
from .._base_.models.convnext_base import *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) OpenMMLab. All rights reserved.
# This is a BETA new format config file, and the usage may change recently.
if '_base_':
from mmengine.config import read_base

with read_base():
from .._base_.models.mae_vit_base_p16 import *
from .._base_.datasets.imagenet_bs512_mae import *
from .._base_.default_runtime import *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) OpenMMLab. All rights reserved.
# This is a BETA new format config file, and the usage may change recently.
if '_base_':
from mmengine.config import read_base

with read_base():
from .._base_.models.mae_vit_base_p16 import *
from .._base_.datasets.imagenet_bs512_mae import *
from .._base_.default_runtime import *
Expand Down
4 changes: 3 additions & 1 deletion mmpretrain/configs/resnet/resnet18_8xb32_in1k.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) OpenMMLab. All rights reserved.
# This is a BETA new format config file, and the usage may change recently.
if '_base_':
from mmengine.config import read_base

with read_base():
from .._base_.datasets.imagenet_bs32 import *
from .._base_.default_runtime import *
from .._base_.models.resnet18 import *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) OpenMMLab. All rights reserved.
# This is a BETA new format config file, and the usage may change recently.
if '_base_':
from mmengine.config import read_base

with read_base():
from .._base_.datasets.imagenet_bs32_simclr import *
from .._base_.schedules.imagenet_lars_coslr_200e import *
from .._base_.default_runtime import *
Expand Down

0 comments on commit 10685fc

Please sign in to comment.