|
46 | 46 | from utils.autobatch import check_train_batch_size |
47 | 47 | from utils.callbacks import Callbacks |
48 | 48 | from utils.downloads import attempt_download, is_url |
49 | | -from utils.general import (GIT, LOGGER, TQDM_BAR_FORMAT, check_amp, check_dataset, check_file, check_git_status, |
50 | | - check_img_size, check_requirements, check_suffix, check_yaml, colorstr, get_latest_run, |
51 | | - increment_path, init_seeds, intersect_dicts, labels_to_class_weights, |
| 49 | +from utils.general import (LOGGER, TQDM_BAR_FORMAT, check_amp, check_dataset, check_file, check_git_info, |
| 50 | + check_git_status, check_img_size, check_requirements, check_suffix, check_yaml, colorstr, |
| 51 | + get_latest_run, increment_path, init_seeds, intersect_dicts, labels_to_class_weights, |
52 | 52 | labels_to_image_weights, one_cycle, print_args, print_mutation, strip_optimizer, yaml_save) |
53 | 53 | from utils.loggers import GenericLogger |
54 | 54 | from utils.plots import plot_evolve, plot_labels |
|
62 | 62 | LOCAL_RANK = int(os.getenv('LOCAL_RANK', -1)) # https://pytorch.org/docs/stable/elastic/run.html |
63 | 63 | RANK = int(os.getenv('RANK', -1)) |
64 | 64 | WORLD_SIZE = int(os.getenv('WORLD_SIZE', 1)) |
| 65 | +GIT_INFO = check_git_info() |
65 | 66 |
|
66 | 67 |
|
67 | 68 | def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictionary |
@@ -390,7 +391,7 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio |
390 | 391 | 'updates': ema.updates, |
391 | 392 | 'optimizer': optimizer.state_dict(), |
392 | 393 | 'opt': vars(opt), |
393 | | - 'git': GIT, # {remote, branch, commit} if a git repo |
| 394 | + 'git': GIT_INFO, # {remote, branch, commit} if a git repo |
394 | 395 | 'date': datetime.now().isoformat()} |
395 | 396 |
|
396 | 397 | # Save last, best and delete |
|
0 commit comments