We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
KeyError Traceback (most recent call last) in <cell line: 13>() 14 best_overall_score = -np.inf 15 # query Planning LM for single-step action candidates ---> 16 samples, log_probs = generator(curr_prompt + f'\nStep {step}:', sampling_params) 17 for sample, log_prob in zip(samples, log_probs): 18 most_similar_idx, matching_score = find_most_similar(sample, action_list_embedding)
in _generate(prompt, sampling_params) 15 input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device) 16 prompt_len = input_ids.shape[-1] ---> 17 output_dict = model.generate(input_ids, max_length=prompt_len + sampling_params['max_tokens'], **sampling_params) # Update parameter name 18 # discard the prompt (only take the generated text) 19 generated_samples = tokenizer.batch_decode(output_dict.sequences[:, prompt_len:])
KeyError: 'max_tokens'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
KeyError Traceback (most recent call last)
in <cell line: 13>()
14 best_overall_score = -np.inf
15 # query Planning LM for single-step action candidates
---> 16 samples, log_probs = generator(curr_prompt + f'\nStep {step}:', sampling_params)
17 for sample, log_prob in zip(samples, log_probs):
18 most_similar_idx, matching_score = find_most_similar(sample, action_list_embedding)
in _generate(prompt, sampling_params)
15 input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
16 prompt_len = input_ids.shape[-1]
---> 17 output_dict = model.generate(input_ids, max_length=prompt_len + sampling_params['max_tokens'], **sampling_params) # Update parameter name
18 # discard the prompt (only take the generated text)
19 generated_samples = tokenizer.batch_decode(output_dict.sequences[:, prompt_len:])
KeyError: 'max_tokens'
The text was updated successfully, but these errors were encountered: