hiyouga/LlamaFactory · warning · NotImplementedError
Environment information is not implemented yet.
Error message
Environment information is not implemented yet.
What it means
The v1 launcher dispatches CLI subcommands to v1 implementations, but the 'env' command has no v1 implementation yet, so it raises NotImplementedError. It is a known gap in the experimental v1 architecture, not a broken environment.
Source
Thrown at src/llamafactory/v1/launcher.py:134
torchrun_args + script_args,
env=env,
check=True,
)
sys.exit(process.returncode)
elif command == "chat":
from .samplers.cli_sampler import run_chat
run_chat()
elif command == "merge":
from llamafactory.v1.plugins.model_plugins.peft import merge_and_export_model
merge_and_export_model()
elif command == "env":
raise NotImplementedError("Environment information is not implemented yet.")
elif command == "version":
raise NotImplementedError("Version information is not implemented yet.")
elif command == "help":
print(USAGE)
elif command in _DIST_TRAIN_COMMANDS:
# Single GPU training without torchrun
if command in ("train", "sft"):
from llamafactory.v1.trainers.sft_trainer import run_sft
run_sft()
elif command == "dpo":
from llamafactory.v1.trainers.dpo_trainer import run_dpo
run_dpo()
elif command == "rm":View on GitHub (pinned to f28afaf635)
Solutions
- Unset USE_V1 and run `llamafactory-cli env` under v0.
- Gather environment info manually: `pip list | grep -E 'torch|transformers|deepspeed'` and `nvidia-smi`.
- Track/watch the v1 launcher for the implementation landing.
Example fix
# before USE_V1=1 llamafactory-cli env # after unset USE_V1 llamafactory-cli env
Defensive patterns
Strategy: validation
Validate before calling
import os
assert os.environ.get("USE_V1") != "1" or command != "env", "'env' is unimplemented in v1; unset USE_V1" Try / catch
try:
run_cli("env")
except NotImplementedError:
os.environ.pop("USE_V1", None)
run_cli("env") Prevention
- Wrap llamafactory-cli in project scripts that unset USE_V1 for env/version subcommands.
- Document which subcommands are v1-complete before adopting USE_V1=1.
When it happens
Trigger: Running `llamafactory-cli env` (or `lmf env`) with USE_V1=1 set in the environment.
Common situations: User switches to the experimental v1 path to try new trainers, then runs the familiar `env` diagnostics command from v0 docs.
Related errors
- Version information is not implemented yet.
- Batch infer is not implemented.
- Invalid role
- SGLang only supports n=1.
- SGLang engine does not support `get_scores`.
AI-assisted analysis of hiyouga/LlamaFactory@f28afaf635 (2026-08-14).
Data as JSON: /api/errors/1e9e1ef73c88092a.
Report an issue: GitHub.