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

Pass revision in path to AbstractBufferedFile init #1948

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Pass revision in path to AbstractBufferedFile init #1948

merged 2 commits into from
Jan 3, 2024

Conversation

albertvillanova
Copy link
Member

Fix #1947.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c3b2c03) 82.41% compared to head (cd4e2df) 82.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1948      +/-   ##
==========================================
- Coverage   82.41%   82.39%   -0.03%     
==========================================
  Files          66       66              
  Lines        8133     8133              
==========================================
- Hits         6703     6701       -2     
- Misses       1430     1432       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Thanks for opening a PR to fix the issue @albertvillanova! I'm not sure though to understand what could be the side effects of initializing with path instead of resolved_path.unresolve() (@mariosasko could you double-check? 🙏).

Since it's fixing an issue, @albertvillanova could you add a regression test in test_hf_file_system.py? Thanks in advance!

@albertvillanova
Copy link
Member Author

albertvillanova commented Jan 3, 2024

@Wauplin, as requested, I have added a regression test.

In relation with your question above, note that contrary to path, the unresolved resolved_path has the revision integrated in itself.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test @albertvillanova!

I also tried it myself and looks good. Let's wait for a quick review from @mariosasko or @lhoestq before merging (if it's not a hurry on your side). Thanks for the fix!

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Thanks for the fix !

@Wauplin
Copy link
Contributor

Wauplin commented Jan 3, 2024

Thanks for the review, will merge it now :)

@Wauplin Wauplin merged commit a331e82 into main Jan 3, 2024
16 checks passed
@Wauplin Wauplin deleted the fix-1947 branch January 3, 2024 17:33
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.

Parameter revision is not taken into account by HfFileSystem
4 participants