6 ms·
It binds directly to the TensorFlow C API, if you run it in NodeJS, which is awesome. I get tired of having to setup a python env anytime I want to play around
by dustinmoorenet 9y ago
It binds directly to the TensorFlow C API, if you run it in NodeJS, which is awesome. I get tired of having to setup a python env anytime I want to play around with ML.
- Phrodo_00 9y agoSo now you'll have to setup a nodeJS env? I don't really see the difference.
- sgslo 9y agoSetting up a node env is arguably easier. An installer from the NodeJS downloads page includes both the Node runtime and NPM. One executable to get started. Python, on the other hand, requires a python installer, then a pip or conda installation script. Not to mention python vs python3 decisions.
- Phrodo_00 9y agoBut some version python comes pretty much with every system, then you only need to install tensorflow with pip.
- kalefranz 9y agoBest practice is to leave the system python alone. If you have to put sudo in front of pip, you're probably doing it wrong.
- Phrodo_00 9y agoI agree with that, but for a beginner, using `pip -u` is less friction. They can use virtualenvs for their second project.
- fnord123 9y agoI've come across benchmarks claiming a 7x speedup if you build Tensorflow from source. So you basically don't want to install using a binary wheel.
- cjalmeida 9y agoThere's no python vs python3 decision to make. There's no (sane) reason to pick Python 2 in 2018 for new projects. Conda installer comes with Python prepackaged. So it's really a single exe and one CMD to get a Tensorflow env setup. And, of course, you have access to numpy, pandas, jupyter, PIL ...
- darknoon 9y agoYou say this, but coremltools (convert from industry standard to Apple's ML framework) initially only supported python 2, so it was annoying to work with some code in Python 2 and some in 3.5.
- jopsen 9y ago+ virtualenv I always forget to set that up. Also I never learned python packaging, with npm it was trivial.
- woolvalley 9y agoThe basic rule of thumb is npm is 'virtualenv by default' while pip is 'global by default'.
- cx1000 9y agoIf you use pipenv it takes care of the virtualenv stuff behind the scenes for you.
- FridgeSeal 9y agopipenv --three shell pipenv install pkg_1 pkg_ pkg_3 etc. Seems pretty easy to me. Plus, no one should be using Python 2 for any new project now, so that's not even a decision to bother with anymore.
- ricardobeat 9y agoWhat's pipenv? Same as conda? Not using the system python also means installing python3 beforehand.
- FridgeSeal 9y agoPipenv is like virtualenv's but improved: https://docs.pipenv.org/ https://docs.pipenv.org/ Conda is like pip, but focused only on the sciences/data stuff. Pip has everything that Conda has and more as it's the standard packaging solution for Python.
- dagw 9y agoConda is like pip Conda is more like pipenv in that it does both package management and environment/version management. And while it's true that not every python package is in conda, that vast majority are and conda and pip play nicely together if you want to use pip to install some packages. Also conda can be used to install both surrounding tooling (like gcc and make, super useful on Windows) and, in many cases, build dependencies and necessary C libraries. Something pip doesn't handle. Doing for example "pip install gdal" will very likely leave you chasing down third party dependencies, while doing "conda install gdal" will just work. Finally, conda has recently added R support. So you can now manage your R packages and environments with the same tools as python. Super handy if you have project that uses both R and python.
- crandycodes 9y agoMaybe they already have a Node environment set up and appreciate not having to context switch?
- akatechis 9y agoNot sure what there is to set up for a new python project, but on Node, all you have to do is `npm init` and then `npm install propel` to get started.
- marmaduke 9y agoWould be along the lines of conda create -n fooenv numpy scipy etc
- Androider 9y agoIf you're happy with Python, great. But the market for something like this can be so much bigger. Let's say you already have a NodeJS service. This reducers the friction to add some ML into the mix to basically zero. Install the optional propel_linux_gpu package, throw it on a GPU instance on AWS and call it a day. ML right now is still mostly the domain of the tech giants and researchers, efforts like these will serve to make it an everyday component of software stacks everywhere.
- dustinmoorenet 9y agoI don't know what is the best practice. `pip` `virtualenv` `pipenv` `conda`? NodeJS has `npm` or `yarn`, and they basically do and setup the same thing. You can switch between the two without headache. As a new user (or one who has tried on multiple attempts to get into it), python is hard to start.
- Can_Not 9y agoThe difference is now you don't have to setup a python env.