Giter VIP home page Giter VIP logo

Comments (3)

guotuofeng avatar guotuofeng commented on August 15, 2024

@jwanga, would you please install https://github.com/microsoft/onnxruntime-extensions and pass the get_library_path() as the arguments like?:
convert_onnx_models_to_ort.py --custom_op_library CUSTOM_OP_LIBRARY

Please let us know if it doesn't work.

from olive.

jwanga avatar jwanga commented on August 15, 2024

That worked. Thank you, @guotuofeng

from olive.

neso613 avatar neso613 commented on August 15, 2024

Hi @guotuofeng

I am trying similar thing using following code snippet

from transformers import WhisperProcessor from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
model_name = "openai/whisper-large-v2"
processor = WhisperProcessor.from_pretrained(model_name)
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=True)
model.save_pretrained('dir_path')

on the given dir path, some .onnx flles created. But how to make a single .onnx file.
Following command gives error
root@xyx:/workspace/Olive/examples/whisper# python -m olive.workflows.run --config whisper_gpu_fp32.json --setup

Traceback (most recent call last):
File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/conda/lib/python3.8/site-packages/olive/workflows/run/main.py", line 16, in
run(**vars(args))
File "/opt/conda/lib/python3.8/site-packages/olive/workflows/run/run.py", line 129, in run
input_model = config.input_model.create_model()
File "/opt/conda/lib/python3.8/site-packages/olive/model.py", line 167, in create_model
return REGISTRYself.type.lower()
File "/opt/conda/lib/python3.8/site-packages/olive/model.py", line 558, in init
self.hf_config = validate_config(hf_config, HFConfig) if hf_config else None
File "/opt/conda/lib/python3.8/site-packages/olive/common/config_utils.py", line 242, in validate_config
config = instance_class(**config)
File "pydantic/main.py", line 406, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 2 validation errors for HFConfig
components -> 0 -> io_config
value is not a valid dict (type=type_error.dict)
components -> 1 -> io_config
value is not a valid dict (type=type_error.dict)

from olive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.