From 95a1dbdfab37eaba52325986257c5f0c8182505a Mon Sep 17 00:00:00 2001 From: congee <35596075+congee524@users.noreply.github.com> Date: Tue, 22 Dec 2020 15:15:06 +0800 Subject: [PATCH] modify the counting way of ckpts (#4317) * modify the count way of ckpts * remove config statistics --- docs/stat.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/stat.py b/docs/stat.py index 230b9c166..61eaba2f5 100755 --- a/docs/stat.py +++ b/docs/stat.py @@ -20,10 +20,12 @@ for f in files: title = content.split('\n')[0].replace('# ', '') titles.append(title) + ckpts = set(x.lower().strip() - for x in re.findall(r'https?://download.*\.pth', content) - if 'mmdetection' in x) + for x in re.findall(r'\[model\]\((https?.*)\)', content)) + num_ckpts += len(ckpts) + statsmsg = f""" \t* [{title}]({url}) ({len(ckpts)} ckpts) """