Skip to content
Merged
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
17 changes: 7 additions & 10 deletions torchx/runner/test/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,20 +470,17 @@ def test_dump_and_load_all_registered_schedulers(self) -> None:
sfile = StringIO()
dump(sfile)

scheduler_factories = {
**get_scheduler_factories(),
**(
get_scheduler_factories(
group="torchx.schedulers.orchestrator", skip_defaults=True
)
or {}
),
}
scheduler_factories = get_scheduler_factories()

for sched_name, sched in scheduler_factories.items():
sfile.seek(0) # reset the file pos
cfg = {}
load(scheduler=sched_name, f=sfile, cfg=cfg)
try:
load(scheduler=sched_name, f=sfile, cfg=cfg)
except ModuleNotFoundError:
# just test the ones that have been installed
continue

for opt_name, _ in sched("test").run_opts():
self.assertTrue(
opt_name in cfg,
Expand Down
Loading