Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nikg4
Copy link
Contributor

@nikg4 nikg4 commented Apr 14, 2025

Description

-- Update ModelParams to include processor_args
-- Update build_processor() and most of its invocations, except vision_language_conversation_feature_generator.py, which will be handled as a follow-up (it's a more involved change)

Related issues

Towards OPE-1185

Before submitting

  • This PR only changes documentation. (You can ignore the following checks in that case)
  • Did you read the contributor guideline Pull Request guidelines?
  • Did you link the issue(s) related to this PR in the section above?
  • Did you add / update tests where needed?

Reviewers

At least one review from a member of oumi-ai/oumi-staff is required.

@nikg4 nikg4 requested a review from optas April 14, 2025 22:10
@nikg4 nikg4 marked this pull request as ready for review April 14, 2025 22:41
@nikg4 nikg4 changed the title [WIP] Support custom processor args in ModelParams Support custom processor args in ModelParams Apr 14, 2025
@nikg4 nikg4 requested review from oelachqar, taenin and wizeng23 April 14, 2025 22:42
Processors are used in Oumi for vision-language models to process image and
text inputs. This field is optional and can be left empty for text-only models,
or if not needed.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider mentioning that they'll override model-specific default values for these kwargs, if present.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

raise ValueError(
"processor_kwargs attempts to override the following "
f"reserved fields: {conflicting_keys}. "
"Use properties of ModelParams instead."
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can tell, is trust_remote_code the only ModelParams property which is used in processor creation? Is there a chance of any false errors here, where a kwarg key conflicts with a ModelParams property, but that property isn't used in processor creation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This validation logic is a bit inexact but should work in practice (we can always modify it if it something unexpected happens )

This is also based on two existing precedents: https://github.com/search?q=repo%3Aoumi-ai%2Foumi%20conflicting_keys&type=code

@nikg4 nikg4 merged commit 159183e into main Apr 15, 2025
2 checks passed
@nikg4 nikg4 deleted the nikg4/processor_args branch April 15, 2025 01:35
penfever pushed a commit that referenced this pull request Aug 27, 2025
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.

3 participants