Keep YuE2 jobs live on the bench and wire target length to semantic tokens.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,6 +32,12 @@ class WorkerTests(unittest.TestCase):
|
||||
self.assertNotEqual(attention, 'flash')
|
||||
self.assertTrue(os.environ.get('PYTORCH_CUDA_ALLOC_CONF', '').startswith('expandable_segments'))
|
||||
|
||||
def test_target_length_maps_to_semantic_max_tokens(self):
|
||||
# 48000 / 1920 = 25 latent frames per second.
|
||||
self.assertEqual(max(200, min(9000, 30 * 25)), 750)
|
||||
self.assertEqual(max(200, min(9000, 15 * 25)), 375)
|
||||
self.assertEqual(max(200, min(9000, 150 * 25)), 3750)
|
||||
|
||||
def test_cuda_oom_detection(self):
|
||||
self.assertTrue(worker.is_cuda_oom(RuntimeError('CUDA out of memory. Tried to allocate 2.49 GiB')))
|
||||
self.assertFalse(worker.is_cuda_oom(RuntimeError('bad lyrics')))
|
||||
|
||||
Reference in New Issue
Block a user