Skip to content
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

Several deprecation warnings from NumPy and Tensorflow #113

Open
ronald-jaepel opened this issue Apr 1, 2019 · 2 comments
Open

Several deprecation warnings from NumPy and Tensorflow #113

ronald-jaepel opened this issue Apr 1, 2019 · 2 comments

Comments

@ronald-jaepel
Copy link

When running the firststeps example I get several deprecation warnings. The environment is a fresh virtual conda environment on Win 10 x64 with the following package versions: packages.txt

First the tensorflow warnings:

WARNING:tensorflow:From [envpath]\lib\site-packages\tensorflow\python\ops\control_flow_ops.py:423: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.

WARNING:tensorflow:From [envpath]\lib\site-packages\tensorflow\python\ops\math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.

WARNING:tensorflow:From [envpath]\lib\site-packages\gpflowopt\acquisition\ei.py:76: Normal.__init__ (from tensorflow.python.ops.distributions.normal) is deprecated and will be removed after 2019-01-01.
Instructions for updating:
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of `tf.distributions`.

WARNING:tensorflow:From [envpath]\lib\site-packages\tensorflow\python\ops\distributions\normal.py:160: Distribution.__init__ (from tensorflow.python.ops.distributions.distribution) is deprecated and will be removed after 2019-01-01.
Instructions for updating:
The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of `tf.distributions`.

This FutureWarning is raised by NumPy:

FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.

It occurs at the following four places during the example-script execution.

[envpath]\lib\site-packages\gpflowopt\acquisition\acquisition.py:193: 
  return self.models[0].X.value, np.hstack(map(lambda model: model.Y.value, self.models))

[envpath]\lib\site-packages\gpflowopt\domain.py:97: FutureWarning: 
  return np.vstack(map(lambda p: p.value, self._parameters)).T

[envpath]\lib\site-packages\gpflowopt\bo.py:150: 
  evaluations = np.hstack(map(lambda f: f(X), fxs))

[envpath]\lib\site-packages\gpflowopt\acquisition\acquisition.py:193: 
  return self.models[0].X.value, np.hstack(map(lambda model: model.Y.value, self.models))

I don't know if you were aware of these warnings, but I wanted to inform you just in case. Sadly I can't help with future-proofing as my coding skills are far too limited.

Thank you for the great package you've developed!

@ronald-jaepel ronald-jaepel changed the title Several of deprecation warnings from NumPy and Tensorflow Several deprecation warnings from NumPy and Tensorflow Apr 1, 2019
@artsydog
Copy link

artsydog commented Apr 4, 2019

I can confirm that these warnings do still appear, can this issue be resolved soon?

@icouckuy
Copy link
Contributor

These warnings should be relatively easy to fix. I'm just wondering if GPFlow 0.5.0 itself also generates warnings? In general we try to depend on the same tensorflow and numpy versions as GPFlow (in this case 0.5.0). If GPFlow 0.5.0 works with the latest TF and numpy without problem, then we can look at it.

However, ideally we would like to move to GPFlow and TF 2.0 as soon as they are released, assuming they will fix the current problems we have with GPFlow 1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants