Fix broken sampler tests (#1896)

Co-authored-by: Antoni Baum <antoni.baum@protonmail.com>
This commit is contained in:
Woosuk Kwon
2023-12-02 16:06:17 -08:00
committed by GitHub
parent 4cefa9b49b
commit 5f09cbdb63
2 changed files with 41 additions and 21 deletions

View File

@@ -25,7 +25,10 @@ class ModelRunner:
self.parallel_config = parallel_config
self.scheduler_config = scheduler_config
self.sliding_window = model_config.get_sliding_window()
# model_config can be None in tests/samplers/test_sampler.py.
# FIXME(woosuk): This is a hack to make the tests work. Refactor this.
self.sliding_window = (model_config.get_sliding_window()
if model_config is not None else None)
self.model = None
self.block_size = None # Set after initial profiling.