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
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue