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

[HF][fix] Use ParameterizedModelParser instead of ModelParser #877

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Commits on Jan 11, 2024

  1. [HF][fix] Use ParameterizedModelParser instead of ModelParser

    Fixing this error:
    ```
    Exception: HuggingFaceImage2TextTransformer.run() got an unexpected keyword argument 'callback_manager'
    ```
    
    This seems like a pretty brittle bug. If we use `ModelParser` isntead of `ParameterizedModelParser`, we get a bug because `callback_manager` is not a supported kwargs for the `run_inference()` method. This gets filtered out by the `ParameterizedModelParser.run()` method (https://github.com/lastmile-ai/aiconfig/blob/0ceb17636bae2b5416e7b415cdc87fd71b5ba3b0/python/src/aiconfig/default_parsers/parameterized_model_parser.py#L48-L54) but these kwags are not accepted  by the `ModelParser.run()` method (https://github.com/lastmile-ai/aiconfig/blob/0ceb17636bae2b5416e7b415cdc87fd71b5ba3b0/python/src/aiconfig/model_parser.py#L62-L69)
    
    ## Test Plan
    
    Before
    
    https://github.com/lastmile-ai/aiconfig/assets/151060367/a23a5d5c-d9a2-415b-8a6e-9826da56e985
    
    
    After
    
    https://github.com/lastmile-ai/aiconfig/assets/151060367/8899c527-7496-410b-b6b6-9e5a9525b1b5
    Rossdan Craig [email protected] committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    c7c372b View commit details
    Browse the repository at this point in the history