News for hackers. Stuff that matters.
Re:Fast.ai and why Python is not the future of ML with Jerem... by learningwebdev on Tuesday September 08, 2020 @03:31AM (#24406027)
As somebody who is just getting into learning Python for web development and ML, am I better off switching to Julia right now? How steep is the learning curve compared to Python, and does it have a framework similar to Django for building web apps?
Re:Fast.ai and why Python is not the future of ML with Jerem... by miguendes on Tuesday September 08, 2020 @03:38AM (#24406062)
IMHO, no, stick with Python. Of course you can fiddle with Julia but Python is used in many fronts and much more versatile.

If Python were a blocker for the adoption and development of ML, it wouldn't be the default language of the most popular ML libs.

The reason is, the high performant code is written in C++/C/Fortran. Python is just used to glue everything and provide a nice and rich interface. That's what really matters.

To me Julia is more to Fortran than Python. And it doesn't have many usages outside numeric programming.

Scapping the Web, building rest APIs, Performing Data Analysis, Automation scripts is much easier in Python than Julia or Swift.

Edit: typos

Re:Fast.ai and why Python is not the future of ML with Jerem... by mark_l_watson on Tuesday September 08, 2020 @09:46PM (#24415862)
Two years ago when I started experimenting with Julia and the Flux DL library, I paused to code up non numerical problems in Julia: web scraping, making REST calls, SPARQL queries, build simple web site, etc. Julia was OK for all of these tasks.

I am going to watch Julia adoption, and use it more, when and if it becomes more popular.

Re:Fast.ai and why Python is not the future of ML with Jerem... by dklend122 on Wednesday September 09, 2020 @07:15AM (#24419744)
And It's improved by miles for those things
Re:Fast.ai and why Python is not the future of ML with Jerem... by dunefox on Tuesday September 08, 2020 @05:45AM (#24406796)
> much more versatile.

> To me Julia is more to Fortran than Python. And it doesn't have many usages outside numeric programming.

Again, you're making unsubstantiated claims.

> Python is just used to glue everything and provide a nice and rich interface. That's what really matters.

So, now I have to not only learn Python but also Fortran/C++/C because the underlying library that I might want to adapt is written in one of these languages. In Julia the DL library, for example, is written in Julia. What you are claiming is a pro is actually a con.

> Scapping the Web, building rest APIs, Performing Data Analysis, Automation scripts is much easier in Python than Julia or Swift.

That might be true for Swift, but certainly not for Julia.

Re:Fast.ai and why Python is not the future of ML with Jerem... by nl on Tuesday September 08, 2020 @06:05AM (#24406901)
So, now I have to not only learn Python but also Fortran/C++/C because the underlying library that I might want to adapt is written in one of these languages.

Basically the only time you'll want to do this from Python is if there is specific Fortran or C++ library you want to use. You'd have to do the same in Swift or Julia in this case.

Re:Fast.ai and why Python is not the future of ML with Jerem... by dunefox on Tuesday September 08, 2020 @06:25AM (#24407000)
Only if the library is not written in Julia, yes. The point here is that Julia is efficient enough that deep learning libraries can be written in pure Julia, not C/C++/Fortran.
Re:Fast.ai and why Python is not the future of ML with Jerem... by nl on Tuesday September 08, 2020 @10:09AM (#24408500)
And yet... no widely used DL library is in Julia, and they are all in Python.

It's kind of a silly point to try to score: "it's possible to write an efficient deep learning library in Julia (although no one has done it yet), and yes, you can do the same in Numpy in Python, and XLA in Python will outpeform it, but someone else wrote some C/C++ there to make that possible!"

You are much more likely to want to write CUDA kernels (in C!) than you are to write C framework code to interface with Python for machine learning.

The person is looking to "get into ML". I've been working as a professional ML developer for 6 years, and I've never written any C or C++ for it.

Re:Fast.ai and why Python is not the future of ML with Jerem... by BadInformatics on Tuesday September 08, 2020 @11:33AM (#24409408)
> although no one has done it yet

This may be generally true (though the benchmarks I've seen show Knet.jl and sometimes Flux.jl on par with TF/PyTorch with a single machine + single GPU), but there are definitely domains where it is categorically not. The most prominent one is neural *DEs, where the SciML [1] ecosystem has SOTA performance. You can really see Python/C++-based frameworks struggle here because they have slow "glue code" and don't (one could argue can't effectively) optimize for latency. That's not a problem for most CV models and transformers, but really stunts research into more dynamic approaches.

[1] https://sciml.ai/

Re:Fast.ai and why Python is not the future of ML with Jerem... by nl on Tuesday September 08, 2020 @06:35PM (#24414393)
This sounds more like it's a new field.

I started looking for benchmarks (because it sounds like the kind of thing JAX would do well) and the very first link I clicked included:

Wraps for common C/Fortran methods like Sundials and Hairer's radau

which is exactly what was claimed wasn't needed.

Re:Fast.ai and why Python is not the future of ML with Jerem... by ChrisRackauckas on Wednesday September 09, 2020 @04:19AM (#24418651)
>I started looking for benchmarks (because it sounds like the kind of thing JAX would do well)

Currently Jax has an in-progress stiff ODE solver that's about 200x slower than SciPy

https://github.com/google/jax/issues/3686#issuecomment-65709...

and SciPy (with JIT) is about 50x-100x slower than the pure Julia methods

https://benchmarks.sciml.ai/html/MultiLanguage/wrapper_packa...

so Jax has more than a little bit of a way to go.

Re:Fast.ai and why Python is not the future of ML with Jerem... by amkkma on Tuesday September 08, 2020 @08:27PM (#24415287)
Those aren't needed, but they are options. "he templated implementation allows arbitrary array and number types to be compatible, giving compatibility with arbitrary precision floating point numbers, GPU-based computations, unit-checked arithmetic, and other features. "

Those are exactly the things wrapping fortran and c won't give you

Re:Fast.ai and why Python is not the future of ML with Jerem... by miguendes on Tuesday September 08, 2020 @07:35AM (#24407377)
> So, now I have to not only learn Python but also Fortran/C++/C because the underlying library that I might want to adapt is written in one of these languages. In Julia the DL library, for example, is written in Julia. What you are claiming is a pro is actually a con.

You don't need to learn C/C++ or fortran. I've been working with python and ML for about 4 years and haven't touched any C/C++ or fortran to get work done. I agree that it'd be better if we could do everything with just one language but the truth is that Julia is not that language. It's great for HPC but expressive enough for generic things like Web.

Re:Fast.ai and why Python is not the future of ML with Jerem... by dklend122 on Tuesday September 08, 2020 @02:29PM (#24411327)
How is it not generic enough for the web?

See https://genieframework.com/ and interact.jl

Once it can compile it web assembly (work in progress) it be the obvious choice.

Re:Fast.ai and why Python is not the future of ML with Jerem... by freyr on Tuesday September 08, 2020 @05:53AM (#24406844)
No, use Python. Python is a good choice for web development, and will remain the de-facto choice for ML for the foreseeable future. If you plan on learning both web development and ML, that will be quite enough work without throwing a second language into the mix right away.

Julia might be a good thing to explore once you're up and running.

Re:Fast.ai and why Python is not the future of ML with Jerem... by dgellow on Tuesday September 08, 2020 @04:46AM (#24406462)
Don't worry, you will get a lot of good things by learning Python. And when you become comfortable with your first programming language learning new ones will be way faster.

The most important for newcomers is to pick one language and stick with it long enough to know it well (I would advise for a general-purpose programming language such as python). It will take time before you bump into its limits, and when that happen you can start to look around how things are being done in other languages.

Re:Fast.ai and why Python is not the future of ML with Jerem... by smabie on Tuesday September 08, 2020 @04:40PM (#24413072)
If you're just learning, I guess it doesn't really matter. Just don't become one of those people who thinks Python is great because it's the only language they know.
Re:Fast.ai and why Python is not the future of ML with Jerem... by fxtentacle on Tuesday September 08, 2020 @03:53AM (#24406136)
My advice would be to use TensorFlow because it works flawlessly on Google Colab and in Jupyter notebooks.

The latter two are tools to send ML models and training pipelines around, so kind of like Google Docs for AI. Colab is on the internet, Jupyter on your PC.

That way, you can easily exchange your experiments with others and/or asks for help online.

Re:Fast.ai and why Python is not the future of ML with Jerem... by dunefox on Tuesday September 08, 2020 @05:46AM (#24406802)
Tensorflow is much worse than PyTorch, IMO. I wouldn't recommend it to a beginner in any case.
Re:Fast.ai and why Python is not the future of ML with Jerem... by 0-_-0 on Tuesday September 08, 2020 @07:14AM (#24407267)
What are the main differences that make pytorch better?
Re:Fast.ai and why Python is not the future of ML with Jerem... by mark_l_watson on Tuesday September 08, 2020 @09:48PM (#24415874)
You might want to recommend the Keras APIs for TensorFlow for people learning DL. The fastai and PyTorch libraries are also good when learning.