-
Notifications
You must be signed in to change notification settings - Fork 134
Improve creating an Op documentation page #1086
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
@@ -165,35 +151,6 @@ or :meth:`Op.make_thunk`. | |||
:meth:`COp.c_code` and other related ``c_**`` methods. Note that an | |||
:class:`Op` can provide both Python and C implementations. | |||
|
|||
:meth:`Op.make_thunk` method is another alternative to :meth:`Op.perform`. |
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.
This is outdated, and tbh I don't think it's necessary for 99.9999% of the people reading this page
2f1a456
to
3a77d6b
Compare
d37103d
to
1d9bc2b
Compare
doc/extending/creating_an_op.rst
Outdated
@@ -1,40 +1,18 @@ | |||
|
|||
.. _creating_an_op: | |||
|
|||
Creating a new :class:`Op`: Python implementation | |||
Creating a new :ref:`op`: Python implementation |
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.
Where do you want the :ref:`op`
/:class:`Op`
to point to? To https://pytensor--1086.org.readthedocs.build/en/1086/extending/op.html or to https://pytensor--1086.org.readthedocs.build/en/1086/extending/graphstructures.html#op?
I think many of the broken cross-references come from this page: https://pytensor--1086.org.readthedocs.build/en/1086/extending/op.html, which is wildly inconsistent with itself. If the cross-reference would ideally point there we should fix this page first.
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.
Will check. I just wanted it to point somewhere, it wasn't before
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.
@OriolAbril extending op seems much more useful than the graphstructures#op, so I guess there.
ec648b9
to
ade5653
Compare
f797c62
to
c64736a
Compare
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.
Just a few typos. LGTM.
Changes: 1. Remove references to c-code which apply to `COp` but not `Op` 2. Fix failing doctests 3. Improve explanation of `make_node` 4. Emphasize distinction between itypes/otypes and make-node 5. Show `L_op` instead of `grad` 6. Show how to test `L_op` and `infer_shape` implementation 7. Simplify explanation of `__props__` and illustrate in example. 8. Introduce more complex multi-output Op to drive these details home 9. Remove old references to numba/ random variable Ops
c64736a
to
d2f7910
Compare
See commit message for list of changes.
The changes are based on feedback from helping other devs and users
Tagging @OriolAbril because I'm 100% sure I messed up some sphinx stuff (sorry)
📚 Documentation preview 📚: https://pytensor--1086.org.readthedocs.build/en/1086/