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

Add helper function to find all inputs needed to a compile a graph #695

Closed
jessegrabowski opened this issue Apr 8, 2024 · 1 comment · Fixed by #712
Closed

Add helper function to find all inputs needed to a compile a graph #695

jessegrabowski opened this issue Apr 8, 2024 · 1 comment · Fixed by #712

Comments

@jessegrabowski
Copy link
Member

Description

It'd be nice to have a tool to automatically make the required inputs to a function. The function already exists in PyMC as pymc.pytensorf.inputvars, but I think this should be in pytensor itself.

There's also pytensor.graph.basic.graph_inputs, but this returns constants and shared variables. Given an arbitrary graph z, I'd like to be able to do f = pytensor.function(get_input_vars(z), z).

@ricardoV94
Copy link
Member

ricardoV94 commented Apr 8, 2024

As suggested let's call it required_graph_inputs to distinguish from the existing one

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

Successfully merging a pull request may close this issue.

2 participants