You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the README and searched the existing issues.
System Info
不能正常运行 llamafactory-cli env
与运行合并命令出现的报错一致
Reproduction
Put your message here.
运行合并命令:CUDA_VISIBLE_DEVICES=2 llamafactory-cli export examples/merge_lora/llama3_lora_sft.yaml
出现以下报错
Traceback (most recent call last):
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 106, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/dpo_trainer.py", line 56, in
from .callbacks import SyncRefModelCallback
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/callbacks.py", line 44, in
from .judges import BasePairwiseJudge
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/judges.py", line 32, in
from openai import OpenAI
ImportError: cannot import name 'OpenAI' from 'openai' (/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/openai/init.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 106, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/dpo_trainer.py", line 56, in
from .callbacks import SyncRefModelCallback
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/callbacks.py", line 44, in
from .judges import BasePairwiseJudge
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/judges.py", line 32, in
from openai import OpenAI
ImportError: cannot import name 'OpenAI' from 'openai' (/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/openai/init.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): [54/1973]
File "/home/ps/miniconda3/envs/llamafactory/bin/llamafactory-cli", line 5, in
from llamafactory.cli import main
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/init.py", line 3, in
from .cli import VERSION
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/cli.py", line 7, in
from . import launcher
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/launcher.py", line 1, in
from llamafactory.train.tuner import run_exp
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/tuner.py", line 11, in
from .dpo import run_dpo
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/dpo/init.py", line 1, in
from .workflow import run_dpo
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/dpo/workflow.py", line 11, in
from .trainer import CustomDPOTrainer
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/dpo/trainer.py", line 9, in
from trl import DPOTrainer
File "", line 1075, in _handle_fromlist
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 97, in getattr
value = getattr(module, name)
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 96, in getattr
module = self._get_module(self._class_to_module[name])
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 108, in _get_module
raise RuntimeError(
RuntimeError: Failed to import trl.trainer.dpo_trainer because of the following error (look up to see its traceback):
cannot import name 'OpenAI' from 'openai' (/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/openai/init.py)
Others
No response
The text was updated successfully, but these errors were encountered:
Reminder
System Info
不能正常运行 llamafactory-cli env
与运行合并命令出现的报错一致
Reproduction
运行合并命令:CUDA_VISIBLE_DEVICES=2 llamafactory-cli export examples/merge_lora/llama3_lora_sft.yaml
出现以下报错
Traceback (most recent call last):
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 106, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/dpo_trainer.py", line 56, in
from .callbacks import SyncRefModelCallback
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/callbacks.py", line 44, in
from .judges import BasePairwiseJudge
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/judges.py", line 32, in
from openai import OpenAI
ImportError: cannot import name 'OpenAI' from 'openai' (/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/openai/init.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 106, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/dpo_trainer.py", line 56, in
from .callbacks import SyncRefModelCallback
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/callbacks.py", line 44, in
from .judges import BasePairwiseJudge
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/trainer/judges.py", line 32, in
from openai import OpenAI
ImportError: cannot import name 'OpenAI' from 'openai' (/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/openai/init.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): [54/1973]
File "/home/ps/miniconda3/envs/llamafactory/bin/llamafactory-cli", line 5, in
from llamafactory.cli import main
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/init.py", line 3, in
from .cli import VERSION
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/cli.py", line 7, in
from . import launcher
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/launcher.py", line 1, in
from llamafactory.train.tuner import run_exp
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/tuner.py", line 11, in
from .dpo import run_dpo
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/dpo/init.py", line 1, in
from .workflow import run_dpo
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/dpo/workflow.py", line 11, in
from .trainer import CustomDPOTrainer
File "/home/ps/proj/LLaMA-Factory/src/llamafactory/train/dpo/trainer.py", line 9, in
from trl import DPOTrainer
File "", line 1075, in _handle_fromlist
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 97, in getattr
value = getattr(module, name)
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 96, in getattr
module = self._get_module(self._class_to_module[name])
File "/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/trl/import_utils.py", line 108, in _get_module
raise RuntimeError(
RuntimeError: Failed to import trl.trainer.dpo_trainer because of the following error (look up to see its traceback):
cannot import name 'OpenAI' from 'openai' (/home/ps/miniconda3/envs/llamafactory/lib/python3.10/site-packages/openai/init.py)
Others
No response
The text was updated successfully, but these errors were encountered: