You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 line
934B

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