Fix failing XCLIPModelIntegrationTest#45053
Fix failing XCLIPModelIntegrationTest#45053Sai-Suraj-27 wants to merge 1 commit intohuggingface:mainfrom
XCLIPModelIntegrationTest#45053Conversation
3fe5174 to
d64d1a5
Compare
|
Hmm, this feels like a very core change for one model. cc @zucchini-nlp maybe? |
Okayy, even now when looping through Also, found |
|
Tiny nudge @zucchini-nlp. If this still makes sense. |
| for attribute_name in self.get_attributes(): | ||
| for attribute_name, (input_data, input_kwargs) in attribute_to_kwargs.items(): | ||
| attribute = getattr(self, attribute_name, None) | ||
| input_data, input_kwargs = attribute_to_kwargs[attribute_name] |
There was a problem hiding this comment.
i think we need to fix it in XCLIP processor since it is quite special, i.e. override the __call__ method like in some other processors (e.g. llava but ofc llava is more involved)
There was a problem hiding this comment.
the base __call__ is intended to delete repetitive code for common cases, and XCLIP is not very common. I don't want us to bloat the call here trying to catch every edge case
There was a problem hiding this comment.
Thanks for the review @zucchini-nlp. I will close this in favour of more recent: #45394. Sorry, couldn't follow up on this PR earlier, got caught up at work.
What does this PR do?
Fixes failing
XCLIPModelIntegrationTests.self.get_attributes()will not return all the processor instance attributes, for example in case ofx_clipbecausevideo_processoris added like this.Iterating directly over the
attribute_to_kwargsin__call__will check for all types at run-time.Code Agent Policy
The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. We are currently bottlenecked by our ability to review and respond to them. As a result,
we ask that new users do not submit pure code agent PRs at this time.
You may use code agents in drafting or to help you diagnose issues. We'd also ask autonomous "OpenClaw"-like agents
not to open any PRs or issues for the moment.
PRs that appear to be fully agent-written will probably be closed without review, and we may block users who do this
repeatedly or maliciously.
This is a rapidly-evolving situation that's causing significant shockwaves in the open-source community. As a result,
this policy is likely to be updated regularly in the near future. For more information, please read
CONTRIBUTING.md.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@Rocketknight1 @vasqu @zucchini-nlp