MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / setUp

Method setUp

tests/explorer/scheduler_test.py:479–501  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

477
478class SchedulerTest(unittest.IsolatedAsyncioTestCase):
479 def setUp(self):
480 ray.init(ignore_reinit_error=True)
481 DummyAsyncPartialSnapshotWorkflow._run_index_by_key.clear()
482 self.config = get_template_config()
483 _assign_test_namespace(self.config)
484 _configure_dummy_models(self.config)
485 self.config.explorer.max_retry_times = 1
486 self.config.explorer.max_timeout = 5
487 self.config.explorer.runner_per_model = 2
488 self.config.buffer.train_batch_size = 2
489 self.config.buffer.pad_token_id = 0
490 self.config.buffer.explorer_output = (
491 self.config.buffer.trainer_input.experience_buffer
492 ) = ExperienceBufferConfig(
493 name="test",
494 storage_type=StorageType.QUEUE.value,
495 schema_type="experience",
496 path="",
497 )
498 self.config.buffer.trainer_input.experience_buffer.max_read_timeout = 1
499 self.config.algorithm.repeat_times = 1
500 self.config.check_and_update()
501 self.model_actors = _create_named_model_actors(self.config)
502
503 async def test_get_payload_results(self):
504 scheduler = Scheduler(self.config)

Callers

nothing calls this directly

Calls 6

get_template_configFunction · 0.90
_assign_test_namespaceFunction · 0.85
_configure_dummy_modelsFunction · 0.85
check_and_updateMethod · 0.80

Tested by

no test coverage detected