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

Add setup.py wheel building option #229

Merged
merged 1 commit into from
Jun 2, 2023
Merged

Add setup.py wheel building option #229

merged 1 commit into from
Jun 2, 2023

Conversation

pseudotensor
Copy link
Collaborator

@pseudotensor pseudotensor commented Jun 2, 2023

(h2ollm) jon@pseudotensor:~/h2ogpt$ GPU=1 python setup.py sdist bdist_wheel
running sdist
running egg_info
writing h2ogpt.egg-info/PKG-INFO
writing dependency_links to h2ogpt.egg-info/dependency_links.txt
writing requirements to h2ogpt.egg-info/requires.txt
writing top-level names to h2ogpt.egg-info/top_level.txt
reading manifest file 'h2ogpt.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'h2ogpt.egg-info/SOURCES.txt'
running check
creating h2ogpt-0.1.0
creating h2ogpt-0.1.0/h2ogpt.egg-info
creating h2ogpt-0.1.0/tests
copying files to h2ogpt-0.1.0...
copying LICENSE -> h2ogpt-0.1.0
copying README.md -> h2ogpt-0.1.0
copying setup.py -> h2ogpt-0.1.0
copying ./cli.py -> h2ogpt-0.1.0/.
copying ./client_test.py -> h2ogpt-0.1.0/.
copying ./create_data.py -> h2ogpt-0.1.0/.
copying ./eval.py -> h2ogpt-0.1.0/.
copying ./export_hf_checkpoint.py -> h2ogpt-0.1.0/.
copying ./finetune.py -> h2ogpt-0.1.0/.
copying ./generate.py -> h2ogpt-0.1.0/.
copying ./gpt4all_llm.py -> h2ogpt-0.1.0/.
copying ./gpt_langchain.py -> h2ogpt-0.1.0/.
copying ./gradio_runner.py -> h2ogpt-0.1.0/.
copying ./gradio_themes.py -> h2ogpt-0.1.0/.
copying ./h2oai_pipeline.py -> h2ogpt-0.1.0/.
copying ./image_captions.py -> h2ogpt-0.1.0/.
copying ./llama_flash_attn_monkey_patch.py -> h2ogpt-0.1.0/.
copying ./loaders.py -> h2ogpt-0.1.0/.
copying ./make_db.py -> h2ogpt-0.1.0/.
copying ./pipeline_example.py -> h2ogpt-0.1.0/.
copying ./prompter.py -> h2ogpt-0.1.0/.
copying ./read_wiki_full.py -> h2ogpt-0.1.0/.
copying ./stopping.py -> h2ogpt-0.1.0/.
copying ./utils.py -> h2ogpt-0.1.0/.
copying h2ogpt.egg-info/PKG-INFO -> h2ogpt-0.1.0/h2ogpt.egg-info
copying h2ogpt.egg-info/SOURCES.txt -> h2ogpt-0.1.0/h2ogpt.egg-info
copying h2ogpt.egg-info/dependency_links.txt -> h2ogpt-0.1.0/h2ogpt.egg-info
copying h2ogpt.egg-info/requires.txt -> h2ogpt-0.1.0/h2ogpt.egg-info
copying h2ogpt.egg-info/top_level.txt -> h2ogpt-0.1.0/h2ogpt.egg-info
copying tests/test_cli.py -> h2ogpt-0.1.0/tests
copying tests/test_client_calls.py -> h2ogpt-0.1.0/tests
copying tests/test_eval.py -> h2ogpt-0.1.0/tests
copying tests/test_eval_models.py -> h2ogpt-0.1.0/tests
copying tests/test_imports.py -> h2ogpt-0.1.0/tests
copying tests/test_langchain_simple.py -> h2ogpt-0.1.0/tests
copying tests/test_langchain_units.py -> h2ogpt-0.1.0/tests
copying tests/test_manual_test.py -> h2ogpt-0.1.0/tests
copying tests/test_prompter.py -> h2ogpt-0.1.0/tests
copying tests/test_requirements.py -> h2ogpt-0.1.0/tests
Writing h2ogpt-0.1.0/setup.cfg
Creating tar archive
removing 'h2ogpt-0.1.0' (and everything under it)
running bdist_wheel
running build
running build_py
/home/jon/miniconda3/envs/h2ollm/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer, pypa/build or
        other standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/h2oai_pipeline.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/create_data.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/loaders.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/eval.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/llama_flash_attn_monkey_patch.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/gradio_themes.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/finetune.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/read_wiki_full.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/stopping.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/image_captions.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/utils.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/gradio_runner.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/generate.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/cli.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/gpt_langchain.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/prompter.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/gpt4all_llm.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/pipeline_example.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/client_test.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/export_hf_checkpoint.py -> build/bdist.linux-x86_64/wheel/h2ogpt
copying build/lib/h2ogpt/make_db.py -> build/bdist.linux-x86_64/wheel/h2ogpt
running install_egg_info
Copying h2ogpt.egg-info to build/bdist.linux-x86_64/wheel/h2ogpt-0.1.0-py3.10.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/h2ogpt-0.1.0.dist-info/WHEEL
creating 'dist/h2ogpt-0.1.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'h2ogpt/cli.py'
adding 'h2ogpt/client_test.py'
adding 'h2ogpt/create_data.py'
adding 'h2ogpt/eval.py'
adding 'h2ogpt/export_hf_checkpoint.py'
adding 'h2ogpt/finetune.py'
adding 'h2ogpt/generate.py'
adding 'h2ogpt/gpt4all_llm.py'
adding 'h2ogpt/gpt_langchain.py'
adding 'h2ogpt/gradio_runner.py'
adding 'h2ogpt/gradio_themes.py'
adding 'h2ogpt/h2oai_pipeline.py'
adding 'h2ogpt/image_captions.py'
adding 'h2ogpt/llama_flash_attn_monkey_patch.py'
adding 'h2ogpt/loaders.py'
adding 'h2ogpt/make_db.py'
adding 'h2ogpt/pipeline_example.py'
adding 'h2ogpt/prompter.py'
adding 'h2ogpt/read_wiki_full.py'
adding 'h2ogpt/stopping.py'
adding 'h2ogpt/utils.py'
adding 'h2ogpt-0.1.0.dist-info/LICENSE'
adding 'h2ogpt-0.1.0.dist-info/METADATA'
adding 'h2ogpt-0.1.0.dist-info/WHEEL'
adding 'h2ogpt-0.1.0.dist-info/top_level.txt'
adding 'h2ogpt-0.1.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel

and in fresh env:

(h2ogpt4) jon@pseudotensor:~/h2ogpt$ pip install dist/h2ogpt-0.1.0-py3-none-any.whl --extra-index-url https://download.pytorch.org/whl/cu117

then run

python generate.py --base_model=h2oai/h2ogpt-oig-oasst1-512-6_9b --load_8bit=True

and works.

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

Successfully merging this pull request may close these issues.

1 participant