Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support getting config and model from model name and alias. #1256

Open
HAOCHENYE opened this issue Jul 17, 2023 · 0 comments
Open

Comments

@HAOCHENYE
Copy link
Collaborator

HAOCHENYE commented Jul 17, 2023

What is the feature?

Currently ,get_config and get_model only support to get model by:

from mmengine.hub import get_model, get_config

cfg = get_config('mmpretrain::mae/mae_hivit-base-p16_8xb512-amp-coslr-1600e_in1k.py')
model = get_model('mmpretrain::mae/mae_hivit-base-p16_8xb512-amp-coslr-1600e_in1k.py')

To make these interfaces more friendly to use, the first argument could also be a local config path, model name or, a alias defined in metafile.

from mmengine.hub import get_model, get_config

cfg = get_config('mmpretrain::mae_vit-base-p16_8xb512-amp-coslr-300e_in1k')  # get model by model name
cfg = get_config('mmpretrain::{model alias}')  # get model by alias
cfg = get_config('/path/to/local/config')  # get model by local config

Any other context?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant