ray-project / ray

Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
33.35k stars 5.65k forks source link

[solved] LZ4 Installation Issues #2278

Closed Scitator closed 6 years ago

Scitator commented 6 years ago

Hi,

I am trying to follow the ray tutorials. Nevertheless, I found several bug with save/load functional in ray 0.4 and decide to move to the master brach.

Unfortunately, I again come to bugs, but now with dependencies versions (lz4 package). I tried different versions (1.0.0, 1.1.0, 2.0.0), but all gives the same error:

     36 with ignoring(ImportError):
     37     import lz4
---> 38     compress['lz4'] = lz4.LZ4_compress
     39     decompress['lz4'] = lz4.LZ4_uncompress
     40 

AttributeError: module 'lz4' has no attribute 'LZ4_compress'

So, can you provide package version to reduce number of such issues? And is it correct, that ray version 0.5 would be available soon?

Thanks!

richardliaw commented 6 years ago

Can you post a full stack trace of the error?

Often times when I run into lz4 issues, I can resolve it by running pip install -U dask.

On Tue, Jun 19, 2018 at 11:40 PM Sergey Kolesnikov notifications@github.com wrote:

Hi,

I am trying to follow the ray tutorials https://github.com/ray-project/tutorial. Nevertheless, I found several bug with save/load functional in ray 0.4 and decide to move to the master brach.

Unfortunately, I again come to bugs, but now with dependencies versions (lz4 package). I tried different versions (1.0.0, 1.1.0, 2.0.0), but all gives the same error:

 36 with ignoring(ImportError):
 37     import lz4

---> 38 compress['lz4'] = lz4.LZ4_compress 39 decompress['lz4'] = lz4.LZ4_uncompress 40

AttributeError: module 'lz4' has no attribute 'LZ4_compress'

So, can you provide package version to reduce number of such issues? And is it correct, that ray version 0.5 would be available soon?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ray-project/ray/issues/2278, or mute the thread https://github.com/notifications/unsubscribe-auth/AEUc5VwwM_sHcQiS1uDvxgK8Oh6de4Hzks5t-e5ygaJpZM4UusPE .

robertnishihara commented 6 years ago

Yeah, that's probably the issue, also see https://github.com/ray-project/ray/issues/2137#issuecomment-391967245.

Scitator commented 6 years ago

Thanks, now all works perfectly.

Just to be sure, I want to implement several RL algos with Ray (I found it really great one with a lot of cool stuff). But with PyTorch neither TensorFlow. So, what is the best way to start with? Are there any PyTorch examples? (paper says they should be)

richardliaw commented 6 years ago

That's great - there's an example implementation of A3C in PyTorch in the code base here

One thing you could take a look at is trying to implement the standard Policy Gradient in PyTorch. The current tensorflow version is here.

If you have any feedback or questions, feel free to reach out, either via github or on our mailing list!

robertnishihara commented 5 years ago

It's still pretty common to encounter this issue. I wonder if we should include something in RLlib that checks if lz4 is installed and if tensorflow is being used and then raises a better exception.

The issue is where to put the check. We basically want the check to happen iff tf.contrib is being used I think.

Another solution is to remove our usage of tf.contrib.

silverbacknet commented 4 years ago

It looks like this was fixed for good in https://github.com/ray-project/ray/commit/8b6f0d3224055e5e028569e31cfd56316f7ce29e