News for hackers. Stuff that matters.
Re:Propel – Machine learning for Javascript by dustinmoorenet on Monday February 26, 2018 @11:41AM (#16466601)
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.
Re:Propel – Machine learning for Javascript by Phrodo_00 on Monday February 26, 2018 @01:37PM (#16467735)
So now you'll have to setup a nodeJS env? I don't really see the difference.
Re:Propel – Machine learning for Javascript by sgslo on Monday February 26, 2018 @01:42PM (#16467784)
Setting 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.

Re:Propel – Machine learning for Javascript by cjalmeida on Monday February 26, 2018 @02:18PM (#16468110)
There'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 ...

Re:Propel – Machine learning for Javascript by jopsen on Monday February 26, 2018 @02:30PM (#16468213)
+ virtualenv

I always forget to set that up. Also I never learned python packaging, with npm it was trivial.

Re:Propel – Machine learning for Javascript by woolvalley on Monday February 26, 2018 @04:39PM (#16469205)
The basic rule of thumb is npm is 'virtualenv by default' while pip is 'global by default'.
Re:Propel – Machine learning for Javascript by JBReefer on Monday February 26, 2018 @05:27PM (#16469553)
This kind of thing is why people are saying npm is easier...
Re:Propel – Machine learning for Javascript by 3131s on Monday February 26, 2018 @10:47PM (#16470936)
Yes, npm installs libraries locally so it avoids the need for something like virtualenv in the first place. Coming from Python, that immediately struck me as a better approach to package management.
Re:Propel – Machine learning for Javascript by cx1000 on Tuesday February 27, 2018 @02:08AM (#16471614)
If you use pipenv it takes care of the virtualenv stuff behind the scenes for you.
Re:Propel – Machine learning for Javascript by darknoon on Sunday March 11, 2018 @01:53PM (#16563987)
You 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.
Re:Propel – Machine learning for Javascript by partycoder on Monday February 26, 2018 @11:57PM (#16471171)
ES5 and ES6 differ a lot. There's reverse compatibility, but they do differ.
Re:Propel – Machine learning for Javascript by FridgeSeal on Monday February 26, 2018 @03:31PM (#16468717)
pipenv --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.

Re:Propel – Machine learning for Javascript by ricardobeat on Monday February 26, 2018 @08:02PM (#16470345)
What's pipenv? Same as conda? Not using the system python also means installing python3 beforehand.
Re:Propel – Machine learning for Javascript by FridgeSeal on Tuesday February 27, 2018 @05:30PM (#16478644)
Pipenv is like virtualenv's but improved: 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.

Re:Propel – Machine learning for Javascript by dagw on Wednesday February 28, 2018 @06:08AM (#16482174)
Conda 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.

Re:Propel – Machine learning for Javascript by Phrodo_00 on Monday February 26, 2018 @01:45PM (#16467811)
But some version python comes pretty much with every system, then you only need to install tensorflow with pip.
Re:Propel – Machine learning for Javascript by kalefranz on Monday February 26, 2018 @03:30PM (#16468709)
Best practice is to leave the system python alone. If you have to put sudo in front of pip, you're probably doing it wrong.
Re:Propel – Machine learning for Javascript by Phrodo_00 on Monday February 26, 2018 @04:19PM (#16469060)
I agree with that, but for a beginner, using `pip -u` is less friction. They can use virtualenvs for their second project.
Re:Propel – Machine learning for Javascript by fnord123 on Monday February 26, 2018 @06:46PM (#16470006)
I'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.
Re:Propel – Machine learning for Javascript by Androider on Monday February 26, 2018 @02:29PM (#16468194)
If 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.

Re:Propel – Machine learning for Javascript by dustinmoorenet on Monday February 26, 2018 @03:56PM (#16468895)
I 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.

Re:Propel – Machine learning for Javascript by crandycodes on Monday February 26, 2018 @01:43PM (#16467795)
Maybe they already have a Node environment set up and appreciate not having to context switch?
Re:Propel – Machine learning for Javascript by akatechis on Monday February 26, 2018 @01:45PM (#16467813)
Not 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.
Re:Propel – Machine learning for Javascript by marmaduke on Monday February 26, 2018 @02:05PM (#16467999)
Would be along the lines of

    conda create -n fooenv numpy scipy etc
Re:Propel – Machine learning for Javascript by Can_Not on Tuesday February 27, 2018 @08:21AM (#16473092)
The difference is now you don't have to setup a python env.