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

datasets_download try/catching the git-lfs prune for versions that do not support -f #2375

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jackkolb
Copy link

@jackkolb jackkolb commented Apr 28, 2024

This commit adds a try/catch in the datasets_download.py script around the git lfs prune -f --recent call to re-run the command without the -f switch. While users can specify --no-prune in 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 the git lfs prune -f --recent call 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 -f switch. I used the command:

python -m habitat_sim.utils.datasets_download --uids rearrange_task_assets --data-path data

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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.
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants