Enhance reproducibility in Ulysses attention tests by replacing current_omni_platform.seed_everything with torch's manual_seed and adding support for CUDA devices. Introduce get_supported_tasks method in AsyncOmni class to dynamically determine available tasks based on stage capabilities.

Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
tzhouam committed 2026-03-03 09:45:51 +00:00
1 parent 4d8a76e721
commit 2da9d28f1b
2 files changed
+15 -2

No files matched your search

+10
View File
@@ -658,6 +658,16 @@ class AsyncOmni(OmniBase):
stage.submit(abort_task)
return None
async def get_supported_tasks(self) -> set[str]:
tasks: set[str] = set()
has_comprehension = any(stage.is_comprehension for stage in self.stage_list)
if has_comprehension:
tasks.add("generate")
for stage in self.stage_list:
if getattr(stage, "final_output_type", None) == "audio":
tasks.add("speech")
return tasks if tasks else {"generate"}
async def get_vllm_config(self) -> VllmConfig:
for stage in self.stage_list:
if stage.is_comprehension: