Generate config for tests
(self, reuse_example_batch, **kwargs)
| 49 | self.mock_data_iterator = MagicMock() |
| 50 | |
| 51 | def get_test_config(self, reuse_example_batch, **kwargs): |
| 52 | """Generate config for tests""" |
| 53 | args = { |
| 54 | "run_name": "test", |
| 55 | "enable_checkpointing": False, |
| 56 | "reuse_example_batch": reuse_example_batch, |
| 57 | } |
| 58 | args.update(kwargs) |
| 59 | return pyconfig.initialize( |
| 60 | [None, os.path.join(MAXTEXT_PKG_DIR, "configs", "base.yml")], |
| 61 | **args, |
| 62 | ) |
| 63 | |
| 64 | def test_load_next_batch_success(self): |
| 65 | expected_shape = [jax.device_count(), self.config.max_target_length] |
no test coverage detected