Error while running the code in colab
naveenkmr22 opened this issue · comments
Usage: ipykernel_launcher.py [OPTIONS]
Try 'ipykernel_launcher.py --help' for help.
Error: No such option: -f
An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
This error is occurred by the line 18 "@click.command()" of train.py file
if I comment this line , then the following error is showing:
TypeError Traceback (most recent call last)
in
305
306 if name == "main":
--> 307 main()
TypeError: main() missing 20 required positional arguments: 'log_dir', 'dataset', 'im_size', 'crop_size', 'window_size', 'window_stride', 'backbone', 'decoder', 'optimizer', 'scheduler', 'weight_decay', 'dropout', 'drop_path', 'batch_size', 'epochs', 'learning_rate', 'normalization', 'eval_freq', 'amp', and 'resume'
Since I am using this code in colab, I copy pasted all the .py files in different cells of notebook.
Also I have changed
CITYSCAPES_CONFIG_PATH = Path(file).parent / "config" / "cityscapes.py"
to
CITYSCAPES_CONFIG_PATH = "C:\Users\Naveen kumar\OneDrive\Desktop\codeForProject\segmenter-master\segm\data\config\cityscapes.py"
in file located in " segmenter-master\segm\data\config\cityscapes.py "
and done similar changes to all the files which contains line : "Path(file)"
This error seems to be occurring because you don't have any command line arguments because it's in colab. If you hardcode the keyword args object, this issue should go away.