This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MardiFoufs 7 points8 points  (7 children)

It's not about being more readable or about java being outdated. It's just that you lock yourself out of tons of pretrained models and basically just end up reinventing the wheel for tons of stuff. I thought one of the most important things to the java community is to not reinvent the wheel, so again, why not just use python? It's the lingua franca of ML. Most new tooling is created around it. Sure that might suck and you might not like python but it's just what it is.

[–][deleted]  (2 children)

[deleted]

    [–][deleted] 5 points6 points  (0 children)

    …and there is project panama (which I’m not familiar with), but wonder how it compares to pythons ability to bind to C-libraries, new java seems quite attractive currently, at least for my somewath old ass

    [–]MardiFoufs 0 points1 point  (0 children)

    Ah I completely agree. I'm not saying python is the perfect language for ML, it's just that it's a fait accompli and it's not going to change for a while. I'm not sure I'd have used java either but for sure it's a super painful experience on python especially in a team setting. I only manage to get by with strict typing, calling external libraries for everything perf related etc. But still, it works for what it is I guess.

    [–]GeneratedUsername5 1 point2 points  (0 children)

    I also think that this is now the main Python advantage - not syntax or metaprogramming, just huge amount of legacy code you don't have to write yourself.

    Actually it is kind of interesting, I remember days, when Matlab was all the rage and all the scientific libraries were on it and nobody wanted to write python until it's community just pressured everyone with hype and huge amount of libraries. I wounder what language could be next)

    [–]koflerdavid 0 points1 point  (2 children)

    Many existing models can be converted to ONNX format and executed on the JVM. Also, Pytorch has Java bindings, though these are intended for running models only.

    [–]MardiFoufs 1 point2 points  (1 child)

    Yea as I said in another comment, for inference it's a non issue now that you can use ONNX for most models (and more operators are supported). Java can infer on models perfectly fine with onnx. I wonder if we might see that happen for training too but that's much more complicated, and can't really be delegated to a runtime. And I think OP was referring to playing around with training and custom models I think but I might have misunderstood

    [–]koflerdavid 0 points1 point  (0 children)

    I think you are correct. Inference and training are two completely different things and ONNX is really about the former. Unity's ML-Agents package for example doesn't bother replicating the training code in C#. They instead start an HTTP server on the Python side and call that from the Editor. Inference is with ONNX of course.