-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Incompatibility with cloudpickle==1.5.0 #991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 got the same issue |
Hi. I opened up an Issue on |
* Explicitly disallow cloudpickle v1.5.0 to avoid breaking TensorFlow Probability - This is a temporary solution to unblock development, but should be removed once TensorFlow Probability v0.11 has been released - tensorflow/probability#991 - cloudpipe/cloudpickle#390
…lity#991 to unblock our build
temporary workaround for tensorflow/probability#991
temporary workaround for tensorflow/probability#991
* pin cloudpickle==1.3.0 as temporary workaround for tensorflow/probability#991 to unblock our build (to be reverted once fixed upstream)
Thank you for the report, @ltetrel ! It looks like we pinned the CloudPickle dependency to 1.3 in 5cc832b because of compatibility issues with CloudPickle and some versions of Python 3.5 . (It also looks like CloudPickle has since fixed these issues in cloudpipe/cloudpickle#359 and cloudpipe/cloudpickle#361 .) As a quick fix, we are considering a TFP 0.10.1 release that is just TFP 0.10.0 but requiring CloudPickle 1.3. (If this would cause problems for you -- e.g., you're using TFP 0.10 and a higher version of CloudPickle -- please comment on this issue to let us know.) We are also investigating further and taking a look at the fix #993 from @matthewfeickert . |
@jburnim Sounds great. We have no issue requiring that specific version. Thanks for the prompt response! |
For the library I work on ( Though if is possible to have releases that don't explicitly pin dependencies to a single version number I think that's nicer.
Cool. Let me know if there is anything you need me to iterate on. I haven't taken the time to debug what the one test that is failing in CI is due to (given that all of CI fails at the moment). |
Update: We've now released TFP 0.10.1, which pins the CloudPickle version to 1.3, and are still looking into #993 . |
Thank you for fixing this @jburnim! 🙇 |
* Update pull request template (#1510) Clarify template to make it easier for contributors to fill in relevant information. * Temporary workaround for tensorflow_probability dependency issue (#1522) * pin cloudpickle==1.3.0 as temporary workaround for tensorflow/probability#991 to unblock our build (to be reverted once fixed upstream) * Update readme with new project using GPflow (#1530) * fix bug in varying_noise notebook (#1526) * Fix formatting in docs (intro.md) and restore link removed by #1498 (#1520) * pin tensorflow<2.3 tensorflow-probability<0.11 (#1537) * Quadrature Refactoring (#1505) * WIP: quadrature refactoring * Removing old ndiagquad code * deleted test code * formatting and type-hint * merge modules * black formatting * formatting * solving failing tests * fixing failing tests * fixes * adapting tests for new syntax, keeping numerical behavior * black formatting * remove printf * changed code for compiled tf compatibility * black * restored to original version * undoing changes * renaming * renaming * renaming * reshape kwargs * quadrature along axis=-2, simplified broadcasting * black * docs * docs * helper function * docstrings and typing * added new and old quadrature equivalence tests * black * Removing comments Co-authored-by: Vincent Dutordoir <[email protected]> * Typo Co-authored-by: Vincent Dutordoir <[email protected]> * notation Co-authored-by: Vincent Dutordoir <[email protected]> * reshape_Z_dZ return docstring fix * FIX: quad_old computed with the ndiagquad_old Co-authored-by: Vincent Dutordoir <[email protected]> * more readable implementation Co-authored-by: Vincent Dutordoir <[email protected]> * tf.ensure_shape added * removed ndiagquad * removed ndiagquad * Revert "removed ndiagquad" This reverts commit 7bb0e9f. * FIX: shape checking of dZ * Revert "removed ndiagquad" This reverts commit 8e23524. Co-authored-by: Gustavo Carvalho <[email protected]> Co-authored-by: ST John <[email protected]> Co-authored-by: Vincent Dutordoir <[email protected]> * Add base_conditional_with_lm function (#1528) * Added base_conditional_with_lm function, which accepts Lm instead of Kmm Co-authored-by: Neil Ferguson <[email protected]> Co-authored-by: Vincent Dutordoir <[email protected]> Co-authored-by: st-- <[email protected]> * Fixed separate_independent_conditional to correctly handle q_sqrt=None. (#1533) * Fixed separate_independent_conditional to correctly handle q_sqrt=None. Co-authored-by: Aidan Scannell <[email protected]> Co-authored-by: st-- <[email protected]> * Bump version numbers to 2.1.0. (#1544) * Re-introduce pytest-xdist (#1541) Enables pytest-xdist for locally running tests (`make test`) on multiple cores in parallel. * check dependency versions are valid on CI (#1536) * Update to not use custom image (#1545) * Update to not use custom image * Add test requirements * Update parameter to be savable (#1518) * Fix for quadrature failure mode when autograph was set to False (#1548) * Fix and test * Change shape of quadrature tensors for better broadcasting (#1542) * using the first dimension to hold the quadrature summation * adapting ndiagquad wrapper * Changed bf for bX in docstrings Co-authored-by: Gustavo Carvalho <[email protected]> Co-authored-by: st-- <[email protected]> Co-authored-by: Vincent Dutordoir <[email protected]> * Update min TFP supported version to 0.10 (#1551) * Broadcasting constant and zero mean function (#1550) * Broadcasting constant and zero mean function * Use rank instead of ndim Co-authored-by: st-- <[email protected]> Co-authored-by: joelberkeley-pio <[email protected]> Co-authored-by: gustavocmv <[email protected]> Co-authored-by: Gustavo Carvalho <[email protected]> Co-authored-by: ST John <[email protected]> Co-authored-by: Neil Ferguson <[email protected]> Co-authored-by: Neil Ferguson <[email protected]> Co-authored-by: Aidan Scannell <[email protected]> Co-authored-by: Aidan Scannell <[email protected]> Co-authored-by: Sandeep Tailor <[email protected]> Co-authored-by: Artem Artemev <[email protected]>
this is an issue again with the latest version of tensorflow 2.3.1 (security patch from 4 days ago) which has cloudpickle dependency >= 1.5.0 - meanwhile tensorflow-probability 0.11.0 still has cloudpickle == 1.3.0 |
The good news is that this was already resolved in TFP 7601ef6. So the next TFP release should have this all taken care of. I'm not sure what the release schedule for TFP is though. |
@matthewfeickert we generally build a new stable release whenever TF does, since in general we end up depending on new TF features in between their (and hence our) stable releases. We could increase our (TFP's) release cadence, so long as we either a) don't have such deps on not-yet-in-stable-TF features, or b) can easily hack around such issues on the release branch. |
Thanks for that info @csuter. 👍 I wasn't meaning to complain about not knowing (it isn't super important to me and I know full well that having people ask about release schedules can be a tiresome discussion point), but I do appreciate you offering up this information here as that probably helps people (though I'm sure had I searched harder I would have already found this information in another Issue). |
Definitely didn't detect any complaint! And I could talk release schedules all day! 😁 I think we (TFP) could probably do a bit better at communicating these processes, so folks don't have to go digging in Issues to find the info. Then again Google is a really good search engine, so maybe it's fine to have these bits buried in here 😅 |
Quick update (h/t to @brianwa84 for pointing out to me the actual context here, which I overlooked) -- TFP should actually release a patch to go with the TF 2.3.1 patch here. We'll look into it ASAP. |
…1.3. Checked that distribution_layer_test passes with: - CloudPickle 1.3.0, 1.4.1, and 1.5.0 . - Python 3.5 and 3.8 . Fixes tensorflow#991 . Thanks to https://github.com/matthewfeickert and https://github.com/ogrisel for helping with this issue! PiperOrigin-RevId: 323834575
TFP 0.11.1 is up on pypi now, and should work fine with TF 2.3.1 and newer cloudpickles. Please let us know if you run into further issues! |
Sorry, not sure if this is the right place to post this, but I'm trying to run a training job on Google Cloud AI Platform and this error is being thrown when specifying Python v3.7 and TensorFlow v2.3.1 when setting up the training job.
|
We encounter the same problem on the Google Cloud AI Platform, deploying a TFX pipeline with a model using TensorFlow probability
|
I resolved this by forcing AI Platform to update tensorflow_probability by adding it as one of the required packages in the setup file using: |
@jimzer @Edvard-D can you guys pls share your configuration. I am having the same issue using TFX pipeline with a model using tensorflow probability in gcp ai platform. But I can't figure out how to set the runtime version correctly. If i just add the runtime version, I get: 'description': "The specified runtime version '2.4' with the Python version '' is not supported or is deprecated. Please specify a different runtime version. args:
Then I try adding python and I get: 'description': 'Only one of runtime version or the master Docker image URI should be provided.'}]}]"> args:
Thank you. |
@entrpn runtimeVersion refers to the Tensorflow version. I'm not sure about the error you're getting, but I'm submitting it using the following code which essentially submits it via command line:
(if you're using Linux I'm pretty sure you should remove "shell=True") |
I finally solved my issue. Had to dig through the tfx code to figure out how the Trainer component works. If anyone comes across this and is struggling, hopefully it will help. The issue with tfx and ai platform is that you can't specify runtime version or python version because tfx uses containers. So the way to go about this is to first create a container that uses a tfx image as base. In my case, I needed tensorflow probability so:
build it and push it to your projects container registry. Then add it to the trainer args like:
Also copy the trainer python file that is used by the Trainer component into a gcs bucket so that the image can access it. Then run the job. |
Hi all,
Due to a new update, it is not possible to
import tensorflow_probability
anymore.Using
cloudpickle <= 1.4.1
fixed the issueThe text was updated successfully, but these errors were encountered: