| 41 | |
| 42 | |
| 43 | def parse_cfgs(): |
| 44 | parser = argparse.ArgumentParser(description="Simple example of a training script.") |
| 45 | parser.add_argument('--config', type=str) |
| 46 | args = parser.parse_args() |
| 47 | cfgs = Config.fromfile(args.config) |
| 48 | |
| 49 | # default to using the same revision for the non-ema model if not specified |
| 50 | if cfgs.non_ema_revision is None: |
| 51 | cfgs.non_ema_revision = cfgs.revision |
| 52 | |
| 53 | return cfgs |
| 54 | |
| 55 | |
| 56 | def get_full_repo_name(model_id: str, organization: Optional[str] = None, token: Optional[str] = None): |