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 random behavior of update_model_index in pre-commit hook #784

Merged
merged 1 commit into from
Aug 15, 2021

Conversation

Junjun2016
Copy link
Collaborator

Motivation

The pre-commit hook update_model_index is observed to exit with code 1 (indicating files modified) randomly without actually modifying the metafiles. We found that this is caused by file I/O conflict when this pre-commit hook is running in a multi-threading manner.

Modification

  • Add require_serial=true in .pre-commit-config.yaml to prevent multi-threading that causes file I/O conflict
  • Modify update_model_index in md2yml.py to prevent redundant file I/O
  • Set sort_keys=True and update model .yml files

Related PR open-mmlab/mmpose#866

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repos?
No.

@Junjun2016
Copy link
Collaborator Author

@zhouzaida

@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #784 (6c3bde5) into master (f6dca38) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #784   +/-   ##
=======================================
  Coverage   85.37%   85.37%           
=======================================
  Files         107      107           
  Lines        5859     5859           
  Branches      962      962           
=======================================
  Hits         5002     5002           
  Misses        672      672           
  Partials      185      185           
Flag Coverage Δ
unittests 85.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6dca38...6c3bde5. Read the comment docs.

@Junjun2016
Copy link
Collaborator Author

Hi @zhouzaida
Could you please check the metafiles?

Copy link

@zhouzaida zhouzaida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Junjun2016 Junjun2016 merged commit 6eff941 into open-mmlab:master Aug 15, 2021
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
sibozhang pushed a commit to sibozhang/mmsegmentation that referenced this pull request Mar 22, 2024
* resolve comments

* update changelog

* speed up readcsv

* remove difficult & group flags

* update action_thr

* remove arg capacity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants