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

[Fix] fix bug during updating model zoo when building docs #1636

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Changes from all commits
Commits
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
11 changes: 7 additions & 4 deletions docs/en/.dev_scripts/update_model_zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ def update_model_zoo():

# write for overview.md
papers = set()
checkpoints = set()
for m in full_models:
papers.update(m.paper)
checkpoints = set(
[m.weights for m in full_models if m.weights.startswith('https:')])
if m.weights is not None and m.weights.startswith('https:'):
checkpoints.update(m.weights)
task_desc = '\n'.join([
f" - [{t}]({t.replace('-', '_').replace(' ', '_')}.md)"
for t in list(tasks.keys())
Expand Down Expand Up @@ -86,8 +87,10 @@ def update_model_zoo():
target_md = TARGET_ROOT / target_md
models = sorted(models, key=lambda x: -x.data['Year'])

checkpoints = set(
[m.weights for m in models if m.weights.startswith('https:')])
checkpoints = set()
for m in models:
if m.weights is not None and m.weights.startswith('https:'):
checkpoints.update(m.weights)
collections = set([m.in_collection for m in models])

papers = set()
Expand Down