-
Notifications
You must be signed in to change notification settings - Fork 206
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
Adapt designer #235
Adapt designer #235
Conversation
@@ -0,0 +1,170 @@ | |||
_base_ = 'configs/base.py' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
配置文件里什么时候需要用configs/开头,什么时候相对路径?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前的拼接策略两种方式都支持
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dataset的配置不应该加 _base_ = 'configs/base.py'
,该配置文件应该只配置数据集相关的信息,还有下面的 log_config, predictor等不相关的都去掉
或者新增一个classification_base文件放这些通用配置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
predict跟输入的img_norm_cfg、image_size1和image_size2相关,放到别的地方得重复写img_norm_cfg、image_size1和image_size2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
easycv/utils/config_tools.py
Outdated
@@ -82,7 +127,9 @@ def mmcv_file2dict_raw(ori_filename): | |||
if platform.system() == 'Windows': | |||
temp_config_file.close() | |||
temp_config_name = osp.basename(temp_config_file.name) | |||
Config._substitute_predefined_vars(filename, temp_config_file.name) | |||
EasyCVConfig._substitute_predefined_vars(filename, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first_order_params 不是None时执行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
easycv/utils/config_tools.py
Outdated
base_cfg_name = base.py | ||
base_cfg_name = father_cfg_name + base_cfg_name = EasyCV/configs/base.py | ||
''' | ||
if 'configs' in base_cfg_name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
father_cfg_name为None会出问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
easycv/utils/config_tools.py
Outdated
if len(father_cfg_name.split('configs')) > 1: | ||
abspath_root = father_cfg_name.split('configs')[0] | ||
else: | ||
abspath_root = father_cfg_name.split('benchmarks')[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why benchmarks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为咱的config有一部分在config目录下,有一部分在benchmarks目录下(这部分的_base_有一部分写成了configs/base.py),这是兼容写法,避免出错
easycv/utils/config_tools.py
Outdated
abspath_root = father_cfg_name.split('configs')[0] | ||
else: | ||
abspath_root = father_cfg_name.split('benchmarks')[0] | ||
abspath_base_cfg_name = osp.join(abspath_root, base_cfg_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果base_cfg_name 是 path/to/configs/a.py 这种写法会有问题? 这里要明确好base_cfg的形式
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base_cfg只能是configs/a.py或者是相对路径../a.py,因为在pai平台上安装wheel包后,都需要先找到绝对路径,而本地只需要相对路径就可以了。base_cfg写成绝对路径没有意义,而且也会比较乱。
easycv/utils/config_tools.py
Outdated
print('Read base config from', base_cfg_path_2) | ||
if osp.exists(base_cfg_path_2): | ||
return base_cfg_path_2 | ||
class EasyCVConfig(Config): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EasyCVConfig 换个名字
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Motivation
Adaptive modification of designer's classification component migration to EasyCV.
Modification