Skip to content

Check Type error when loading yolo node. #748

@tappyness1

Description

@tappyness1

I have been using Github Actions to run an inference pipeline. One part of it is to load model, which always downloads the weights and proceed to run inference on some images. It was running fine for a few weeks but three days back I encountered the following error.

Run python -m src.main
2023-03-1[7](https://github.com/tappyness1/causion/actions/runs/4448171378/jobs/7810623692#step:7:8) 21:50:47.316131: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/share/miniconda/lib/python3.[8](https://github.com/tappyness1/causion/actions/runs/4448171378/jobs/7810623692#step:7:9)/site-packages/cv2/../../lib64:/opt/hostedtoolcache/Python/3.8.16/x64/lib
2023-03-17 21:50:47.316156: I tensorflow/stream_executor/cuda/cudart_stub.cc:2[9](https://github.com/tappyness1/causion/actions/runs/4448171378/jobs/7810623692#step:7:10)] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2023-03-17 21:50:48 peekingduck.pipeline.nodes.model.yolo  INFO:  Config for node model.yolo is updated to: 'model_type': v4 
2023-03-17 21:50:48 peekingduck.pipeline.nodes.model.yolo  INFO:  Config for node model.yolo is updated to: 'detect': ['car', 'motorcycle', 'truck', 'bus'] 
2023-03-17 21:50:48 root  ERROR:  Traceback (most recent call last):
   File "/usr/share/miniconda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
   File "/usr/share/miniconda/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
   File "/home/runner/work/causion/causion/src/main.py", line 67, in <module>
    main()
   File "/home/runner/work/causion/causion/src/main.py", line 17, in main
    inference_obj = inference()
   File "/home/runner/work/causion/causion/src/inference.py", line 63, in __init__
    self.yolo_node = pkd_yolo.Node(model_type = "v4", detect= ["car", "motorcycle", "truck", "bus"])
   File "/usr/share/miniconda/lib/python3.8/site-packages/peekingduck/pipeline/nodes/model/yolo.py", line 80, in __init__
    super().__init__(config, node_path=__name__, **kwargs)
   File "/usr/share/miniconda/lib/python3.8/site-packages/peekingduck/pipeline/nodes/abstract_node.py", line 68, in __init__
    self.load_node_config(config, kwargs)  # type: ignore
   File "/usr/share/miniconda/lib/python3.8/site-packages/peekingduck/pipeline/nodes/abstract_node.py", line [13](https://github.com/tappyness1/causion/actions/runs/4448171378/jobs/7810623692#step:7:14)5, in load_node_config
    self._check_type(self.config, self._get_config_types())
   File "/usr/share/miniconda/lib/python3.8/site-packages/peekingduck/pipeline/nodes/abstract_node.py", line [15](https://github.com/tappyness1/causion/actions/runs/4448171378/jobs/7810623692#step:7:16)1, in _check_type
    check_type(f"{self.node_name}'s `{full_key}`", config[key], config_type)
 
2023-03-[17](https://github.com/tappyness1/causion/actions/runs/4448171378/jobs/7810623692#step:7:18) [21](https://github.com/tappyness1/causion/actions/runs/4448171378/jobs/7810623692#step:7:22):50:48 root  ERROR:  TypeError: check_type() takes 2 positional arguments but 3 were given
 
Error: Process completed with exit code 1.

peekingduck==1.3.0.post1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions