MCPcopy Create free account
hub / github.com/AI-Hypercomputer/maxtext / get_test_config

Method get_test_config

tests/data_loader_test.py:51–62  ·  view source on GitHub ↗

Generate config for tests

(self, reuse_example_batch, **kwargs)

Source from the content-addressed store, hash-verified

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]

Callers 1

setUpMethod · 0.95

Calls 2

updateMethod · 0.80
initializeMethod · 0.45

Tested by

no test coverage detected