unsloth icon indicating copy to clipboard operation
unsloth copied to clipboard

importlib.metadata.PackageNotFoundError: No package metadata was found for The 'unsloth' distribution was not found and is required by this application

Open xiechengmude opened this issue 1 year ago • 1 comments

training env: LLaMaFactory

`01/24/2024 01:53:50 - INFO - llmtuner.model.patcher - Quantizing model to 4 bit. Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/transformers/utils/versions.py", line 102, in require_version got_ver = importlib.metadata.version(pkg) File "/usr/lib/python3.10/importlib/metadata/init.py", line 996, in version return distribution(distribution_name).version File "/usr/lib/python3.10/importlib/metadata/init.py", line 969, in distribution return Distribution.from_name(distribution_name) File "/usr/lib/python3.10/importlib/metadata/init.py", line 548, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: No package metadata was found for unsloth

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/workspace/LLaMA-Factory/src/train_bash.py", line 14, in main() File "/workspace/LLaMA-Factory/src/train_bash.py", line 5, in main run_exp() File "/workspace/LLaMA-Factory/src/llmtuner/train/tuner.py", line 37, in run_exp run_dpo(model_args, data_args, training_args, finetuning_args, callbacks) File "/workspace/LLaMA-Factory/src/llmtuner/train/dpo/workflow.py", line 30, in run_dpo model, tokenizer = load_model_and_tokenizer(model_args, finetuning_args, training_args.do_train) File "/workspace/LLaMA-Factory/src/llmtuner/model/loader.py", line 66, in load_model_and_tokenizer require_version("unsloth", "Follow the instructions at: https://github.com/unslothai/unsloth") File "/usr/local/lib/python3.10/dist-packages/transformers/utils/versions.py", line 104, in require_version raise importlib.metadata.PackageNotFoundError( importlib.metadata.PackageNotFoundError: No package metadata was found for The 'unsloth' distribution was not found and is required by this application. Follow the instructions at: https://github.com/unslothai/unsloth [2024-01-24 01:53:52,184] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 1551179 [2024-01-24 01:53:52,184] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 1551180 [2024-01-24 01:53:52,206] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 1551181 [2024-01-24 01:53:52,396] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 1551182`

xiechengmude avatar Jan 24 '24 01:01 xiechengmude

@xiechengmude Did you install Unsloth? I think you might have posted this before but can't remember - did u install Unsloth correctly via Conda or pip?

danielhanchen avatar Jan 24 '24 06:01 danielhanchen