mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-22 16:48:57 +00:00
fix: rename stale OpenaiConfig references to APIServerConfig
Three environment files still imported the old `OpenaiConfig` name, which was renamed to `APIServerConfig`. This causes an ImportError at module load time, making these environments unusable: - environments/sft_loader_server.py - environments/community/ufc_prediction_env/ufc_server.py - environments/community/ufc_prediction_env/ufc_image_env.py Also adds a lightweight import regression test.
This commit is contained in:
parent
c20c85256e
commit
388137c3f1
4 changed files with 33 additions and 11 deletions
|
|
@ -5,7 +5,7 @@ from typing import Dict, List, Optional, Tuple
|
|||
from datasets import load_dataset
|
||||
from pydantic import Field
|
||||
|
||||
from atroposlib.envs.base import BaseEnv, BaseEnvConfig, OpenaiConfig, ScoredDataGroup
|
||||
from atroposlib.envs.base import BaseEnv, BaseEnvConfig, APIServerConfig, ScoredDataGroup
|
||||
from atroposlib.type_definitions import Item
|
||||
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ class SFTEnv(BaseEnv):
|
|||
def __init__(
|
||||
self,
|
||||
config: SFTConfig,
|
||||
server_configs: List[OpenaiConfig],
|
||||
server_configs: List[APIServerConfig],
|
||||
slurm=True,
|
||||
testing=False,
|
||||
):
|
||||
|
|
@ -72,7 +72,7 @@ class SFTEnv(BaseEnv):
|
|||
self.last_step = -1
|
||||
|
||||
@classmethod
|
||||
def config_init(cls) -> Tuple[BaseEnvConfig, List[OpenaiConfig]]:
|
||||
def config_init(cls) -> Tuple[BaseEnvConfig, List[APIServerConfig]]:
|
||||
env_config = SFTConfig(
|
||||
tokenizer_name="NousResearch/DeepHermes-3-Llama-3-8B-Preview",
|
||||
group_size=8,
|
||||
|
|
@ -91,7 +91,7 @@ class SFTEnv(BaseEnv):
|
|||
max_sft_per_step=8,
|
||||
)
|
||||
server_configs = [
|
||||
OpenaiConfig(
|
||||
APIServerConfig(
|
||||
model_name="NousResearch/DeepHermes-3-Llama-3-8B-Preview",
|
||||
base_url="http://localhost:9001/v1",
|
||||
api_key="x",
|
||||
|
|
@ -235,7 +235,7 @@ async def checkout_formatting():
|
|||
dataset_column_name="conversations",
|
||||
),
|
||||
server_configs=[
|
||||
OpenaiConfig(
|
||||
APIServerConfig(
|
||||
model_name="NousResearch/DeepHermes-3-Llama-3-8B-Preview",
|
||||
base_url="http://localhost:9001/v1",
|
||||
api_key="x",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue