Skip to content
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

Create test for config_base.py #119

Merged
merged 4 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ultravox/training/config_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_train_args(override_sys_args: Optional[List[str]] = None) -> TrainConfig
override_sys_args: The command line arguments. If None, sys.argv[1:] is used.
This is mainly useful for testing.
"""
args = override_sys_args or sys.argv[1:]
args = sys.argv[1:] if override_sys_args is None else override_sys_args

return simple_parsing.parse(
config_class=TrainConfig,
Expand Down
7 changes: 7 additions & 0 deletions ultravox/training/config_base_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from ultravox.training import config_base


def test_can_create_train_config():
# override args to [], otherwise pytest arguments will be used
args = config_base.get_train_args([])
assert isinstance(args, config_base.TrainConfig)
Loading