| 307 | |
| 308 | |
| 309 | def format_name_with_dist_and_time( |
| 310 | format_str: str, |
| 311 | run_name: str, |
| 312 | timestamp: Timestamp, |
| 313 | **extra_format_kwargs: object, |
| 314 | ): # noqa: D103 |
| 315 | formatted_str = partial_format( |
| 316 | format_str, |
| 317 | run_name=run_name, |
| 318 | epoch=int(timestamp.epoch), |
| 319 | batch=int(timestamp.batch), |
| 320 | batch_in_epoch=int(timestamp.batch_in_epoch), |
| 321 | sample=int(timestamp.sample), |
| 322 | sample_in_epoch=int(timestamp.sample_in_epoch), |
| 323 | token=int(timestamp.token), |
| 324 | token_in_epoch=int(timestamp.token_in_epoch), |
| 325 | total_wct=timestamp.total_wct.total_seconds(), |
| 326 | epoch_wct=timestamp.epoch_wct.total_seconds(), |
| 327 | batch_wct=timestamp.batch_wct.total_seconds(), |
| 328 | **_get_dist_config(strict=False), |
| 329 | **extra_format_kwargs, |
| 330 | ) |
| 331 | return formatted_str |
| 332 | |
| 333 | |
| 334 | format_name_with_dist_and_time.__doc__ = f"""\ |