wandb: ERROR api_key not configured (no-tty). call wandb.login(key=[your_api_key])

./scripts/run_finetune.sh

报错 wandb: ERROR api_key not configured (no-tty). call wandb.login(key=[your_api_key])
Traceback (most recent call last):

我是离线运行, 根本不需要登陆, 解决方案就是关闭它不用, 关闭命令在下面

Time to load utils op: 0.0003216266632080078 seconds
wandb: ERROR api_key not configured (no-tty). call wandb.login(key=[your_api_key])
Traceback (most recent call last):
  File "/work1/home/gaosong/LMFlow/examples/finetune.py", line 61, in 
    main()
  File "/work1/home/gaosong/LMFlow/examples/finetune.py", line 57, in main
    tuned_model = finetuner.tune(model=model, dataset=dataset)
  File "/work1/home/gaosong/LMFlow/src/lmflow/pipeline/finetuner.py", line 274, in tune
    train_result = trainer.train(resume_from_checkpoint=checkpoint)
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/transformers/trainer.py", line 1639, in train
    return inner_training_loop(
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/transformers/trainer.py", line 1822, in _inner_training_loop
    self.control = self.callback_handler.on_train_begin(args, self.state, self.control)
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/transformers/trainer_callback.py", line 353, in on_train_begin
    return self.call_event("on_train_begin", args, state, control)
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/transformers/trainer_callback.py", line 397, in call_event
    result = getattr(callback, event)(
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/transformers/integrations.py", line 764, in on_train_begin
    self.setup(args, state, model, **kwargs)
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/transformers/integrations.py", line 738, in setup
    self._wandb.init(
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/wandb/sdk/wandb_init.py", line 1140, in init
    wi.setup(kwargs)
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/wandb/sdk/wandb_init.py", line 288, in setup
    wandb_login._login(
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/wandb/sdk/wandb_login.py", line 298, in _login
    wlogin.prompt_api_key()
  File "/home/gaosong/anaconda3/envs/gpt/lib/python3.9/site-packages/wandb/sdk/wandb_login.py", line 228, in prompt_api_key
    raise UsageError("api_key not configured (no-tty). call " + directive)
wandb.errors.UsageError: api_key not configured (no-tty). call wandb.login(key=[your_api_key])

解决方案: 

wandb offline

直接关闭 wandb

你可能感兴趣的:(python,深度学习,人工智能)