ai

kwladyka 2022-09-15T07:24:20.783909Z

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

kwladyka 2022-09-15T08:04:24.282009Z

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

2022-09-15T08:04:44.327029Z

python interop with libpython

Rupert (Sevva/All Street) 2022-09-15T09:32:39.182719Z

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
2022-09-17T17:48:16.801579Z

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.

kwladyka 2022-09-15T10:57:19.267819Z

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

octahedrion 2022-09-15T12:46:34.900279Z

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

2022-09-15T13:22:48.285999Z

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.

octahedrion 2022-09-15T13:24:42.353069Z

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

kwladyka 2022-09-15T13:59:37.209979Z

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.

kwladyka 2022-09-15T14:14:17.329579Z

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

octahedrion 2022-09-16T08:29:19.814339Z

use python-type for now

2022-09-15T14:39:34.739619Z

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 Ranger 2022-09-15T14:39:55.547229Z

You mean code completion, @kwladyka ?

2022-09-15T14:40:03.593069Z

there's https://github.com/scicloj/clj-djl

2022-09-15T14:40:13.876219Z

which does have vision

kwladyka 2022-09-15T14:40:14.307509Z

@goomba yes

Lone Ranger 2022-09-15T14:40:46.227599Z

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

2022-09-15T14:41:04.629039Z

actualy cursive does give you hints

2022-09-15T14:41:30.824969Z

not sure why it doesnt trigger for you

kwladyka 2022-09-15T14:41:31.797989Z

For Python interop in libpython?

kwladyka 2022-09-15T14:41:42.060529Z

ok thank you, I will check

Lone Ranger 2022-09-15T14:41:46.939129Z

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 Ranger 2022-09-15T14:42:01.355869Z

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

kwladyka 2022-09-15T14:42:42.733469Z

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

kwladyka 2022-09-15T15:03:55.515109Z

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

kwladyka 2022-09-15T15:04:13.471349Z

Well this mean I back to raw python once again

Lone Ranger 2022-09-15T15:10:46.927359Z

@kwladyka I would encourage you to make an issue for it: https://github.com/clj-python/libpython-clj/issues

kwladyka 2022-09-16T19:44:47.265299Z

https://github.com/cursive-ide/cursive/issues/2731

🤘 1
Lone Ranger 2022-09-15T15:11:04.529759Z

libpython-clj is supposed to be a fun REPL experience

kwladyka 2022-09-15T15:18:33.486719Z

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.

2022-09-17T17:52:39.279259Z

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.

kwladyka 2022-09-15T15:19:57.434549Z

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

kwladyka 2022-09-15T15:20:07.397979Z

I was talking about this already with the author of Cursive

2022-09-15T04:04:17.066679Z

python libraries are alot more reliable

👍 1