Skip to content

Unable to run monai-deploy run #415

Closed
@mostafasynthesis

Description

@mostafasynthesis

Describe the bug

I have tested my scripts successfully via monai-deploy exec, and created a package via monai-deploy package. However, I am getting the following error when running it via monai-deploy run

Reading MONAI App Package manifest...
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Traceback (most recent call last):
  File "/root/.local/lib/python3.8/site-packages/monai/deploy/core/io_context.py", line 112, in set
    check_type("value", value, data_type)
TypeError: check_type() takes 2 positional arguments but 3 were given

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/monai/app/app.py", line 26, in
    App(do_run=True)
  File "/root/.local/lib/python3.8/site-packages/monai/deploy/core/application.py", line 129, in init
    self.run(log_level=args.log_level)
  File "/root/.local/lib/python3.8/site-packages/monai/deploy/core/application.py", line 429, in run
    executor_obj.run()
  File "/root/.local/lib/python3.8/site-packages/monai/deploy/core/executors/single_process_executor.py", line 93, in run
    op_exec_context.input_context.set(DataPath(input_path, read_only=True), input_label)
  File "/root/.local/lib/python3.8/site-packages/monai/deploy/core/io_context.py", line 114, in set
    raise IOMappingError(
monai.deploy.exceptions.IOMappingError: The data type of 'image' in the input of '<preprocessor_operator.PreprocessorOperator object at 0x40c84f1e80>' is <class 'monai.deploy.core.domain.datapath.DataPath'>, but the value to set is the data type of <class 'monai.deploy.core.domain.datapath.DataPath'>.

ERROR: MONAI Application "arm_bone_segmentation:latest" failed.

Environment

It is to be noted that I am using the base image from "docker pull nvcr.io/nvidia/pytorch:21.07-py3" to create the package.

Printing MONAI config...
MONAI version: 1.1.0
Numpy version: 1.24.2
Pytorch version: 1.13.1
MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
MONAI rev id: a2ec3752f54bfc3b40e7952234fbeb5452ed63e3
MONAI file: /Users/mostafapashazadeh/.pyenv/versions/3.10.8/lib/python3.10/site-packages/monai/init.py

Printing system config...
System: Darwin
Mac version: 12.2
Platform: macOS-12.2-arm64-arm-64bit
Processor: arm
Machine: arm64
Python version: 3.10.8
Process name: python3.10

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions