def upload(params):
    data_version = '-'.join(params['exp_name'].split('_'))
    if os.path.exists((params['output_dir'] / 'wandb')):
        shutil.move(str((params['output_dir'] / 'wandb')), str((params['output_dir'].parent / f"{params['exp_name']}_wandb/")))
    with open((params['output_dir'] / 'dataset-metadata.json'), 'w') as f:
        f.write('{\n')
        f.write(f'''  "title": "{data_version}",
''')
        f.write(f'''  "id": "vincentwang25/{data_version}",
''')
        f.write('  "licenses": [\n')
        f.write('    {\n')
        f.write('      "name": "CC0-1.0"\n')
        f.write('    }\n')
        f.write('  ]\n')
        f.write('}')
    subprocess.call(['kaggle', 'datasets', 'create', '-p', str(params['output_dir']), '-r', 'zip'])
def upload(params):
    data_version = '-'.join(params['exp_name'].split('_'))
    if os.path.exists((params['output_dir'] / 'wandb')):
        shutil.move(str((params['output_dir'] / 'wandb')), str((params['output_dir'].parent / f"{params['exp_name']}_wandb/")))
    with open((params['output_dir'] / 'dataset-metadata.json'), 'w') as f:
        f.write('{\n')
        f.write(f'  "title": "{data_version}",
')
        f.write(f'  "id": "vincentwang25/{data_version}",
')
        f.write('  "licenses": [\n')
        f.write('    {\n')
        f.write('      "name": "CC0-1.0"\n')
        f.write('    }\n')
        f.write('  ]\n')
        f.write('}')
    subprocess.call(['kaggle', 'datasets', 'create', '-p', str(params['output_dir']), '-r', 'zip'])