File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,15 @@ def __post_init__(self) -> None:
78
78
self .long_prefill_token_threshold = \
79
79
max (1 , int (self .max_model_len * 0.04 ))
80
80
81
- assert (self .max_long_partial_prefills > 0 )
82
- assert (self .long_prefill_token_threshold > 0 )
81
+ if self .max_long_partial_prefills <= 0 :
82
+ raise ValueError (
83
+ f"max_long_partial_prefills must be positive, but got "
84
+ f"{ self .max_long_partial_prefills } " )
85
+ if self .long_prefill_token_threshold <= 0 :
86
+ raise ValueError (
87
+ f"long_prefill_token_threshold must be positive, but got "
88
+ f"{ self .long_prefill_token_threshold } " )
89
+
83
90
if self .policy != "fcfs" :
84
91
raise NotImplementedError (
85
92
f"currently AscendScheduler only supports fcfs policy, got { self .policy } "
You can’t perform that action at this time.
0 commit comments