(case)
| 90 | |
| 91 | |
| 92 | def _engine(case): |
| 93 | extra, dtype = CONFIGS[case] |
| 94 | if dtype not in get_accelerator().supported_dtypes(): |
| 95 | pytest.skip(f"{dtype} is not supported by {get_accelerator().device_name()}") |
| 96 | config = { |
| 97 | "train_micro_batch_size_per_gpu": 1, |
| 98 | "optimizer": { |
| 99 | "type": "Adam", |
| 100 | "params": { |
| 101 | "lr": 1e-3 |
| 102 | } |
| 103 | }, |
| 104 | **extra, |
| 105 | } |
| 106 | model = EmptyTailModel() |
| 107 | engine, *_ = deepspeed.initialize(model=model, model_parameters=model.parameters(), config=config) |
| 108 | return engine |
| 109 | |
| 110 | |
| 111 | def _step(engine, case): |
no test coverage detected