Skip to content

Conversation

@RyanUnderhill
Copy link
Contributor

Description

Motivation and Context


## Config class

If the config needs to be modified at runtime to change providers/set provider options, this object can be first created and used, then a model can be created from this config object.
Copy link
Contributor

Choose a reason for hiding this comment

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

It is perhaps obvious but maybe worth stating that if the user does not create the object, then the config is used directly from the file in the model folder


### Add a provider to the list

If the provider isn't already in the list of providers, this adds it to the end of the list.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does adding to the end of the list mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to find onnxruntime docs about how the provider list works, but couldn't find anything obvious. I don't think we should be explaining it here, do you know where it is?


### Clear list of providers

Clears the list of providers. This is the only way to remove existing providers to enforce using only a specific provider.
Copy link
Contributor

Choose a reason for hiding this comment

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

Once the list is cleared, what provider is used? CPU? Can you state that?

onnxruntime_genai.Config.set_provider_option(provider_name: str, option_name: str, option_value: str)
```

#### Parameters
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add an example of setting a new provider, as that is the scenario we are addressing with this change

@fs-eire fs-eire closed this Jul 29, 2025
@fs-eire fs-eire deleted the RyanUnderhill/python_config_docs branch July 29, 2025 21:58
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.

4 participants