Skip to content

Commit

Permalink
[Auto] Update timm (#1735)
Browse files Browse the repository at this point in the history
* update timm

* timm version

* trigger build

Co-authored-by: Weisu Yin <[email protected]>
  • Loading branch information
yinweisu and yinweisu authored Mar 7, 2022
1 parent 161344e commit 1653452
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gpu_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export KMP_DUPLICATE_LIB_OK=TRUE
if [[ $TESTS_PATH == *"auto"* ]]; then
echo "Installing autogluon.core and timm for auto module"
pip3 install autogluon.core==0.2.0
pip3 install timm==0.4.12
pip3 install timm==0.5.4
fi

nosetests --process-restartworker --with-timer --timer-ok 5 --timer-warning 20 -x --with-coverage --cover-package $COVER_PACKAGE -v $TESTS_PATH
9 changes: 0 additions & 9 deletions gluoncv/auto/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
"""GluonCV auto"""
import logging
from .estimators import *

logger = logging.getLogger(__name__)
msg = (
"We plan to deprecate auto from gluoncv on release 0.12.0."
"Please consider using autogluon.vision instead, which provides the same functionality."
"https://auto.gluon.ai/stable/tutorials/image_prediction/index.html"
)
logger.warning(msg)
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def _init_trainer(self):
optim_kwargs = optimizer_kwargs(cfg=self._cfg)
optim_kwargs['feature_lr_mult'] = self._cfg.train.transfer_lr_mult
optim_kwargs['fc_lr_mult'] = self._cfg.train.output_lr_mult
self._optimizer = create_optimizer_v2a(self.net, **optim_kwargs)
self._optimizer = create_optimizer_v2(self.net, **optimizer_kwargs(cfg=self._cfg))
else:
self._optimizer = create_optimizer_v2(self.net, **optimizer_kwargs(cfg=self._cfg))
self._init_loss_scaler()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

def optimizer_kwargs(cfg):
kwargs = dict(
optimizer_name=cfg.optimizer.opt,
learning_rate=cfg.train.lr,
opt=cfg.optimizer.opt,
lr=cfg.train.lr,
weight_decay=cfg.optimizer.weight_decay,
momentum=cfg.optimizer.momentum)
if cfg.optimizer.opt_eps is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def resolve_data_config(cfg, default_cfg={}, model=None, use_test_size=False):

# resolve interpolation method
interpolation = 'bicubic'
if cfg.data.interpolation is not None:
if cfg.data.interpolation is not None and cfg.data.interpolation != '':
interpolation = cfg.data.interpolation
elif 'interpolation' in default_cfg:
interpolation = default_cfg['interpolation']
Expand Down
10 changes: 10 additions & 0 deletions gluoncv/auto/tasks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
"""AutoML Tasks"""
import logging

from .image_classification import *
from .object_detection import *
# from .utils import *

logger = logging.getLogger(__name__)
msg = (
"We plan to deprecate auto from gluoncv on release 0.12.0."
"Please consider using autogluon.vision instead, which provides the same functionality."
"https://auto.gluon.ai/stable/tutorials/image_prediction/index.html"
)
logger.warning(msg)
2 changes: 1 addition & 1 deletion tests/py3_auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ dependencies:
- portalocker
- autocfg>=0.0.6
- autogluon.core==0.2.0
- timm==0.4.12
- timm==0.5.4
2 changes: 1 addition & 1 deletion tools/batch/docker/gluon_cv_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ else
fi;

python3 -m pip install --quiet -e .
python3 -m pip install --quiet timm==0.4.12
python3 -m pip install --quiet timm==0.5.4

cd $WORK_DIR
/bin/bash -o pipefail -c "$COMMAND"
Expand Down

0 comments on commit 1653452

Please sign in to comment.