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

chore(hf): remove unused arguments #556

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

shcheklein
Copy link
Member

Minor cleanup in HF integration code.

@shcheklein shcheklein requested a review from dberenbaum November 3, 2024 00:12
Copy link

codecov bot commented Nov 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.87%. Comparing base (7ba4477) to head (ab29af7).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #556   +/-   ##
=======================================
  Coverage   87.87%   87.87%           
=======================================
  Files          96       96           
  Lines        9873     9873           
  Branches     1349     1349           
=======================================
  Hits         8676     8676           
  Misses        857      857           
  Partials      340      340           
Flag Coverage Δ
datachain 87.81% <100.00%> (ø)

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

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

Copy link

cloudflare-workers-and-pages bot commented Nov 3, 2024

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: ab29af7
Status: ✅  Deploy successful!
Preview URL: https://bd714b5a.datachain-documentation.pages.dev
Branch Preview URL: https://minor-cleanup-hf-get-output.datachain-documentation.pages.dev

View logs



def _feature_to_chain_type(name: str, val: Any) -> type: # noqa: PLR0911
def _feature_to_chain_type(name: str, val: Any) -> DataType: # noqa: PLR0911
if isinstance(val, Value):
return arrow_type_mapper(val.pa_type)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see arrow_type_mapper also returns type but seems like it should also return DataType, right? Maybe worth including in the PR. I think this stems from arrow_type_mapper predating DataType.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, more cleanup / review is needed there with types

e.g. we return list(list ... and it's not really DataType AFAIU

it's not a complete solution, thus we still have a lot of ignore type pragmas

Copy link
Contributor

@dberenbaum dberenbaum left a comment

Choose a reason for hiding this comment

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

Good catches @shcheklein!

@shcheklein shcheklein marked this pull request as ready for review November 3, 2024 23:48
@shcheklein shcheklein merged commit 4f0713d into main Nov 3, 2024
38 checks passed
@shcheklein shcheklein deleted the minor-cleanup-hf-get_output_schema branch November 3, 2024 23:50
skshetry pushed a commit that referenced this pull request Nov 14, 2024
* chore(hf): remove unused arguments

* cleanup types a bit in hf
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