Jupyter Feature Request: on Github - Fuzzy match for code suggestion tool (eg. pressing '.' then [tab] and begin typing sequential non-consecutive chars)

Hi All,

I thought I would post a cross-link to this github issue I just created for those that are interested or have something they want to contribute to this conversation.

Feature Request: Fuzzy match for code suggestion tool (eg. pressing ‘.’ then tab and begin typing) #3083

The crux of the request is to see if we can get a plugin or feature addition into jupyter / ipython of a simpler, yet better, fuzzy finder that made it easier to isolate functions relevant to a particular class.

Currently the autocomplete for jupyter feels more like a spelling checker (you have to know what you are looking for, be able to spell it, and then scroll heavily to find it ).

Pytorch, keras, tensorflow, theano, etc all have pretty convoluted, similar, changing and potentially confusing APIs. Fuzzy finding in these libraries would be a huge help.

Please comment on the open issue on github if you have relevant suggestions to help develop or further the coding of this.

Please comment below if you have suggestions for the fast.ai community


Not sure what you might want. “.” [tab] works nicely if the context is known. Keep in mind that it might not be if the code has not yet been executed. Jupyter also has ? for function/module/class help and ?? for direct access to the source.

Thanks for commenting and joining the conversation Fred. :grinning:

Yes, I use those features. Sometimes I run the ‘import lib’ early to bring in the libs etc to help populate the suggestion list.

Part of what I find is that having coded in other IDEs and languages, I think python development on Jupyter could benefit from some of the features available in these systems - like fuzzy matching code prompts.

I think that it would be nice to spend less time early on learning names - that can come in time - and more time focusing on creation and iterative learning. To me this is what the ‘top-down’ approach is what fast.ai is advocating.

An example is typing "torch.nn. + tab " gives 10 prompts out of say 100+ options to scroll through!!! Some functions with capitals, some without. So a lowercase “a” won’t bring up an uppercase ‘A’ for AvgPool. To me that’s bad implementation.

I have made some more progress on isolating the matching mechanism for this in the jupyter code. :grinning:

I have described it here on the issue tracker.

My javascript isn’t great, but I have found some js fuzzy match libraries and isolated the code class that I think needs to be changed, from a linear prefix match to something fuzzy. Check the above link.

Any javascript gurus out there?