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

Bugfix: __name__ undefined on HuggingFace Pipeline Models. #822

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

JosephCatrambone
Copy link
Contributor

Traces are attempting to read from name and module, which aren't necessarily present on models. Given that this doesn't impact the control flow or anything outside of telemetry, it's safe to use sensible defaults for these values if they're not present, rather than throwing an exception.

Creating a draft PR as it would be wise to add additional tests to make sure we're handling things properly. Existing tests pass.

…the tests, but it seemed preferable to pinging HF every time a test ran.
@JosephCatrambone
Copy link
Contributor Author

I have some tests that I've added but haven't pushed. It has proved to be very challenging to authentically mock a pipeline/model/tokenizer, so (locally) I added a 96kb model + 100kb tokenizer to the mocks. We could pull from HF every time if we wanted to save the storage overhead, but given the nature of the system I think it's an okay addition to the tests. Are there any objections before I push the update to the PR?

@JosephCatrambone JosephCatrambone marked this pull request as ready for review June 13, 2024 23:47
zsimjee
zsimjee previously approved these changes Jun 14, 2024
@zsimjee
Copy link
Collaborator

zsimjee commented Jun 14, 2024

I have some tests that I've added but haven't pushed. It has proved to be very challenging to authentically mock a pipeline/model/tokenizer, so (locally) I added a 96kb model + 100kb tokenizer to the mocks. We could pull from HF every time if we wanted to save the storage overhead, but given the nature of the system I think it's an okay addition to the tests. Are there any objections before I push the update to the PR?

Should be fine imo. Not huge.

@JosephCatrambone
Copy link
Contributor Author

Added the tests and mock model.

@JosephCatrambone JosephCatrambone merged commit cadd55b into main Jun 14, 2024
20 checks passed
@JosephCatrambone JosephCatrambone deleted the jc/bugfix-name-undefined-on-hf-pipeline branch June 14, 2024 21:54
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