Explicit `requirements.txt` location (#4225)
Browse files
train.py
CHANGED
@@ -451,7 +451,7 @@ def main(opt):
|
|
451 |
if RANK in [-1, 0]:
|
452 |
print(colorstr('train: ') + ', '.join(f'{k}={v}' for k, v in vars(opt).items()))
|
453 |
check_git_status()
|
454 |
-
check_requirements(exclude=['thop'])
|
455 |
|
456 |
# Resume
|
457 |
if opt.resume and not check_wandb_resume(opt): # resume an interrupted run
|
|
|
451 |
if RANK in [-1, 0]:
|
452 |
print(colorstr('train: ') + ', '.join(f'{k}={v}' for k, v in vars(opt).items()))
|
453 |
check_git_status()
|
454 |
+
check_requirements(requirements=FILE.parent / 'requirements.txt', exclude=['thop'])
|
455 |
|
456 |
# Resume
|
457 |
if opt.resume and not check_wandb_resume(opt): # resume an interrupted run
|
val.py
CHANGED
@@ -320,7 +320,7 @@ def parse_opt():
|
|
320 |
def main(opt):
|
321 |
set_logging()
|
322 |
print(colorstr('val: ') + ', '.join(f'{k}={v}' for k, v in vars(opt).items()))
|
323 |
-
check_requirements(exclude=('tensorboard', 'thop'))
|
324 |
|
325 |
if opt.task in ('train', 'val', 'test'): # run normally
|
326 |
run(**vars(opt))
|
|
|
320 |
def main(opt):
|
321 |
set_logging()
|
322 |
print(colorstr('val: ') + ', '.join(f'{k}={v}' for k, v in vars(opt).items()))
|
323 |
+
check_requirements(requirements=FILE.parent / 'requirements.txt', exclude=('tensorboard', 'thop'))
|
324 |
|
325 |
if opt.task in ('train', 'val', 'test'): # run normally
|
326 |
run(**vars(opt))
|