Comments (6)
Hi, it is a great idea. In fact, mmcv also supports loading base config with an absolute path.
if BASE_KEY in cfg_dict:
cfg_dir = osp.dirname(filename)
base_filename = cfg_dict.pop(BASE_KEY)
base_filename = base_filename if isinstance(
base_filename, list) else [base_filename]
cfg_dict_list = list()
cfg_text_list = list()
for f in base_filename:
_cfg_dict, _cfg_text = Config._file2dict(osp.join(cfg_dir, f))
cfg_dict_list.append(_cfg_dict)
cfg_text_list.append(_cfg_text)
If the f
is an absolute path, the osp.join(cfg_dir, f)
will return the f
without concatenating the cfg_dir
from mim.
Cool! Thank you for your great effort:)
from mim.
related: open-mmlab/mmdetection#4481
from mim.
However, I think it is slightly inconvenient that the path of site-packages changes depending on the environment.
from mim.
Totally agree, but we need an elegant way to implement this feature.
from mim.
Hi~ We recently did an architectural upgrade and released MMEngine
, and we suggest to use Config in MMEngine
. It can load config from other repos like this:
_base_ = [
'mmdet::_base_/schedules/schedule_1x.py',
'mmdet::_base_/datasets/coco_instance.py',
'mmdet::_base_/default_runtime.py',
'mmdet::_base_/models/faster_rcnn_r50_fpn.py',
]
from mim.
Related Issues (20)
- Make openmim available on conda-forge HOT 22
- Problems with using --srun-args "--async -o ${work_dir} " on Slurm HOT 2
- TypeError: argument of type 'method' is not iterable on install of mmdetection HOT 1
- Can it be used in Windows and Python virtual environments? HOT 4
- [Feature Request] Mim download config without checkpoint HOT 1
- mim source config and proxy info config
- fix bug for 'TypeError: argument of type 'method' is not iterable' HOT 1
- mim: command not found HOT 5
- Support print_config
- install fail HOT 1
- mim train
- How to modify the config file with train function in MIM
- Download FileNotFoundError HOT 2
- [Bug] mmengine version not upgrade to the latest version using mim HOT 1
- mim conflicts with pip and doesn't allow installing mmdet when using pip==23.2.1 (repeated download)
- Support custom import projects directory
- Build Wheel only use one cpu core HOT 1
- Precompiled PyTorch 2.1.1 with cu121 cp311 build for Windows?
- Access Denied error on Windows HOT 3
- min install an older version of mmdet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mim.