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

[Enhancement] Add Dev tools to boost develop #798

Merged
merged 43 commits into from
Sep 2, 2021
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9895e34
Modify default work dir when training.
Aug 12, 2021
3b2b8c5
Refactor gather_models.py.
Aug 13, 2021
37a1872
Add train and test matching list.
Aug 13, 2021
828522b
Regression benchmark list.
Aug 13, 2021
cb42556
Merge branch 'master' into dev_tools
Aug 14, 2021
2ffb252
Merge branch 'master' into dev_tools
Aug 17, 2021
d4ff6b8
lower readme name to upper readme name.
Aug 17, 2021
104d721
Add url check tool and model inference test tool.
Aug 17, 2021
5378a1d
Modify tool name.
Aug 17, 2021
f25d6a8
Support duplicate mode of log json url check.
Aug 17, 2021
10822df
Merge branch 'master' into dev_tools
Aug 17, 2021
06a06fd
Merge Master.
Aug 19, 2021
6bd2215
Add regression benchmark evaluation automatic tool.
Aug 19, 2021
b25dc95
Add train script generator.
Aug 20, 2021
055fecd
Only Support script running.
Aug 20, 2021
bad757b
Add evaluation results gather.
Aug 20, 2021
e39f86d
Add exec Authority.
Aug 20, 2021
fbee304
Automatically make checkpoint root folder.
Aug 20, 2021
84b2461
Merge branch 'dev_tools' of github.com:sennnnn/mmsegmentation into de…
Aug 20, 2021
f1973eb
Modify gather results save path.
Aug 20, 2021
9eee96b
Coarse-grained train results gather tool.
Aug 20, 2021
57439c0
Complete benchmark train script.
Aug 21, 2021
665c761
Make some little modifications.
Aug 21, 2021
44e58a8
Merge Master.
Aug 21, 2021
f48051c
Fix checkpoint urls.
Aug 26, 2021
f6b5695
Fix unet checkpoint urls.
Aug 26, 2021
8e96c4e
Fix fast scnn & fcn checkpoint url.
Aug 26, 2021
f0e6767
Fix fast scnn checkpoint urls.
Aug 26, 2021
90433a9
Fix fast scnn url.
Aug 26, 2021
2064b08
Add differential results calculation.
Aug 26, 2021
a50f749
Add differential results of regression benchmark train results.
Aug 26, 2021
b524142
Add an extra argument to select model.
Aug 29, 2021
ad022b5
Merge branch 'dev_tools' of github.com:sennnnn/mmsegmentation into de…
Aug 29, 2021
2cf1bea
Update nonlocal_net & hrnet checkpoint url.
Aug 29, 2021
97dc719
Fix checkpoint url of hrnet and Fix some tta evaluation results and m…
Aug 30, 2021
27866dc
Modify fast scnn checkpoint url.
Aug 30, 2021
7787b8e
Merge Master.
Aug 30, 2021
4f93fec
Resolve new comments.
Aug 30, 2021
71a65ec
Fix url check status code bug.
Aug 30, 2021
de077e1
Resolve some comments.
Aug 31, 2021
b9eb913
Modify train scripts generator.
Sep 2, 2021
1ee7564
Modify work_dir of regression benchmark results.
Sep 2, 2021
fcbd1f1
model gather tool modification.
Sep 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Support duplicate mode of log json url check.
  • Loading branch information
sennnnn committed Aug 17, 2021
commit f25d6a8c406140fe039cb832ba1374970ee087bf
43 changes: 34 additions & 9 deletions .dev/check_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,55 @@ def main():
# yml path generate.
# If model_name is not set, script will check all of the models.
if model_name is not None:
yml_list = [f'configs/{model_name}/{model_name}.yml']
yml_list = [(model_name, f'configs/{model_name}/{model_name}.yml')]
else:
# check all
yml_list = [
f'configs/{x}/{x}.yml' for x in os.listdir('configs/')
if x != '_base_'
]
yml_list = [(x, f'configs/{x}/{x}.yml') for x in os.listdir('configs/')
if x != '_base_']

logger = get_root_logger(log_file='url_check.log', log_level=logging.ERROR)

for yml_path in yml_list:
for model_name, yml_path in yml_list:
# Default yaml loader unsafe.
model_infos = yml.load(
open(yml_path, 'r'), Loader=yml.CLoader)['Models']
for model_info in model_infos:
config_name = model_info['Name']
checkpoint_url = model_info['Weights']
# checkpoint url check
status_code, flag = check_url(checkpoint_url)
if flag:
logger.info(
f'{config_name} {checkpoint_url} {status_code} valid')
logger.info(f'checkpoint | {config_name} | {checkpoint_url} | '
f'{status_code} valid')
else:
logger.error(
f'{config_name} {checkpoint_url} {status_code} error')
f'checkpoint | {config_name} | {checkpoint_url} | '
f'{status_code} | error')
# log_json check
checkpoint_name = checkpoint_url.split('/')[-1]
model_time = '-'.join(checkpoint_name.split('-')[:-1]).replace(
f'{config_name}_', '')
# two style of log_json name
# use '_' to link model_time (will be deprecated)
log_json_url_1 = f'https://download.openmmlab.com/mmsegmentation/v0.5/{model_name}/{config_name}/{config_name}_{model_time}.log.json' # noqa
xvjiarui marked this conversation as resolved.
Show resolved Hide resolved
status_code_1, flag_1 = check_url(log_json_url_1)
# use '-' to link model_time
log_json_url_2 = f'https://download.openmmlab.com/mmsegmentation/v0.5/{model_name}/{config_name}/{config_name}-{model_time}.log.json' # noqa
status_code_2, flag_2 = check_url(log_json_url_2)
if flag_1 or flag_2:
if flag_1:
logger.info(
f'log.json | {config_name} | {log_json_url_1} | '
f'{status_code_1} | valid')
else:
logger.info(
f'log.json | {config_name} | {log_json_url_2} | '
f'{status_code_2} | valid')
else:
logger.error(
f'log.json | {config_name} | {log_json_url_1} & '
f'{log_json_url_2} | {status_code_1} & {status_code_2} | '
'error')


if __name__ == '__main__':
Expand Down