Skip to content

TypeError: dump_all() got an unexpected keyword argument 'sort_keys' #414

@IamSparky

Description

@IamSparky

image

Got this error while running the train.py file in Google Colab

the full link of the notebook is - https://colab.research.google.com/drive/10J3_S3_pjpvh55ZwoBnjK3xyX0zTRSSq?usp=sharing

🐛 Bug

A clear and concise description of what the bug is.

To Reproduce (REQUIRED)

Input:

!python train.py --img 1024 --batch 32 --epochs 10 --data /content/wheat.yaml --cfg models/yolov5s.yaml --name wm --nosave --cache

Output:

Apex recommended for faster mixed precision training: https://github.com/NVIDIA/apex
Namespace(batch_size=32, bucket='', cache_images=True, cfg='models/yolov5s.yaml', data='/content/wheat.yaml', device='', epochs=10, evolve=False, hyp='', img_size=[1024], multi_scale=False, name='wm', noautoanchor=False, nosave=True, notest=False, rect=False, resume=False, single_cls=False, weights='')
Using CUDA device0 _CudaDeviceProperties(name='Tesla K80', total_memory=11441MB)

2020-07-14 21:11:21.719560: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
Start Tensorboard with "tensorboard --logdir=runs", view at http://localhost:6006/
Hyperparameters {'optimizer': 'SGD', 'lr0': 0.01, 'momentum': 0.937, 'weight_decay': 0.0005, 'giou': 0.05, 'cls': 0.58, 'cls_pw': 1.0, 'obj': 1.0, 'obj_pw': 1.0, 'iou_t': 0.2, 'anchor_t': 4.0, 'fl_gamma': 0.0, 'hsv_h': 0.014, 'hsv_s': 0.68, 'hsv_v': 0.36, 'degrees': 0.0, 'translate': 0.0, 'scale': 0.5, 'shear': 0.0}
Traceback (most recent call last):
  File "train.py", line 404, in <module>
    train(hyp)
  File "train.py", line 57, in train
    yaml.dump(hyp, f, sort_keys=False)
  File "/usr/local/lib/python3.6/dist-packages/yaml/__init__.py", line 200, in dump
    return dump_all([data], stream, Dumper=Dumper, **kwds)
TypeError: dump_all() got an unexpected keyword argument 'sort_keys'

Expected behavior

It should start training the model

Environment

I was running it on google colab Gpu

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions