datasets_download try/catching the git-lfs prune for versions that do not support -f#2375
Open
jackkolb wants to merge 4 commits intofacebookresearch:mainfrom
Open
datasets_download try/catching the git-lfs prune for versions that do not support -f#2375jackkolb wants to merge 4 commits intofacebookresearch:mainfrom
jackkolb wants to merge 4 commits intofacebookresearch:mainfrom
Conversation
Some common git-lfs versions (e.g., 2.9.2 which Ubuntu 20.04 runs) do not support the -f flag on `git lfs prune`. This change wraps the `git lfs prune -f --recent` call in a try/catch for compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a try/catch in the
datasets_download.pyscript around thegit lfs prune -f --recentcall to re-run the command without the-fswitch. While users can specify--no-prunein the data loader command, that workaround should not be necessary.Motivation and Context
Some common git-lfs versions (e.g., 2.9.2 which Ubuntu 20.04 runs) do not support the -f flag on
git lfs prune. This change wraps thegit lfs prune -f --recentcall in a try/catch for compatibility and a simpler user experience. Issue #2172 asks about this.How Has This Been Tested
I tested loading a dataset using git-lfs version 2.9.2, which previously broke due to the assumed
-fswitch. I used the command:python -m habitat_sim.utils.datasets_download --uids rearrange_task_assets --data-path dataTypes of changes
Checklist