mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
updated env APIServerConfig and excluded uv.lock
This commit is contained in:
parent
bba93552f5
commit
bcb2b7206d
5 changed files with 10 additions and 3218 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -184,3 +184,6 @@ wandb
|
|||
.gradio/
|
||||
|
||||
example_trainer/trained_model_checkpoints/
|
||||
|
||||
# uv
|
||||
uv.lock
|
||||
|
|
|
|||
|
|
@ -32,4 +32,4 @@ python environments/infinimath/infinimath_local_server.py
|
|||
```
|
||||
|
||||
The `infinimath_local_server.py` script contains the primary configuration for the environment when run in this standalone mode. You can modify this script directly to change parameters such as the model used, API keys (via environment variables), and various curriculum or reward settings.
|
||||
The script is designed for local debugging and testing of the environment's capabilities.
|
||||
The script is designed for local debugging and demonstration of the environment's capabilities.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from typing import Dict, List, Optional, Tuple, Union
|
|||
from dotenv import load_dotenv
|
||||
from openai import AsyncOpenAI
|
||||
|
||||
from atroposlib.envs.base import BaseEnv, BaseEnvConfig, OpenaiConfig, ScoredDataGroup
|
||||
from atroposlib.envs.base import BaseEnv, BaseEnvConfig, APIServerConfig, ScoredDataGroup
|
||||
from atroposlib.utils.tokenize_for_trainer import tokenize_for_trainer
|
||||
|
||||
from .curriculum import MathCurriculum
|
||||
|
|
@ -76,7 +76,7 @@ class InfiniteMathEnv(BaseEnv):
|
|||
def __init__(
|
||||
self,
|
||||
config: InfiniteMathEnvConfig,
|
||||
server_configs: Union[List[OpenaiConfig], OpenaiConfig],
|
||||
server_configs: Union[List[APIServerConfig], APIServerConfig],
|
||||
slurm=True,
|
||||
testing=False,
|
||||
):
|
||||
|
|
@ -611,7 +611,7 @@ class InfiniteMathEnv(BaseEnv):
|
|||
return scored_data
|
||||
|
||||
@classmethod
|
||||
def config_init(cls) -> Tuple[InfiniteMathEnvConfig, List[OpenaiConfig]]:
|
||||
def config_init(cls) -> Tuple[InfiniteMathEnvConfig, List[APIServerConfig]]:
|
||||
"""Initialize environment and OpenAI configurations with default values."""
|
||||
env_config = InfiniteMathEnvConfig(
|
||||
tokenizer_name="NousResearch/Nous-Hermes-2-Yi-34B",
|
||||
|
|
@ -644,7 +644,7 @@ class InfiniteMathEnv(BaseEnv):
|
|||
)
|
||||
|
||||
server_configs = [
|
||||
OpenaiConfig(
|
||||
APIServerConfig(
|
||||
model_name="NousResearch/Nous-Hermes-2-Yi-34B",
|
||||
base_url="http://localhost:9004/v1",
|
||||
api_key="x",
|
||||
|
|
@ -653,11 +653,6 @@ class InfiniteMathEnv(BaseEnv):
|
|||
]
|
||||
return env_config, server_configs
|
||||
|
||||
@classmethod
|
||||
def cli(cls):
|
||||
"""Command Line Interface runner for the environment."""
|
||||
super().cli()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
InfiniteMathEnv.cli()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import os
|
|||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from atroposlib.envs.base import OpenaiConfig
|
||||
from atroposlib.envs.base import APIServerConfig
|
||||
from environments.infinimath.infinimath_env import (
|
||||
InfiniteMathEnv,
|
||||
InfiniteMathEnvConfig,
|
||||
|
|
@ -50,7 +50,7 @@ async def main():
|
|||
)
|
||||
|
||||
server_configs = [
|
||||
OpenaiConfig(
|
||||
APIServerConfig(
|
||||
model_name="gpt-4.1-nano",
|
||||
base_url=None,
|
||||
api_key=os.environ.get("OPENAI_API_KEY"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue