AiiDA v2.0 and the new file repository #4804
Replies: 4 comments 7 replies
-
mentioning @aiidateam/plugin-developers for input |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, a short question from my side. Based on the wiki page @sphuber linked in his comment, I can only use the file handle AiiDA provides me if I want to access a file stored to the repository. So far so good, but what about post-processing software which does not allow to pass a file handle / stream directly but rather requires a path to the actual file? AFAIK pymatgen's vasp inputs / outputs modules are two such examples and this is actually the reason why I did not access files in the recommended way in aiida-cusp. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Hi @sphuber let's say, I want to read the file accessible in the old API under |
Beta Was this translation helpful? Give feedback.
-
That's great. Few days ago I did a backup of my repository by doing a |
Beta Was this translation helpful? Give feedback.
-
Those of you who have been using AiiDA for serious high-throughput studies likely have noticed that AiiDA profiles with several 100k or even millions of nodes can strain your hard drive - not only in terms of disk space but also in terms of inodes as AiiDA creates a separate folder for each node, and then places any files associated with that node inside this folder (or its subfolders). Furthermore, there is currently no de-duplication of files (storing the same data twice will take twice the amount of disk space) and no compression.
This is especially serious when using slow disks (e.g. magnetic or network filesystems) and when several large projects reside on the same machine. In order to tackle this, we've started over a year ago to prepare the stage for a transition to a more efficient file repository based around the disk-objectstore package (see AiiDA enhancement proposals 1 2). During regular usage, you can expect substantial reduction in the amount of disk space used and orders of magnitude reductions in the number of inodes used. Operations that involve reading or writing large numbers of files (e.g. export / import) or even all files (e.g. backup using
rsync
) are much faster than before, in some cases orders of magnitude.While the current AiiDA API for accessing files already includes some level of abstraction, the switch from a file-based repository to an object-store interface required some minor breaking changes to the interface that are detailed on the wiki. Since this is a breaking change, the version of AiiDA with the new file repository will be AiiDA v2.0 - we want to stress, however, that the transition is far less disruptive than the transition from AiiDA 0.X to AiiDA 1.0.
The largest incompatible change is that files in the file repository must be accessed through the API provided by AiiDA and can no longer be addressed directly through an absolute path on the file system. The old API that allowed this has already been deprecated in v1.0 (i.e. you should be seeing warnings if you are using it) and most aspects of the v2.0 API were already put in place. However, looking almost two years into the future is not easy and so some minor changes still had to be made to the file repository interface.
We provide instructions on how to migrate your plugin, including instructions on writing code that is compatible with v1.0 as well as v2.0 which is quite straightforward. For an example of what this migration looked like for the
aiida-quantumespresso
plugin, see this PR.Now that the implementation of the new file repository is almost ready, we are starting to map out the release schedule of v2.0 (see also this discussion on the branch/release approach) and want to gauge the situation with the plugins. The first step for us is to check whether there still are any plugins that rely on directly accessing repository files on the disk. If so, let us know and can we help migrate them to the official API.
This should constitute the biggest part of the migration. We plan to remove some other deprecated functionality in v2.0 (if you're using any of these, you should already be seeing deprecation warnings in AiiDA 1.x, or search for "deprecated" in the
aiida-core
codebase ), and so we may want to organize a short hackathon once the AiiDA 2.0 release is imminent to get everyone across the finish line. Please let us know in case you'd like to be involved. Comments, questions and discussion about v2.0 are also very welcome.edited by @ltalirz
Beta Was this translation helpful? Give feedback.
All reactions