Validate configuration settings.
(config)
| 30 | |
| 31 | |
| 32 | def _validate_config(config): |
| 33 | """Validate configuration settings.""" |
| 34 | assert config.load_full_state_path == "", ( |
| 35 | "Decode doesn't operate on full states! Convert to parameter checkpoint first." |
| 36 | "Using generate_param_only_checkpoint." |
| 37 | ) |
| 38 | assert ( |
| 39 | 0 < _INITIAL_PREFILL_STREAMS <= _NUM_STREAMS |
| 40 | ), f"_INITIAL_PREFILL_STREAMS ({_INITIAL_PREFILL_STREAMS}) must be > 0 and <= _NUM_STREAMS ({_NUM_STREAMS})" |
| 41 | |
| 42 | |
| 43 | def main(argv: Sequence[str]) -> None: |