-
Notifications
You must be signed in to change notification settings - Fork 65
Add some useful planner processors #1327
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
Conversation
…essors Signed-off-by: Henry Lindeman <hmlindeman@yahoo.com>
Signed-off-by: Henry Lindeman <hmlindeman@yahoo.com>
Signed-off-by: Henry Lindeman <hmlindeman@yahoo.com>
# LlmExtractEntity without anything after it is just slow | ||
# TopK can sometimes fail if the LLM returns garbage and doesn't help with getting | ||
# the list of documents -- we just have to ignore it | ||
assert len(n.inputs) == 1, f"Trailing {n.node_type} node must have exactly one input" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll need to update dependencies here right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more explicit way would be to choose which operators stay in vs out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdym update the dependencies? I delete the bad tail node and update the plan result_node to the one before it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered letting it be 'RemoveTailNodesByType' or some such. The only use-case I could come up with for it was this one though, so I decided to go with the less general thing as it's clearer why you want it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked offline figured it out
return plan | ||
|
||
|
||
class LogPlan(LogicalPlanProcessor): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print plan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it better to just add a .print() method to the plan object? then the .print can be called by planner who is orchestrating the processors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm trying to assemble a strategy that does the right thing then my programming language is effectively the list of processors so one that prints the current state is useful.
Signed-off-by: Henry Lindeman <hmlindeman@yahoo.com>
From upstreaming