mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-29 17:35:07 +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
22
atroposlib/tests/test_env_imports.py
Normal file
22
atroposlib/tests/test_env_imports.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"""Regression tests for environment module imports.
|
||||
|
||||
Ensures every environment module can be imported without errors
|
||||
(e.g. no stale references to renamed symbols like OpenaiConfig).
|
||||
"""
|
||||
|
||||
import importlib
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"module_path",
|
||||
[
|
||||
"environments.sft_loader_server",
|
||||
"environments.community.ufc_prediction_env.ufc_server",
|
||||
"environments.community.ufc_prediction_env.ufc_image_env",
|
||||
],
|
||||
)
|
||||
def test_environment_module_imports(module_path):
|
||||
"""Each environment module should import without ImportError."""
|
||||
importlib.import_module(module_path)
|
||||
Loading…
Add table
Add a link
Reference in a new issue