(self)
| 100 | self.assertEqual(len(f.readlines()), 4) |
| 101 | |
| 102 | def setUp(self): |
| 103 | self.config = get_template_config() |
| 104 | self.config.mode = "explore" |
| 105 | self.config.checkpoint_root_dir = get_checkpoint_path() |
| 106 | dataset_config = get_unittest_dataset_config("countdown", "train") |
| 107 | self.config.buffer.explorer_input.taskset = dataset_config |
| 108 | self.config.buffer.trainer_input.experience_buffer = ExperienceBufferConfig( |
| 109 | name="test_buffer", storage_type=StorageType.FILE.value |
| 110 | ) |
| 111 | self.config.check_and_update() |
| 112 | ray.init( |
| 113 | ignore_reinit_error=True, |
| 114 | runtime_env={"env_vars": self.config.get_envs()}, |
| 115 | namespace="trinity_unittest", |
| 116 | ) |
| 117 | os.makedirs(self.config.buffer.cache_dir, exist_ok=True) |
| 118 | file_path = self.config.buffer.trainer_input.experience_buffer.path |
| 119 | if os.path.exists(file_path): |
| 120 | os.remove(file_path) |
| 121 | |
| 122 | def tearDown(self): |
| 123 | ray.shutdown() |
nothing calls this directly
no test coverage detected