llamafactory-cli train -h broken
solved
### Reminder
- [x] I have read the above rules and searched the existing issues.
### System Info
llamafactory-cli version
----------------------------------------------------------
| Welcome to LLaMA Factory, version 0.9.5.dev0 |
| |
| Project page: https://github.com/hiyouga/LLaMA-Factory |
----------------------------------------------------------
llamafactory-cli env
- `llamafactory` version: 0.9.5.dev0
- Platform: Linux-5.14.0-570.62.1.el9_6.x86_64-x86_64-with-glibc2.34
- Python version: 3.13.11
- PyTorch version: 2.11.0+cu130
- Transformers version: 5.2.0
- Datasets version: 4.0.0
- Accelerate version: 1.11.0
- PEFT version: 0.18.1
- TRL version: 0.24.0
- Git commit: 09ff69e82bdfb4f3a95b42879d3dedc2cbbbf308
- Default data directory: detected
### Reproduction
Trying to see the help for the train command
```sh
llamafactory-cli train -h
```
You get the following error message.
```
Traceback (most recent call last):
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/venv/bin/llamafactory-cli", line 12, in <module>
sys.exit(main())
~~~~^^
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/LlamaFactory/src/llamafactory/cli.py", line 24, in main
launcher.launch()
~~~~~~~~~~~~~~~^^
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/LlamaFactory/src/llamafactory/launcher.py", line 157, in launch
run_exp()
~~~~~~~^^
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/LlamaFactory/src/llamafactory/train/tuner.py", line 142, in run_exp
get_train_args(args)
~~~~~~~~~~~~~~^^^^^^
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/LlamaFactory/src/llamafactory/hparams/parser.py", line 290, in get_train_args
model_args, data_args, training_args, finetuning_args, generating_args = _parse_train_args(args)
~~~~~~~~~~~~~~~~~^^^^^^
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/LlamaFactory/src/llamafactory/hparams/parser.py", line 244, in _parse_train_args
return _parse_args(parser, args, allow_extra_keys=allow_extra_keys)
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/LlamaFactory/src/llamafactory/hparams/parser.py", line 93, in _parse_args
(*parsed_args, unknown_args) = parser.parse_args_into_dataclasses(args=args, return_remaining_strings=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/gpfs/work/larkins/TraLLM/LLaMa-Factory.4/venv/lib/python3.13/site-packages/transformers/hf_argparser.py", line 338, in parse_args_into_dataclasses
namespace, remaining_args = self.parse_known_args(args=args)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 1908, in parse_known_args
return self._parse_known_args2(args, namespace, intermixed=False)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 1937, in _parse_known_args2
namespace, args = self._parse_known_args(args, namespace, intermixed)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 2188, in _parse_known_args
start_index = consume_optional(start_index)
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 2112, in consume_optional
take_action(action, args, option_string)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 2013, in take_action
action(self, namespace, argument_values, option_string)
~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 1124, in __call__
parser.print_help()
~~~~~~~~~~~~~~~~~^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 2628, in print_help
self._print_message(self.format_help(), file)
~~~~~~~~~~~~~~~~^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 2611, in format_help
return formatter.format_help()
~~~~~~~~~~~~~~~~~~~~~^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 287, in format_help
help = self._root_section.format_help()
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 216, in format_help
item_help = join([func(*args) for func, args in self.items])
~~~~^^^^^^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 216, in format_help
item_help = join([func(*args) for func, args in self.items])
~~~~^^^^^^^
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 512, in _format_action
help_text = self._expand_help(action)
File "/home/larkins/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/lib/python3.13/argparse.py", line 602, in _expand_help
return self._get_help_string(action) % params
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
TypeError: not enough arguments for format string
```
### Others
_No response_
关闭于 2026-05-09 5 条评论