Validates the configuration is set correctly for 'train.py'.
(config)
| 268 | |
| 269 | |
| 270 | def validate_train_config(config): |
| 271 | """Validates the configuration is set correctly for 'train.py'.""" |
| 272 | |
| 273 | assert config.run_name, "Erroring out, need a real run_name" |
| 274 | if config.dataset_path and not config.dataset_path.startswith("gs://"): |
| 275 | max_logging.log("WARNING: 'dataset_path' might be pointing your local file system") |
| 276 | if not config.base_output_directory.startswith("gs://"): |
| 277 | max_logging.log("WARNING: 'base_output_directory' might be pointing your local file" " system") |
| 278 | assert config.steps > 0, "You must set steps or learning_rate_schedule_steps to a positive integer." |
| 279 | |
| 280 | if config.quantization in ("fp8", "nanoo_fp8"): |
| 281 | # pylint: disable=line-too-long |
| 282 | assert config.gradient_accumulation_steps == 1, ( |
| 283 | "fp8 can't be used with gradient_accumulation_steps right now. Please" |
| 284 | " use other quantization or set gradient_accumulation_steps to 1" |
| 285 | ) |
| 286 | |
| 287 | if config.packing and config.dataset_type == "synthetic": |
| 288 | max_logging.log( |
| 289 | "WARNING: Sequence packing is essentially ignored for synthetic data. " |
| 290 | "Please use a real dataset to use sequence packing." |
| 291 | ) |