-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Python config API docs #22951
base: gh-pages
Are you sure you want to change the base?
Python config API docs #22951
Conversation
docs/genai/api/python.md
Outdated
@@ -28,6 +28,57 @@ pip install onnxruntime-genai | |||
import onnxruntime_genai | |||
``` | |||
|
|||
## 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. |
There was a problem hiding this comment.
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
docs/genai/api/python.md
Outdated
|
||
### 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
Description
Motivation and Context