|
- import argparse
-
- import yaml
-
- from wandb_utils import WandbLogger
-
- WANDB_ARTIFACT_PREFIX = 'wandb-artifact://'
-
-
- def create_dataset_artifact(opt):
- with open(opt.data, encoding='ascii', errors='ignore') as f:
- data = yaml.safe_load(f) # data dict
- logger = WandbLogger(opt, '', None, data, job_type='Dataset Creation') # TODO: return value unused
-
-
- if __name__ == '__main__':
- parser = argparse.ArgumentParser()
- parser.add_argument('--data', type=str, default='data/coco128.yaml', help='data.yaml path')
- parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset')
- parser.add_argument('--project', type=str, default='YOLOv5', help='name of W&B Project')
- parser.add_argument('--entity', default=None, help='W&B entity')
-
- opt = parser.parse_args()
- opt.resume = False # Explicitly disallow resume check for dataset upload job
-
- create_dataset_artifact(opt)
|