Files
Dachun Sun 36ac5f583b Multi-node batched validation and improvement on strategy selection (#148)
* More metadata when binarize

* Picklable AttrDict

* Support other notion of 'sizes'

* Better strategy getter, Ds TB logger, and eval batch sampler.

* Add title to plots and specify figsize

* Unify batch sampler and bug fixes

* Batch and multi-device validation

* Fix imports

* Fix deadlock under multigpu and resume from ckpt

* Remove unnecessary if in base_dataset

* Move build loss to finish init and ft to build model

* Prevent repeated valid item

* Remove optimizer_idx to support lightning 2.1

* Warning message fix

* Fix val error when aux is off

* Rename fields in metadata and add doc

* Adjust respective duration logging for each speaker

* val persisent worker, module list ordering, update doc

---------

Co-authored-by: yqzhishen <yangqian_1015@icloud.com>
2023-10-29 00:37:14 +08:00

32 lines
750 B
Python

import importlib
import os
import sys
from pathlib import Path
root_dir = Path(__file__).parent.parent.resolve()
os.environ['PYTHONPATH'] = str(root_dir)
sys.path.insert(0, str(root_dir))
os.environ['TORCH_CUDNN_V8_API_ENABLED'] = '1' # Prevent unacceptable slowdowns when using 16 precision
from utils.hparams import set_hparams, hparams
set_hparams()
if not hparams['nccl_p2p']:
print("Disabling NCCL P2P")
os.environ['NCCL_P2P_DISABLE'] = '1'
def run_task():
assert hparams['task_cls'] != ''
pkg = ".".join(hparams["task_cls"].split(".")[:-1])
cls_name = hparams["task_cls"].split(".")[-1]
task_cls = getattr(importlib.import_module(pkg), cls_name)
task_cls.start()
if __name__ == '__main__':
run_task()