question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable writing dataset timestamps by default?

See original GitHub issue

This is a bit speculative, so I won’t push it if there doesn’t seem to be a consensus.

The option to disable writing timestamps (group.create_dataset(..., track_times=False)) appears to have been there since 2013 (#271), based on a request from 2011 (#225). It’s useful because, in some circumstances, people want running the same code to produce an identical file. There are much bigger challenges for reproducibility, so an option you can simply turn off isn’t the end of the world, but it’s an extra little annoyance for people to deal with (e.g. on Stackoverflow, and issue #1919).

I just tried to actually inspect some timestamps (to work out how they behave with group.copy()), and it took a while to work out how to do so.

  • I can’t find how to make any of the HDF5 command line tools show timestamps (h5ls, h5dump, h5stat).
  • The HDF5 C API favours H5Oget_info as the way to do this, but none of the time fields are exposed in h5py (even in the low-level). The HDF5 docs say that of 4 timestamps, only ctime is implemented.
  • h5py.h5g.get_objinfo().mtime appears to work, although the HDF5 C function is deprecated in favour of H5Oget_info. Only datasets appear to get a timestamp by default, and you’d need the low-level API to enable it for groups, so it’s weird to use an H5G API for datasets.

I can’t see any issues asking for us to expose the timestamps on h5py.h5o.ObjInfo, or to expose any kind of timestamp in the high-level API. I also did a couple of searches on the HDF forum, without finding much. I get a strong impression that very few people have any use for HDF5 object timestamps.

If more people want timestamps disabled than want to use timestamps, should we disable writing them by default? It would still be possible to enable them by passing track_times=True if someone does want them.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
takluyvercommented, Sep 10, 2021

The author of rhdf5 (R bindings) said on the HDF forum that he made a similar change, released in May 2020, and so far has not had any complaints.

I think this is a convincing datapoint, because usually breaking something is the most reliable way to get feedback. 😉

1reaction
takluyvercommented, Sep 5, 2021

If even people who want a timestamp are manually writing their own, that does suggest that writing the built-in timestamps is not a useful default.

I’m sympathetic to the argument that h5py should follow HDF5’s default, but when I went and looked at the HDF5 documentation, the default didn’t actually seem to be documented, which implies it’s not super important. Maybe if h5py makes the change, HDF5 will follow suit later.

I can see a range of possible motivations for checking exact equality rather than using h5diff. For one thing, it allows you to store the hash of the known good file rather than the file itself. You may also care about performance characteristics like chunking or where data is in a file. I also just like the idea that we can expect running the same code (inc. libraries) gives you the same output.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable Laravel's Eloquent timestamps - php - Stack Overflow
To disable timestamps for all of your Models, create a new BaseModel file: <?php namespace App; use Illuminate\Database\Eloquent\Model; class BaseModel ...
Read more >
Object timestamps - useful or not? - HDF5 - HDF Forum
I've opened a question of whether h5py should disable writing object timestamps by default. There are more details there, but to summarise: ...
Read more >
11.2.5 Automatic Initialization and Updating for TIMESTAMP ...
TIMESTAMP and DATETIME columns can be automatically initialized and updated to the current date and time (that is, the current timestamp).
Read more >
Timestamps, Time Zones, Time Ranges, and Date Formats
The Enable Timestamp Parsing option is selected by default. If it's deselected, no timestamp information is parsed at all. Instead, we stamp logs...
Read more >
How to Enable Last Access Time Stamp To Files on Windows
To save system resources in Vista, Microsoft disabled the Last Access Time Stamp. With Windows 7, this timestamp remains disabled.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found