Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'NoneType' object is not iterable #434

Open
junming-yang opened this issue Jan 6, 2025 · 0 comments
Open

TypeError: 'NoneType' object is not iterable #434

junming-yang opened this issue Jan 6, 2025 · 0 comments

Comments

@junming-yang
Copy link

Traceback (most recent call last):
  File "/home/miniconda3/envs/vllm/bin/alpaca_eval", line 8, in <module>
    sys.exit(main())
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/main.py", line 608, in main
    fire.Fire(ALL_FUNCTIONS)
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/fire/core.py", line 135, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/fire/core.py", line 468, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/fire/core.py", line 684, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/main.py", line 155, in evaluate
    annotations = annotator.annotate_head2head(
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/annotators/pairwise_evaluator.py", line 237, in annotate_head2head
    out = self.__call__(df_to_annotate, **decoding_kwargs)
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/annotators/base.py", line 218, in __call__
    df_annotated = self._annotate(curr_df_to_annotate, **decoding_kwargs)
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/annotators/base.py", line 336, in _annotate
    curr_annotated = self.annotators[annotator](
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/annotators/base.py", line 718, in __call__
    completions = self.fn_completions(prompts=prompts, **self.completions_kwargs, **decoding_kwargs)
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/decoders/openai.py", line 153, in openai_completions
    completions = list(
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/tqdm/std.py", line 1181, in __iter__
    for obj in iterable:
  File "/home/miniconda3/envs/vllm/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
    yield _result_or_cancel(fs.pop())
  File "/home/miniconda3/envs/vllm/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
    return fut.result(timeout)
  File "/home/miniconda3/envs/vllm/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/home/miniconda3/envs/vllm/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home/miniconda3/envs/vllm/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/miniconda3/envs/vllm/lib/python3.10/site-packages/alpaca_eval/decoders/openai.py", line 235, in _openai_completion_helper
    for i, choice in enumerate(choices):
TypeError: 'NoneType' object is not iterable

I have tried to print the choices. Most of the time, it works well but is stuck in some requests. Can you provide any suggestions for solving it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant