Skip to content

[Fix] Allow default TIS function usage when get_mismatch_metrics is set#1483

Open
eecspan wants to merge 1 commit intoTHUDM:mainfrom
eecspan:fix/mismatch-metrics-logic
Open

[Fix] Allow default TIS function usage when get_mismatch_metrics is set#1483
eecspan wants to merge 1 commit intoTHUDM:mainfrom
eecspan:fix/mismatch-metrics-logic

Conversation

@eecspan
Copy link

@eecspan eecspan commented Jan 23, 2026

Description

This PR addresses a logical conflict between slime/utils/arguments.py and slime/backends/megatron_utils/loss.py.

Motivation

Previously, slime_validate_args enforced a strict assertion that custom_tis_function_path must be provided when get_mismatch_metrics is enabled. However, the backend logic in loss.py explicitly supports a fallback to vanilla_tis_function when no custom path is provided.

Since vanilla_tis_function correctly computes and returns metrics (e.g., tis, tis_clipfrac), the previous assertion unnecessarily prevented users from observing mismatch metrics using the default implementation.

Modification

  • Replaced the strict assertion in slime/utils/arguments.py with a warning.
  • Now, if get_mismatch_metrics is set without a custom path, the system warns the user (for visibility) and correctly falls back to the default TIS function instead of raising an error.

@eecspan eecspan force-pushed the fix/mismatch-metrics-logic branch 5 times, most recently from 561138c to 95ce13a Compare February 1, 2026 07:19
@eecspan eecspan force-pushed the fix/mismatch-metrics-logic branch from 95ce13a to 8ab1e82 Compare February 3, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant