Skip to content

The iterative planner returns empty string #7

@hadifar

Description

@hadifar

First of all thanks for your releasing the code.

I'm trying to play with the planner module. However, I'm not able to generate plans using lumos_complex_qa_plan_iterative.
I already used the lumos_complex_qa_plan_onetime and it did work perfectly.

Here is the code:

from transformers import pipeline
import transformers
import torch

model_id = "ai2lumos/lumos_complex_qa_plan_iterative"
# works--> ai2lumos/lumos_complex_qa_plan_onetime

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

print("-"*50)
print("-"*50)
q_list = [
      "What year did Guns N Roses perform a promo for a movie starring Arnold Schwarzenegger as a former New York Police detective?"
]

for q in q_list:
        messages = 	[{ "role": "user", "content": f"Please provide a reasonable subgoal-based plan to solve the given task.\nTask: {q}; Initial Environment Description: None." } ]
        outputs = pipeline(
            messages,
            max_new_tokens=512,
        )
        print(outputs)

Do you know by chance how can I fix the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions