hamelsmu / code_search

Code For Medium Article: "How To Create Natural Language Semantic Search for Arbitrary Objects With Deep Learning"

Home Page:https://medium.com/@hamelhusain/semantic-code-search-3cd6d244a39c

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider re-factoring f-strings and consider python version

hamelsmu opened this issue · comments

From @hohsiangwu , he makes some good points worth considering:

"""
I am not a big fan of f-string yet. I know it is easier and more clear but the downside is that it only supports Python3.6 and onwards.

I ran into several problems while dealing with the dependencies of python, pytorch with your libraries where I might be only in python3.5 and all of a sudden, all your libraries don't work. I would highly recommend that let's use more common patterns in the public repository.

I could be overthinking, so if you decide on keeping using f strings, I would need to modify the part to follow the convention. I think nothing is more confused than a repository with different patterns.
"""

The docker container for this tutorial is running python 3.6.3 but maybe that is not the best for our readers? I want to post this issue so I don't forget about it and come back to it later!

This is a good point, and the follow-up efforts that we need to provide is a packaged environment with instructions how to re-produce everything easily. It might not be easy to reproduce this locally given that we would nee GPUs, but some instructions to reproduce this with colab would be fair.

The packaged environment will probably include a link to the docker container we use to run. Or better the dockerfile itself so potential audience with different level of knowledge can benefit from different level of customization. That said, we can start with one (just provide instruction of using the pre-build container) and iterate from there to make it more customizable.

OK this is a good point. Thanks for the feedback. I'll go with the approach of providing the docker container for this tutorial and calling out that you should use that docker container to reproduce. I will also add python 3.6 tags to the tutorial readme