FlexGen icon indicating copy to clipboard operation
FlexGen copied to clipboard

AttributeError: 'OptLM' object has no attribute 'weight_home'

Open shadowcz007 opened this issue 1 year ago • 9 comments

AttributeError: 'OptLM' object has no attribute 'weight_home'

shadowcz007 avatar Feb 28 '23 06:02 shadowcz007

@shadowcz007 I am seeing same error. how did you resolve it?

yandod avatar Mar 01 '23 05:03 yandod

Could you give the whole call stack?

merrymercy avatar Mar 01 '23 05:03 merrymercy

Anaconda Powershell Prompt (anaconda3) 02_03_2023 00_02_22

Regmas2 avatar Mar 01 '23 23:03 Regmas2

I was able to help @Regmas2 resolve the issue by creating a new conda venv, followed by:

pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117 pip install --upgrade Pillow pip install -e .

Afterwards everything worked.

glenneroo avatar Mar 02 '23 00:03 glenneroo

I resolved my issue with a reinstalling torch with cuda support same as above!

yandod avatar Mar 06 '23 01:03 yandod

I checked out the index you provided but 1.13.1+cu117 is not in the list

(flexgen) C:\Users\35934>pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117 Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117 ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 (from versions: 2.0.0, 2.0.0+cu117, 2.0.1, 2.0.1+cu117) ERROR: No matching distribution found for torch==1.13.1+cu117

[notice] A new release of pip available: 22.3.1 -> 23.1.2 [notice] To update, run: C:\Users\35934\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip

pxc3113 avatar May 11 '23 10:05 pxc3113

(gh_FlexGen) r730ub20@r730ub20-M0:~/llm_dev/FlexGen$ pip install -e . Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Obtaining file:///home/r730ub20/llm_dev/FlexGen Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing wheel metadata ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /tmp/tmp06xly_hd prepare_metadata_for_build_wheel /tmp/tmpozbnb1uw cwd: /home/r730ub20/llm_dev/FlexGen Complete output (14 lines): Traceback (most recent call last): File "/tmp/tmp06xly_hd", line 280, in main() File "/tmp/tmp06xly_hd", line 263, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/tmp/tmp06xly_hd", line 133, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/tmp/pip-build-env-bruz6ip8/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 382, in prepare_metadata_for_build_wheel self._bubble_up_info_directory(metadata_directory, ".egg-info") File "/tmp/pip-build-env-bruz6ip8/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 353, in _bubble_up_info_directory info_dir = self._find_info_directory(metadata_directory, suffix) File "/tmp/pip-build-env-bruz6ip8/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 364, in _find_info_directory assert len(candidates) == 1, f"Multiple {suffix} directories found" AssertionError: Multiple .egg-info directories found ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp06xly_hd prepare_metadata_for_build_wheel /tmp/tmpozbnb1uw Check the logs for full command output. (gh_FlexGen) r730ub20@r730ub20-M0:~/llm_dev/FlexGen$

SeekPoint avatar May 30 '23 16:05 SeekPoint

pip install -e . always failed!!!

SeekPoint avatar Jun 28 '23 09:06 SeekPoint

Hey, I am still getting the same error. I have tried installing different Torch versions with CUDA, but I have been unlucky. Could someone please recommend some other solutions?

Siddharthj2002 avatar Mar 14 '24 19:03 Siddharthj2002