-
Notifications
You must be signed in to change notification settings - Fork 112
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
Removes Function Graph, set_test_value/ get_test_value #1107
base: main
Are you sure you want to change the base?
Conversation
@@ -68,8 +70,8 @@ def compare_jax_and_py( | |||
if assert_fn is None: | |||
assert_fn = partial(np.testing.assert_allclose, rtol=1e-4) | |||
|
|||
fn_inputs = [i for i in fgraph.inputs if not isinstance(i, SharedVariable)] | |||
pytensor_jax_fn = function(fn_inputs, fgraph.outputs, mode=jax_mode) | |||
fn_inputs = [i for i in inputs if not isinstance(i, SharedVariable)] |
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.
Shouldn't need any filter anymore. just pass inputs directly
@@ -135,332 +133,276 @@ def test_replaced_shared_rng_storage_ordering_equality(): | |||
|
|||
|
|||
@pytest.mark.parametrize( | |||
"rv_op, dist_params, base_size, cdf_name, params_conv", | |||
"rv_op, dist_params, base_size, cdf_name, params_conv, test_values", |
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.
Make test_values come after dist_params for readability
) | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"x, exc", | ||
"x, exc,test_values", |
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.
in all cases put test values after x for readability
@@ -31,4 +31,4 @@ repos: | |||
hooks: | |||
- id: ruff | |||
args: ["--fix", "--output-format=full"] | |||
- id: ruff-format | |||
- id: ruff-format |
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.
blank line at end of file accidentally removed?
@AdvH039 changes looks great. There are some conflicts that emerged since you opened the PR. If you can fix them we can merge. Optionally, but not a blocker, if you could put the I understand it's a lot of work, so feel free to decline |
Description
Removes the FunctionGraph mechanism of taking inputs and outputs and instead takes them directly in compare_py_and_x . Remove the setting getting of test_values into variables in compare_py_and_x and instead passes them directly to the function.
Related Issue
FunctionGraph
in linker tests #1022FunctionGraph
in linker tests #1022Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1107.org.readthedocs.build/en/1107/