Skip to content

Allow multiple instances of the same recognizer through YAML#1761

Closed
Mehrsary wants to merge 1 commit intomicrosoft:mainfrom
Mehrsary:main
Closed

Allow multiple instances of the same recognizer through YAML#1761
Mehrsary wants to merge 1 commit intomicrosoft:mainfrom
Mehrsary:main

Conversation

@Mehrsary
Copy link

Change Description

Added support for configuring multiple instances of the same recognizer class (e.g., GLiNERRecognizer) with different parameters through YAML configuration

Example usage:

recognizers:
  - name: GLiNERRecognizer
    type: predefined
    instance_name: "gliner1"
    model_name: "urchade/gliner_multi_pii-v1"
    threshold: 0.4
    ....
    
  - name: GLiNERRecognizer
    type: predefined
    instance_name: "gliner2"
    model_name: "gliner-community/gliner_small-v2.5"
    threshold: 0.25
    ....

Issue reference

Fixes #XX

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

… using instance names in recognizer configuration
@omri374
Copy link
Collaborator

omri374 commented Oct 24, 2025

Thanks! Would you mind adding a test and example conf for for the test to use? There is a conf folder inside the tests folder.

@omri374 omri374 marked this pull request as ready for review October 24, 2025 10:10
@omri374 omri374 marked this pull request as draft October 24, 2025 10:10
@omri374 omri374 changed the title Main Allow multiple instances of the same recognizer through YAML Nov 2, 2025
@Mehrsary
Copy link
Author

Yeah, if the overall approach sounds good to you, I'll move it forward and get back to you

@omri374
Copy link
Collaborator

omri374 commented Nov 14, 2025

@Mehrsary it does look good. We have another PR for input validation so one would need to be merged with the other to make sure the functionality works as expected. I don't mind getting this functionality into the other PR so if you'd like, please add the test cases and we'll merge. Otherwise, we would merge it after the other change.

@omri374
Copy link
Collaborator

omri374 commented Nov 20, 2025

Please see #1780. It should be handled there but if it isn't, I would suggest to merge 1780 first and add the capability afterwards. Thanks for the work!

@RonShakutai
Copy link
Collaborator

Closing this PR already included here #1819
thanks !

@RonShakutai RonShakutai closed this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants