Fork me on GitHub
Daniel Tan04:09:17

python libraries are alot more reliable

👍 1

@danieltanfh95 Do you use Python as interop in Clojure or do you run Python scripts independent to calculate model?


Can you precise exact experience with deeplearning4j which make you to decide to use Python instead deeplearning4j ?

Daniel Tan08:09:44

python interop with libpython

Rupert (All Street)09:09:39

Deeplearning4j does work with Clojure - not all versions though. Certainly start off with an empty project first. You need to add the appropriate deeplearning4j depdendencies according to your platform (e.g. x86/arm etc). Both deeplearning4j and python interop have strengths in different areas depending on the usecase. Libpython interop works well and is fun - you still get to write clojure!

👍 1
Carsten Behring17:09:16

Deeplearning4j is written in Java, and Java interop is working perfectly in Clojure. So by definition all Java libraries work in Clojure the same as in Java, independent of the version.


All in all I understand you recommend to use Python instead of Deeplearning4j. It would be great to hear precise example why 🙂


I've used DL4J from Clojure and it's fine so long as you have CUDA & cuDNN installed

Daniel Tan13:09:48

Docs and libraries are better in python land, I can use most hugging face models etc, it's alot easier to be productive. It doesnt help that data scientists dont usually document or code in a structured way.


oh yes. I have to use python libraries from libpython-clj for most ML work


ah so I have to use Python 🙂 just I don’t feel comfortable with Python tools and they documentations. It takes me a lot of time to figure out how things work and eve then I am not 100% sure I use them as intended.


Is there a way to make Intellij give me hints when I am typing for Python using libpython-clj?


use python-type for now

Daniel Tan14:09:34

im not sure if its a python issue tho, DL libraries are just hard to use kek, tho im also looking into dl especially for vision

Lone Ranger14:09:55

You mean code completion, @kwladyka ?

Daniel Tan14:09:13

which does have vision

Lone Ranger14:09:46

I guess you're saying it doesn't? Are you using require-python to do your imports?

Daniel Tan14:09:04

actualy cursive does give you hints

Daniel Tan14:09:30

not sure why it doesnt trigger for you


For Python interop in libpython?


ok thank you, I will check

Lone Ranger14:09:46

I set it up so code completion works for emacs, i thought I remembered it working for IntelliJ as well as long as you use require-python to import your python code

✔️ 1
Lone Ranger14:09:01

If it doesn't We'll make an issue for it


sure. Intellij build list completion in static way while emasc dynamic. I will let you know.


so far code completion doesn’t work for me in Intellij / Cursive but I expected this.


Well this mean I back to raw python once again

Lone Ranger15:09:04

libpython-clj is supposed to be a fun REPL experience


I don’t think it can be done in libpython-clj, it is more job for Curisve. But I will confirm it later. This is not the first time when I experience it. In general all scicloj doesn’t work with auto completion code.

Carsten Behring17:09:39

Clojure has some feature which allow a very dynamic manipulation of namespaces. Cursive code completion is based on static code analysis, which is incompatible with this (wide spread use) of dynamic namespaces. Overall a dynamic language such as Clojure can never have a perfectly working code completion.


And I don’t think it will be improved any time soon in Cursive


I was talking about this already with the author of Cursive