Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: ModuleNotFoundError: No module named 'tensorrt' when using morpheus tools in nlp-si-detection example #1979

Closed
2 tasks done
aadesoba-nv opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working external This issue was filed by someone outside of the Morpheus team Needs Triage Need team to review and classify

Comments

@aadesoba-nv
Copy link

Version

24.10-release

Which installation method(s) does this occur on?

Source

Describe the bug.

when running the sid-minibert-trt model I am trying to create the model.plan for the sid-minibert-onnx modelbased on the README.md instruction here. using the command below from within the release container: it says morpheus not found.

morpheus tools onnx-to-trt --input_model ../../sid-minibert-onnx/1/model.onnx --output_model ./model.plan --batches 1 8 --batches 1 16 --batches 1 32 --seq_length 256 --max_workspace_size 16000

Minimum reproducible example

(morpheus) root@tme-vrl135-2:/workspace/models/triton-model-repo/sid-minibert-trt/1# morpheus tools onnx-to-trt --input_model ../../sid-minibert-onnx/1/sid-minibert.onnx --output_model ./sid-minibert-trt_b1-8_b1-16_b1-32.engine --batches 1 8 --batches 1 16 --batches 1 32 --seq_length 256 --max_workspace_size 16000
Usage: morpheus tools onnx-to-trt [OPTIONS]
Try 'morpheus tools onnx-to-trt --help' for help.

changed this path: '../../sid-minibert-onnx/1/sid-minibert.onnx to '../../sid-minibert-onnx/1/model.onnx now the error is a module issue

Relevant log output

Click here to see error details

[Error: Invalid value for '--input_model': Path '../../sid-minibert-onnx/1/sid-minibert.onnx' does not exist.]

cli(obj={}, auto_envvar_prefix='MORPHEUS', show_default=True, prog_name="morpheus")
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/morpheus/cli/utils.py", line 116, in new_func
    return f(ctx, *args, **kwargs)
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/morpheus/cli/commands.py", line 225, in onnx_to_trt
    from morpheus.utils.onnx_to_trt import gen_engine
  File "/opt/conda/envs/morpheus/lib/python3.10/site-packages/morpheus/utils/onnx_to_trt.py", line 22, in <module>
    import tensorrt as trt
ModuleNotFoundError: No module named 'tensorrt'

Full env printout

Click here to see environment details

[Paste the results of print_env.sh here, it will be hidden by default]

Other/Misc.

No response

Code of Conduct

  • I agree to follow Morpheus' Code of Conduct
  • I have searched the open bugs and have found no duplicates for this bug report
@aadesoba-nv aadesoba-nv added the bug Something isn't working label Oct 23, 2024
@morpheus-bot-test morpheus-bot-test bot added Needs Triage Need team to review and classify external This issue was filed by someone outside of the Morpheus team labels Oct 23, 2024
@morpheus-bot-test
Copy link

Hi @aadesoba-nv!

Thanks for submitting this issue - our team has been notified and we'll get back to you as soon as we can!
In the meantime, feel free to add any relevant information to this issue.

@dagardner-nv dagardner-nv self-assigned this Oct 24, 2024
rapids-bot bot pushed a commit that referenced this issue Oct 24, 2024
* Add missing `tensorrt-cu12` dependency to the `model-utils` environment.
* Update `onnx-to-trt` to function with TensorRT v10, removed usage of attributes/methods which were deprecated in v8.4 and removed in v10.
* Update documentation

Closes #1979

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md).
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Yuchen Zhang (https://github.com/yczhang-nv)
  - https://github.com/hsin-c

URL: #1984
@github-project-automation github-project-automation bot moved this from Todo to Done in Morpheus Boards Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external This issue was filed by someone outside of the Morpheus team Needs Triage Need team to review and classify
Projects
Status: Done
Development

No branches or pull requests

2 participants