-
Notifications
You must be signed in to change notification settings - Fork 220
migrate config system to pydantic_config #1915
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
Changes from all commits
9c3dcb1
31a27d3
2ab6f94
6f2a14a
4ba36d1
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 |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| from pydantic import Field, model_validator | ||
|
|
||
| from prime_rl.configs.shared import BaseModelConfig | ||
| from prime_rl.utils.pydantic_config import BaseConfig, BaseSettings, get_all_fields | ||
| from prime_rl.utils.config import BaseConfig, get_all_fields | ||
| from prime_rl.utils.utils import rgetattr, rsetattr | ||
|
|
||
| # TODO: Set thinking/ solution budget | ||
|
|
@@ -93,7 +93,7 @@ class ModelConfig(BaseModelConfig): | |
| ] = None | ||
|
|
||
|
|
||
| class WeightBroadcastConfig(BaseSettings): | ||
| class WeightBroadcastConfig(BaseConfig): | ||
| """Configures weight broadcast settings.""" | ||
|
|
||
| type: Annotated[Literal["nccl", "filesystem"], Field(description="The type of weight broadcast to use.")] = ( | ||
|
|
@@ -116,7 +116,7 @@ class WeightBroadcastConfig(BaseSettings): | |
| ] | ||
|
|
||
|
|
||
| class InferenceConfig(BaseSettings): | ||
| class InferenceConfig(BaseConfig): | ||
| """Configures inference.""" | ||
|
|
||
| # The server configuration | ||
|
|
@@ -237,6 +237,13 @@ class InferenceConfig(BaseSettings): | |
| ), | ||
| ] = False | ||
|
|
||
| vllm_extra: Annotated[ | ||
| dict[str, Any], | ||
| Field( | ||
| description="Extra arguments to pass to vLLM. These are applied as attributes on the vLLM namespace after config translation.", | ||
| ), | ||
| ] = {} | ||
|
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. New
|
||
|
|
||
| @model_validator(mode="after") | ||
| def round_up_max_lora_rank(self): | ||
| """Round up max_lora_rank to the nearest valid vLLM value. | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.