Copies the specified configuration and tokenizer files into the output directory.
(source_dir: Path, out_dir: Path)
| 442 | |
| 443 | |
| 444 | def copy_config_files(source_dir: Path, out_dir: Path) -> None: |
| 445 | """Copies the specified configuration and tokenizer files into the output directory.""" |
| 446 | |
| 447 | config_files = ['generation_config.json', 'model_config.yaml'] |
| 448 | tokenizer_files = ['tokenizer.json', 'tokenizer.model', 'tokenizer_config.json'] |
| 449 | |
| 450 | for file_name in config_files + tokenizer_files: |
| 451 | src_path = source_dir / file_name |
| 452 | if src_path.exists(): |
| 453 | shutil.copy(src_path, out_dir) |
| 454 | |
| 455 | |
| 456 | def CLI(*args: Any, **kwargs: Any) -> Any: |
no outgoing calls
no test coverage detected