Hvass-Labs / TensorFlow-Tutorials

TensorFlow Tutorials with YouTube Videos
MIT License
9.27k stars 4.19k forks source link

Not an issue - conda env export fyi #46

Closed johndpope closed 7 years ago

johndpope commented 7 years ago

Hi Magnus,

You tutorials have come a long way since I last looked. You should put a bitcoin /ethereum donation link on your page - some one may feel like tipping you.

fyi - When you create a conda environment and activate it - and then do pip install - it transparently stores these dependencies into respective environment.

Did you know it's possible to spit out an associated environments.yml file with all dependencies for conda? eg after you've done pip install requirements conda env export > environment.yml

you can then potentially discard using pip. to restore environment - you can call conda env create --file=/path/to/envfile.yaml

why would you want to do this? if users skip the conda / source activate part - then they can get in trouble with which version of pip conda is referencing (eg python2).

you may also like this conda plugin in conjunction with jupyter notebooks to simplify the environment settings. conda install nb_conda

I have some screen shots in this gist (as well as my own ML conda dependencies here) https://gist.github.com/johndpope/187b0dd996d16152ace2f842d43e3990 you can then easily configure your jupyter notebook to point to different environments python2 - tensorflow or python 3 - tensorflow from within jupyter notebook. (again see gist link for better understanding)

I know I recommended pip to begin with - but now days am relying almost exclusively on conda to manage environments / dependencies.

also - there's this cheat sheet https://conda.io/docs/_downloads/conda-cheatsheet.pdf

finally - having watched your videos - I've been throwing a lot more comments in my code these days and I think my colleagues appreciate that and they have been doing like wise - which I do appreciate. so thanks for taking time to teach people.

Hvass-Labs commented 7 years ago

Thanks, I do have a PayPal donation button but very few people use it. I wish people would just donate $5 instead of nothing. It would add up to something substantial if everyone did it.

Thanks for the tip with conda envs. Some months ago I added 'requirements.txt' because someone recommended it here (was it you?) Isn't that sufficient? Not everyone uses Anaconda.

Re. code comments, I am indeed trying to make the community write more polished code, in part by setting a good example, and in part by telling fairly honestly how frustrating it is to read uncommented / unpolished code. It is like deciphering a huge and complicated math equation. It would help everyone in the long run if everybody took a little more time to polish their code once it is working. So I am glad to hear that you also see the benefits of that now!

johndpope commented 7 years ago

No problem. I actually desire to make some software for deciphering maths equations / linear algebra particularly from white papers. If you're in New York city any time - give me a shout. Yes - I suggested requirements. once you try miniconda (you don't need the 1gb gui installation) - you won't look back. It really helps simplify the notebook environments too.

Also - don't sell yourself short - consider individual companies could chip in $200. You just need to believe you deserve it. Modern day society has some mistakenly imposed the idea that teachers shouldn't get paid lots. There's many talented people earning the big bucks in large corporates who would rather be teaching but salaries are so crap it's not worth it. You might look to https://www.patreon.com/ to rally monthly subscribers.

Hvass-Labs commented 7 years ago

Thanks. Actually, I do know of several companies and startups that have depended on my tutorials in their own work, so it was obviously worth quite a lot of money to them, but getting them to chip in is a whole other matter :-) I have thought about making a video explaining that it would be far better if everyone donated $5 each. In the last two weeks I received two donations, one for $10 and another for $100 which was actually for my old SwarmOps library. I discussed in the comments to the video on Reinforcement Learning why I don't want to make a Patreon account. Obviously the amount you can raise in donations with a fairly small audience is never going to be anything substantial, so financially it doesn't make much sense to make these tutorials. I did it mainly because I was frustrated about the tutorials that were already out there. It just took a lot longer to make them than I had expected.