[Misc] Fix left comments for PR298 (#346)
Signed-off-by: Gaohan123 <hgaoaf@connect.ust.hk>
This commit is contained in:
1 parent
acf66ee2cc
commit
c4cd502d82
3 files changed
+19
-22
No files matched your search
@@ -9,13 +9,13 @@ steps:
|
|||||||
agents:
|
agents:
|
||||||
queue: "cpu_queue_premerge_us_east_1"
|
queue: "cpu_queue_premerge_us_east_1"
|
||||||
|
|
||||||
- label: "Test on NPU"
|
# - label: "Test on NPU"
|
||||||
depends_on: ~
|
# depends_on: ~
|
||||||
key: npu-test
|
# key: npu-test
|
||||||
commands:
|
# commands:
|
||||||
- ".buildkite/scripts/hardware_ci/run_npu_test.sh"
|
# - ".buildkite/scripts/hardware_ci/run_npu_test.sh"
|
||||||
agents:
|
# agents:
|
||||||
queue: "ascend"
|
# queue: "ascend"
|
||||||
|
|
||||||
- label: "Simple Unit Test"
|
- label: "Simple Unit Test"
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
@@ -294,21 +294,15 @@ class OmniLLM:
|
|||||||
|
|
||||||
# Determine the final stage for E2E stats (highest stage_id with final_output=True; fallback to last stage)
|
# Determine the final stage for E2E stats (highest stage_id with final_output=True; fallback to last stage)
|
||||||
final_stage_id_to_prompt = {}
|
final_stage_id_to_prompt = {}
|
||||||
try:
|
for rid, prompt in request_id_to_prompt.items():
|
||||||
for rid, prompt in request_id_to_prompt.items():
|
if isinstance(prompt, dict):
|
||||||
final_stage_id_for_e2e = get_final_stage_id_for_e2e(
|
prompt_modalities = prompt.get("modalities", None)
|
||||||
prompt.get("modalities", None), self.output_modalities, self.stage_list
|
else:
|
||||||
)
|
prompt_modalities = None
|
||||||
final_stage_id_to_prompt[rid] = final_stage_id_for_e2e
|
final_stage_id_for_e2e = get_final_stage_id_for_e2e(
|
||||||
|
prompt_modalities, self.output_modalities, self.stage_list
|
||||||
except Exception as e:
|
|
||||||
logger.debug(
|
|
||||||
"[Orchestrator] Failed to determine final stage for E2E; falling back to last: %s",
|
|
||||||
e,
|
|
||||||
exc_info=True,
|
|
||||||
)
|
)
|
||||||
for rid, prompt in request_id_to_prompt.items():
|
final_stage_id_to_prompt[rid] = final_stage_id_for_e2e
|
||||||
final_stage_id_to_prompt[rid] = len(self.stage_list) - 1
|
|
||||||
|
|
||||||
# Metrics/aggregation helper
|
# Metrics/aggregation helper
|
||||||
metrics = OrchestratorMetrics(
|
metrics = OrchestratorMetrics(
|
||||||
|
|||||||
@@ -148,7 +148,9 @@ def load_stage_configs_from_yaml(config_path: str, base_engine_args: dict | None
|
|||||||
return stage_args
|
return stage_args
|
||||||
|
|
||||||
|
|
||||||
def get_final_stage_id_for_e2e(output_modalities: list[str], default_modalities: list[str], stage_list: list) -> int:
|
def get_final_stage_id_for_e2e(
|
||||||
|
output_modalities: list[str] | None, default_modalities: list[str], stage_list: list
|
||||||
|
) -> int:
|
||||||
"""Get the final stage id for e2e.
|
"""Get the final stage id for e2e.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -163,6 +165,7 @@ def get_final_stage_id_for_e2e(output_modalities: list[str], default_modalities:
|
|||||||
for modality in output_modalities:
|
for modality in output_modalities:
|
||||||
if modality not in default_modalities:
|
if modality not in default_modalities:
|
||||||
logger.warning(f"Invalid output modality: {modality}, ignoring it")
|
logger.warning(f"Invalid output modality: {modality}, ignoring it")
|
||||||
|
# TODO: if user specifies unsupported modalities, invalid it and raise an error
|
||||||
continue
|
continue
|
||||||
prompt_modalities.append(modality)
|
prompt_modalities.append(modality)
|
||||||
output_modalities = prompt_modalities
|
output_modalities = prompt_modalities
|
||||||
|
|||||||
Reference in new issue
Block a user