FMInference / FlexLLMGen

Running large language models on a single GPU for throughput-oriented scenarios.
Apache License 2.0
9.2k stars 547 forks source link

how to install from source #118

Open SeekPoint opened 1 year ago

SeekPoint commented 1 year ago

(gh_FlexGen) r730ub20@r730ub20-M0:~/llm_dev/FlexGen$ git remote -v origin https://github.com/FMInference/FlexGen (fetch) origin https://github.com/FMInference/FlexGen (push) (gh_FlexGen) r730ub20@r730ub20-M0:~/llm_dev/FlexGen$ pip install -e . ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /home/r730ub20/llm_dev/FlexGen (A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.) (gh_FlexGen) r730ub20@r730ub20-M0:~/llm_dev/FlexGen$

SeekPoint commented 1 year ago

after I fake a setup.py

(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$

tanzelin430 commented 1 year ago

Hi!I also run into this weird problem.Have you solved it?

tanzelin430 commented 1 year ago

Hi, I have just solved the problem, try using pip install --upgrade pip to upgrade pip(>= 21.3).Then try again run pip install -e . I recognize that you are interested in MLsys&model opt? Maybe we could make a friend~

SeekPoint commented 1 year ago

still failed

(gh_FlexGen) ub2004@ub2004-B85M-A0:~/llm_dev/FlexGen$ pip install -e . Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Obtaining file:///home/ub2004/llm_dev/FlexGen Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... done Installing backend dependencies ... done Preparing editable metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing editable metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [16 lines of output] Traceback (most recent call last): File "/home/ub2004/anaconda3/envs/gh_FlexGen/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/ub2004/anaconda3/envs/gh_FlexGen/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/ub2004/anaconda3/envs/gh_FlexGen/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 181, in prepare_metadata_for_build_editable return hook(metadata_directory, config_settings) File "/tmp/pip-build-env-cze06jep/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 454, in prepare_metadata_for_build_editable return self.prepare_metadata_for_build_wheel( File "/tmp/pip-build-env-cze06jep/overlay/lib/python3.10/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-cze06jep/overlay/lib/python3.10/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-cze06jep/overlay/lib/python3.10/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 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details. (gh_FlexGen) ub2004@ub2004-B85M-A0:~/llm_dev/FlexGen$