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

getting error while running llama2/bert on GPU #1279

Open
himanshushukla12 opened this issue Aug 5, 2024 · 5 comments
Open

getting error while running llama2/bert on GPU #1279

himanshushukla12 opened this issue Aug 5, 2024 · 5 comments

Comments

@himanshushukla12
Copy link

when I run the command:

! python3 -m olive.workflows.run --config config_gpu.json

I'm getting the issue:

/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/cli/launcher.py:56: FutureWarning: Running `python -m olive.workflows.run` is deprecated and might be removed in the future. Please use `olive run` or `python -m olive run` instead.
  warn(
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/workflows/run/__main__.py", line 10, in <module>
    legacy_call("olive.workflows.run", "run", *sys.argv[1:])
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/cli/launcher.py", line 64, in legacy_call
    main(raw_args)
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/cli/launcher.py", line 44, in main
    service.run()
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/cli/run.py", line 42, in run
    olive_run(**var_args)
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/workflows/run/run.py", line 284, in run
    run_config = RunConfig.parse_file_or_obj(run_config)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/common/config_utils.py", line 127, in parse_file_or_obj
    return cls.parse_file(file_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/pydantic/v1/main.py", line 569, in parse_file
    return cls.parse_obj(obj)
           ^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/pydantic/v1/main.py", line 526, in parse_obj
    return cls(**obj)
           ^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/pydantic/v1/main.py", line 339, in __init__
    values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/pydantic/v1/main.py", line 1074, in validate_model
    v_, errors_ = field.validate(value, values, loc=field.alias, cls=cls_)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/pydantic/v1/fields.py", line 864, in validate
    v, errors = self._apply_validators(v, values, loc, cls, self.pre_validators)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/pydantic/v1/fields.py", line 1154, in _apply_validators
    v = validator(cls, v, values, self, self.model_config)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/pydantic/v1/class_validators.py", line 306, in <lambda>
    return lambda cls, v, values, field, config: validator(cls, v, values=values)
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/z004x2xz/WorkAssignedByMatt/Olive/venvOlive3.11/lib/python3.11/site-packages/olive/workflows/run/config.py", line 161, in insert_aml_client
    input_model_path = v["config"].get("model_path")
                       ~^^^^^^^^^^
KeyError: 'config'

OS Version:
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Olive Version:
ONNXRuntime Version:
Version: 1.18.1

I'm using the notebook given in the examples

@MayuraRam
Copy link

I am getting a similar error when I run the following:
python -m olive.workflows.run --config whisper_cpu_int8.json --setup

@MayuraRam
Copy link

I was able to avoid the KeyError: 'config' issue by installing Olive from source - as noted here - https://github.com/microsoft/Olive/blob/main/examples/README.md

@MayuraRam
Copy link

But now I get the following errors when I try to look at the quantized model that was created:
[32856:0806/092327.441:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5)
[32856:0806/092327.441:ERROR:disk_cache.cc(208)] Unable to create cache

@xiaoyu-work
Copy link
Contributor

@himanshushukla12 can you please install Olive from source with main branch and try again?

@xiaoyu-work
Copy link
Contributor

@MayuraRam can you please open a new issue and paste the full logs of your error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants