-
Notifications
You must be signed in to change notification settings - Fork 45
Add model_name for auxiliary models #461
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -118,13 +118,18 @@ def __init__( | |
| "top_logprobs": self.task.rollout_args.logprobs, | ||
| }, | ||
| ) | ||
| self.auxiliary_chat_models = [ | ||
| TrinityChatModel( | ||
| openai_async_client=aux_model, | ||
| # TODO: customize generate_kwargs for auxiliary models if needed | ||
| ) | ||
| for aux_model in (self.auxiliary_models or []) | ||
| ] | ||
|
|
||
| # TODO: customize generate_kwargs for auxiliary models if needed | ||
| if self.auxiliary_model_wrappers is not None and self.auxiliary_models is not None: | ||
| self.auxiliary_chat_models = { | ||
| aux_model_wrapper.model_name | ||
| or f"auxiliary_model_{i}": TrinityChatModel(openai_async_client=aux_model) | ||
| for i, (aux_model_wrapper, aux_model) in enumerate( | ||
| zip(self.auxiliary_model_wrappers, self.auxiliary_models) | ||
| ) | ||
| } | ||
|
Comment on lines
+123
to
+130
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of I recommend deferring the initialization of Here is a suggested refactoring:
This change will ensure non-blocking behavior and proper use of async capabilities. |
||
| else: | ||
| self.auxiliary_chat_models = {} | ||
|
|
||
| def construct_experiences( | ||
| self, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.