CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hukaixuan19970627

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: hukaixuan19970627/yolov5_obb
Path: blob/master/utils/loggers/wandb/log_dataset.py
Views: 475
1
import argparse
2
3
from wandb_utils import WandbLogger
4
5
from utils.general import LOGGER
6
7
WANDB_ARTIFACT_PREFIX = 'wandb-artifact://'
8
9
10
def create_dataset_artifact(opt):
11
logger = WandbLogger(opt, None, job_type='Dataset Creation') # TODO: return value unused
12
if not logger.wandb:
13
LOGGER.info("install wandb using `pip install wandb` to log the dataset")
14
15
16
if __name__ == '__main__':
17
parser = argparse.ArgumentParser()
18
parser.add_argument('--data', type=str, default='data/coco128.yaml', help='data.yaml path')
19
parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset')
20
parser.add_argument('--project', type=str, default='YOLOv5', help='name of W&B Project')
21
parser.add_argument('--entity', default=None, help='W&B entity')
22
parser.add_argument('--name', type=str, default='log dataset', help='name of W&B run')
23
24
opt = parser.parse_args()
25
opt.resume = False # Explicitly disallow resume check for dataset upload job
26
27
create_dataset_artifact(opt)
28
29