How to Browse Documentation? (or Source for clearer documentation)

Any tips on a good system to browse the documentation? E.g., an IDE or even a list of repositories you clone and grep through.

I am a beginner.

I find that the topics I need to look up lie in at least three repositories: PyTorch, fastai, fastcore, and maybe fastbook.

Is there a preferred IDE that would let me easily jump to, say, the definition of Flatten() or Transform(...)?

I feel like I spend a lot of time trying to figure out what the framework expects of me. Like: when I am writing a batch_tfms for a DataBlocks object, what exactly are going to be the inputs and what should be the outputs? (I was very surprised to be passed the inputs their classifying labels in separate (!) function calls. Do I have to figure stuff like this out the hard way?)

I admit I’m only on lesson 5, but the things I am trying to do are not far outside of the material covered - like set up a DataBlocks(…) object to read in the digits from the mnist database.

Recommendations on ways to browse the docs are welcome!

1 Like

If you’re using Jupyter Notebooks, you can

  • Press Shift and Tab to view the parameters to pass into a function
  • Press Shift and Tab 3 times to view additional details on the method
  • Use the ? operator
    • ?func or func? displays the docstring and parameters
    • ??func or func?? displays the source code

If you’re using an IDE, they will provide ways to easily view documentation. With certain IDEs, if you hover your cursor over, say, a class, it will display the documentation/docstring/parameters for it. For other IDEs, pressing tab while in the parentheses will display them, and others will require pressing Shift and Tab. Best to refer to the docs of your IDE.

2 Likes