-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
GET_Value return 0 for numeric scalar datasets #100
Comments
Hey, sorry for the delay in responding to this. It looks like something wonky is going on with implicit dataset creation - I'll look into it. If I use the create_dataset method, you get the expected result. I ran this code:
bounced the server (to verify stuff got written to storage), and than ran this:
and got the following output:
So that looks correct. Strange that you got the chunk not found error. In general the HDF REST API doesn't return a 400 error when a chunk doesn't exist. Just like with h5py, if you read a chunk that hasn't been written to, you'll get zeros (or the fill value if that is set). But when writing to a dataset, you should see the DN node write out each chunk. If you grep the dn logs for "s3sync", you'll see the flow as objects get written. Also, since you are using posix, you can verify the contents just by listing the contents of the dataset directory for that file.
Let me know if you get the expected results with the modified file. I'll update h5pyd to do the right thing for your original code. |
I've got a fix for implicit dataset creation: HDFGroup/h5pyd@eaeb9d6. You'll need to build h5pyd from the jreadey-work branch for now to get the fix. No HSDS changes were needed. @loichuder, if you get a chance to try it, please let me know if that resolved the issue. |
First, here are some things I had to do to make the jreadey-work branch work:
Dependencies will need to be updated. I then reloaded my The SN still give me the same logs. |
Just realized I skimmed your previous comment, sorry ! Indeed, using this piece of code
works fine: I get the expected values for
Good call ! I had a look and the files This explains why the chunk is not found when the file/domain was created using |
Hey @loichuder -
the read program above works as expected:
Thanks for pointing out the unix_requests import error - I've added that to setup.py and pushed changes to jreadey-work (along with some pyflakes fixes) |
Also, about the requests_unixsocket/requests/urllib3 imports... Installing requests_unnixsocket should pull in requests and requests should grab urrlib3. So I thought it better to let these packages manage the required versions rather than doing it in the h5pyd setup. If I pip install. unix_requests on a clean environment I get:
Which looks right. But maybe this breaks if you already have requests or urrlib3 installed? The boto3 dependency should have been in the setup previously. |
Yes, using The issue is in fact present when I use
That would work if you were bound to the same requirements as these packages. But In my opinion, the requirement should be make explicit by adding
But that is up to you in the end 😄 |
Closing the issue - I'll need to re-visit the setup issue soon. Thinking to combine hsds and h5pyd repos and have combined setup.py. |
The issue is still present when I use h5py to create the file and then use h5pyd through |
That's odd - I'll take a look. |
That's a bug - the chunk layout with the link info was getting ignored for scalar datasets. I put a fix in here: HDFGroup/h5pyd@9a0af51. With this change scalar datsets won't get linked back to the HDF5 file but just copied. Since they are presumably small in size this should not be an issue. |
Thanks for the great work: HDFGroup/h5pyd@9a0af51 fixes the problem 🙂 👍
I think you meant this should not be an issue 😄 |
Yes, that's what I meant! |
I try to serve with HSDS POSIX a simple HDF5 file with scalars of different types:
Requesting the values of the
string
andbool
datasets yield the correct values. However, when trying to get the values ofint
orfloat
, the request succeeds but I get0
instead of the actual value.The service node logs tell that the chunk is not found:
But the request goes through just fine (following logs):
Additional chunk debug logs
The text was updated successfully, but these errors were encountered: