Comments (29)
The output you got is correct.
This is the same warning that I mentioned getting with Python2.7 in #173 . My details are
Arch Linux with kernel version 4.14.11
Python 2.7.14
numpy 1.14.0
scipy 1.0.0
h5py 2.7.1
I also get the warning when simply running import openfermion
. From the look of it, it seems specific to h5py and is not our fault. It also seems like it shouldn't actually affect anything.
from openfermion.
pip3 uninstall h5py
pip3 install h5py==2.8.0rc1
this can fix problems . hope it will help you.
from openfermion.
This seems to have come up very recently. It is just a warning, not a bug, and the code output still looks correct. This is likely due to something that changed recently in one of our dependancies. I'll take a look briefly tonight but may need to return to this tomorrow or Saturday - it doesn't seem critical (albeit ugly). Kudos to anyone else who tracks it down.
from openfermion.
I just found out that I get the same warning from simply executing import h5py
. So I think this has nothing to do with OpenFermion.
from openfermion.
From looking at h5py/h5py#961, it appears that the h5py developers are aware of this issue and are currently working on a fix at h5py/h5py#926.
from openfermion.
Hmm, thanks Kevin. Unfortunately they haven't updated that PR in ten days. The funny thing though is that I cannot reproduce this error on my mac. @kevinsung @gaming-hacker What version of h5py are you running?
from openfermion.
I'm using h5py 2.7.1
from openfermion.
I see. I am using Anaconda python and their latest distribution only uses h5py 2.7.0 which seems to not have this problem. I guess we should just wait until h5py people get this fixed.
from openfermion.
i'm using h5py (2.7.1) which was installed via openfermion dependencies. should i close the issue? i'll throw it over to the h5py repo.
if you run
python -c 'import h5py; print(h5py.version.info)'.
it confirms it is a dependency bug
from openfermion.
Thanks! I think it might be helpful to leave the issue open just so people can see this easily if they encounter the warning. I have marked it as "not our fault". We can close whenever h5py fixes this.
from openfermion.
i forked it and pulled in a few PRs and now without the warning
gaming-hacker/h5py
=>pycheck h5py
Summary of the h5py configuration
---------------------------------
h5py 2.7.1.post0
HDF5 1.10.1
Python 2.7.14 (default, Sep 22 2017, 00:06:07)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]
sys.platform darwin
sys.maxsize 9223372036854775807
numpy 1.14.0
from openfermion.
Hmm, so the problem disappeared for you? Does this mean the h5py people fixed the issue?
from openfermion.
I'm still getting the warning. I'm still on version 2.7.1 though and can't seem to get 2.7.1.post0.
from openfermion.
h5py haven't merged the PRs to fix this issue into their master branch. i forked my own repo, applied the correct PRs and now it works.
from openfermion.
Cool. It looks like we just need to wait for them to release the next version, then we can close this issue.
from openfermion.
Are people still seeing this bug?
from openfermion.
I'm still getting the warning. The latest version of h5py on pip is still 2.7.1.
from openfermion.
Still?
from openfermion.
Yeah. This will be an issue at least until the next h5py version (after 2.7.1) is released on pip (https://pypi.python.org/pypi/h5py). Again, this has nothing to do with OpenFermion because I get the warning when I execute just import h5py
.
from openfermion.
A hacky way to suppress this from the issue on the h5py repo (where I recently complained):
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import h5py
warnings.resetwarnings()
Maybe it's better than always seeing this message? @kevinsung what do you think?
from openfermion.
Thanks, that will be helpful for suppressing the warning in Jupyter notebook demos. I'm not sure that should actually go into our codebase though.
There is a new release candidate at https://pypi.python.org/pypi/h5py so hopefully this issue will be resolved soon!
from openfermion.
People still getting this? I like to check every week or so, lol
from openfermion.
Yup
from openfermion.
still
solutions?
from openfermion.
The only real solution is to fix h5py
, and by that I mean wait for the next production release to come out on https://pypi.python.org/pypi/h5py. @babbush gave a way to suppress the warning above:
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import h5py
warnings.resetwarnings()
For instance, you can put that in your IPython configuration file and then the warning will not show up in Jupyter.
from openfermion.
i don't think you want to hack to disable the warnings, you're applying a bandaid that might break future builds or cause weird errors. i'd suggest let h5py fix their issue. or just fork your own repo and add it to this project as a submodule and apply the patches.
from openfermion.
@kevinsung The 2.8 release is now on PyPI, so you should be able to close this now.
from openfermion.
Great!
from openfermion.
I'm reopening because I still incur the error message on a fresh install of OpenFermion. I think we may need to bump the version requirement in requirements.txt for h5py.
from openfermion.
Related Issues (20)
- UHF energy with openfermion HOT 1
- scipy > 1.9.3 breaks QuarticFermionicSimulationGate decompose method. HOT 5
- Incorrect Bounds on Trotter Error
- Incorrect formula to calculate required Trotter steps HOT 1
- Resource estimation code not tested as part of the CI
- Should move to black for formatting.
- Why does MajoranaOperator not subclass SymbolicOperator? HOT 1
- Some inconsistencies in molecular single factorization costings HOT 1
- Inconsistencies in the double factorized chemistry resource estimate costing function
- 91 tests fail HOT 7
- Nightly tests are broken HOT 1
- slight modification to function generate_hamiltonian ?
- Operation between MajoranaOperator and numbers? HOT 5
- QuadraticFermionicSimulationGate tests fail with cirq == 1.3.0 HOT 5
- Hubbard model notebook is flaky
- Trotter evolution time may be off by a factor of 2 HOT 2
- 1 test fails HOT 1
- get_sparse_operator fails on non-simplified QubitOperators
- Bad behavior when working with sympy
- pip installation overwrites module directory HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfermion.