MCPcopy Create free account

hub / github.com/deshaw/versioned-hdf5 / functions

Functions917 in github.com/deshaw/versioned-hdf5

↓ 174 callersMethodcreate_dataset
( self, name: str, shape: tuple[int, ...] | None = None, dtype: DTypeLike | No
versioned_hdf5/wrappers.py:257
↓ 169 callersMethodstage_version
Return a context manager to stage a new version The context manager returns a group, which should be modified in-place to bu
versioned_hdf5/api.py:283
↓ 81 callersMethodresize
(self, size, axis=None)
versioned_hdf5/wrappers.py:1238
↓ 59 callersMethodfull
Create a new StagedChangesArray with all chunks already in memory and full of fill_value. It won't consume any significant amounts of
versioned_hdf5/staged_changes.py:1065
↓ 52 callersMethodfrom_array
Create a new StagedChangesArray from an array. Parameters ---------- as_base_slabs: True (default)
versioned_hdf5/staged_changes.py:1104
↓ 49 callersMethodastype
(self, dtype: DTypeLike)
versioned_hdf5/wrappers.py:570
↓ 38 callersMethodcopy
Return a writeable Copy-on-Write (CoW) copy of self. Staged slabs will be individually deep-copied upon first access on either side.
versioned_hdf5/staged_changes.py:917
↓ 34 callersMethodcommit
Consolidate all staged chunks into a single, brand new base slab. This is the act of moving every chunk that lies on a staged slab to a new b
versioned_hdf5/staged_changes.py:850
↓ 33 callersFunctionreference
Reference (slow) implementation of a single-chunk hash
tests/test_hash.py:19
↓ 31 callersMethodcreate_group
(self, name, track_order=None)
versioned_hdf5/wrappers.py:236
↓ 26 callersFunctiondelete_versions
Completely delete the given versions from a file This function should be used instead of deleting the version group directly, as this will no
versioned_hdf5/replay.py:536
↓ 22 callersFunctionmodify_metadata
Modify metadata for a versioned dataset in-place. The metadata is modified for all versions containing a dataset. `f` should be the h5p
versioned_hdf5/replay.py:608
↓ 21 callersMethoddtype
(self)
tests/test_typing.py:33
↓ 19 callersFunctionhash_single_chunk
Hash the whole of ``slab`` (or its ``count``-trimmed prefix) as one chunk.
tests/test_hash.py:351
↓ 18 callersFunctionrows_as_digests
(hash_table: np.ndarray)
tests/test_hash.py:37
↓ 16 callersMethodassert_clean_setup
Assert that the setup was executed just before the test invoking this method. This is currently not the case for reruns, which means that you
benchmarks/common.py:41
↓ 16 callersFunctionindex_chunk_mappers
Preprocess a numpy fancy index used in __getitem__ or __setitem__ Returns ------- - ndindex.Tuple with the preprocessed index - list
versioned_hdf5/subchunk_map.py:715
↓ 15 callersFunctionwrite_dataset
( f, name, data, chunks=None, dtype=None, fillvalue=None, filters: Filters | None
versioned_hdf5/backend.py:263
↓ 14 callersFunctioncheck_data
(file, test_data_fillvalue=1.0, version2=True, test_data4_fillvalue=0)
tests/test_replay.py:54
↓ 14 callersFunctionsetup_vfile
(file)
tests/test_replay.py:34
↓ 13 callersFunctionceil_a_over_b
Returns ceil(a/b). Assumes a >= 0 and b > 0. Note ---- This module is compiled with the cython.cdivision flag and the data type is un
versioned_hdf5/cytools.py:49
↓ 12 callersMethodclose
Make sure the VersionedHDF5File object is no longer reachable.
versioned_hdf5/api.py:340
↓ 11 callersFunctionasarray
Variant of np.asarray(a, dtype=dtype), with some differences: 1. If a is a numpy-like array, don't coerce it to a numpy.ndarray 2. If a has a
versioned_hdf5/tools.py:18
↓ 11 callersFunctionhash_chunk
Hash a single chunk of ``slab`` with hash_slab and return its digest, double-checking it against the reference implementation. The chunk is `
tests/test_hash.py:262
↓ 11 callersMethodrefill
Create a copy of self with changed fill_value. TODO this method is implemented very naively, as it loads all chunks from the base sla
versioned_hdf5/staged_changes.py:1009
↓ 11 callersFunctionsetup_vfile
Fixture which provides a function that creates an hdf5 file, optionally with groups.
tests/conftest.py:58
↓ 10 callersMethod__exit__
(self, exc_type, exc_value, traceback)
versioned_hdf5/hashtable.py:187
↓ 10 callersMethodchanges
Yield all the changed chunks so far, as tuples of - slice index in the base virtual array - index of the slab in the slabs list
versioned_hdf5/staged_changes.py:618
↓ 10 callersFunctioncreate_virtual_dataset
Create a new virtual dataset by stitching the chunks of the raw dataset together, as indicated by the slices dict. See Also --------
versioned_hdf5/backend.py:693
↓ 10 callersMethodload
Load all chunks that are not yet in memory from the base array.
versioned_hdf5/staged_changes.py:831
↓ 9 callersMethod_check_committed
(self)
versioned_hdf5/wrappers.py:131
↓ 9 callersFunction_raw_data_hashtable
(vfile, name)
tests/test_backend.py:708
↓ 9 callersFunctioncreate_base_dataset
( f, name, *, shape=None, data=None, dtype=None, chunks=None, fillvalue=None,
versioned_hdf5/backend.py:203
↓ 9 callersMethodget
(self, name, default=None)
versioned_hdf5/wrappers.py:160
↓ 9 callersFunctionis_array_protocol
Equivalent of ``isinstance(a, ArrayProtocol)`` or ``isinstance(a, MutableArrayProtocol)`` should these classes have the @runtime_checkable dec
versioned_hdf5/typing_.py:67
↓ 8 callersFunction_chunks_in_selection
Find all chunks within a selection Parameters ---------- slab_indices: StagedChangesArray.slab_indices slab_offsets:
versioned_hdf5/staged_changes.py:2518
↓ 7 callersFunctionassert_slab_offsets
Assert that the StagedChangesArray.slab_offsets matches the expectations. This is useful to test chunk reuse.
tests/conftest.py:76
↓ 7 callersFunctioncommit_version
Create a new version. datasets should be a dictionary mapping {path: dataset}, where `dataset` is a *Dataset object. If make_curren
versioned_hdf5/versions.py:82
↓ 7 callersFunctioncreate_version_group
Create the version group for a new version. prev_version should be a pre-existing version name, None, or '' If it is None, it defaults t
versioned_hdf5/versions.py:33
↓ 7 callersMethodrebuild_object_dtype_hashtables
Find all dtype='O' data groups and rebuild their hashtables.
versioned_hdf5/api.py:413
↓ 6 callersMethod_resize_plan
Formulate a plan to resize the array in place. See Also -------- _setitem_plan
versioned_hdf5/staged_changes.py:478
↓ 6 callersFunctionall_versions
Return a generator that iterates all versions by name If include_first is True, it will include '__first_version__'. Note that the orde
versioned_hdf5/versions.py:305
↓ 6 callersMethodchunks_indexer
(self)
versioned_hdf5/subchunk_map.py:346
↓ 6 callersMethodcreate_files
(self, versions=True)
analysis/performance_tests.py:53
↓ 6 callersFunctiondelete_version
Delete version `version_name`.
versioned_hdf5/versions.py:223
↓ 6 callersFunctionmake_array
Create a StagedChangesArray with the chunks laid out as described by STATES
benchmarks/staged_changes.py:195
↓ 6 callersMethodsave
(self, summary, filename)
analysis/performance_tests.py:148
↓ 5 callersFunction_baseline_hash_table
Position-indexed hash table for a chunk-aligned 1D base slab, as the on-disk legacy hash table would be inverted into.
tests/test_staged_changes.py:1763
↓ 5 callersMethod_calc_hashes
Internal stage 1 of commit(): hash all staged chunks (and the full slab) in place.
versioned_hdf5/staged_changes.py:841
↓ 5 callersMethod_get_slab
Fetch a slab by index, or the __getitem__/__setitem__ array if idx is None. If there was a previous call to copy() and the slab is going to b
versioned_hdf5/staged_changes.py:580
↓ 5 callersFunction_make_transfer_plans
Generate one or more TransferPlan, one for each pair of source and destination slabs. Parameters ---------- slab_indices: Sta
versioned_hdf5/staged_changes.py:2705
↓ 5 callersMethod_setoptions
(self, options)
analysis/performance_tests.py:30
↓ 5 callersFunctionassert_swaps_counter
Test BufferMixin._swaps_counter. Do nothing for plain h5py.Dataset.
tests/test_npystrings.py:42
↓ 5 callersMethoddtype
Override Dataset.dtype to allow hot-swapping equivalent dtypes, e.g. NpyStrings <-> object strings
versioned_hdf5/wrappers.py:693
↓ 5 callersMethodhash
Compute hash for `data` array.
versioned_hdf5/hashtable.py:119
↓ 5 callersFunctionis_vstring_dtype
Return True if the dtype is a variable length string dtype, either a NpyString (a.k.a. StringDType) or an h5py object string; False otherwise.
versioned_hdf5/backend.py:40
↓ 5 callersFunctionrecreate_dataset
Recreate dataset from all versions into `newf` `newf` should be a versioned hdf5 file/group that is already initialized (it may or may n
versioned_hdf5/replay.py:44
↓ 5 callersFunctiontmp_group
Create a temporary group in `f` for use with :func:`recreate_dataset`.
versioned_hdf5/replay.py:152
↓ 5 callersMethodwrite
(self)
versioned_hdf5/hashtable.py:166
↓ 4 callersMethod__enter__
(self)
versioned_hdf5/hashtable.py:184
↓ 4 callersMethod_apply_mutating_plan
Implement common workflow of __setitem__, resize, and load.
versioned_hdf5/staged_changes.py:676
↓ 4 callersMethod_load_plan
Formulate a plan to load all chunks from the base slabs into staged slabs. See Also -------- _setitem_plan
versioned_hdf5/staged_changes.py:503
↓ 4 callersFunction_maybe_array_idx_to_slice
Attempt to convert an integer or boolean array index to a slice
versioned_hdf5/subchunk_map.py:815
↓ 4 callersFunction_normalize_resize_args
Normalize the parameters of Dataset.resize()
versioned_hdf5/wrappers.py:1163
↓ 4 callersFunction_recreate_raw_data
Create a new raw dataset without the chunks from versions_to_delete. Parameters ---------- f : VersionedHDF5File | File File for
versioned_hdf5/replay.py:203
↓ 4 callersMethod_setitem_plan
Formulate a plan to set a slice of the array. Parameters ---------- idx: First argument of __setitem__. Note that
versioned_hdf5/staged_changes.py:444
↓ 4 callersMethod_write_transactions_sparse
( cls, name, chunk_size, compression, versions, print_transact
analysis/generate_data_base.py:81
↓ 4 callersMethodastype
Return a new StagedChangesArray with a different dtype. Staged slabs will be converted lazily, upon first access. Parameters
versioned_hdf5/staged_changes.py:937
↓ 4 callersFunctionmake_ht
(n)
tests/test_hash.py:347
↓ 4 callersMethodread_many_slices_params
(self)
versioned_hdf5/subchunk_map.py:245
↓ 4 callersMethodrechunk
Create a copy of self with changed chunk_size. This loads all chunks into memory.
versioned_hdf5/staged_changes.py:1043
↓ 4 callersMethodreopen
Close the dataset, thus ensuring everything has been flushed to disk, and reopen it.
benchmarks/common.py:33
↓ 4 callersMethodresize
Change the array shape in place and fill new elements with self.fill_value. When enlarging, edge chunks which are not exactly divisible by ch
versioned_hdf5/staged_changes.py:744
↓ 4 callersFunctionrun
Run a command in the project root, raising if it fails. If `tee` is given, stdout is also written to that file.
ci/asv_compare.py:69
↓ 4 callersFunctionsetup2
(vfile)
tests/test_replay.py:1000
↓ 4 callersFunctionsetup_two_versions
Create two versions of a 3x3 dataset, the second of which alters a single chunk. Return the expected contents of the second version.
tests/test_replay.py:1072
↓ 3 callersMethod__getitem__
(self, index)
versioned_hdf5/wrappers.py:560
↓ 3 callersMethod__init__
( self, idx: slice, dset_size: hsize_t, chunk_size: hsize_t, )
versioned_hdf5/subchunk_map.py:294
↓ 3 callersMethod__init__
( self, shape: tuple[int, ...], chunk_size: tuple[int, ...], slab_indices: NDA
versioned_hdf5/staged_changes.py:1621
↓ 3 callersMethod__setitem__
(self, index, value: ArrayLike)
versioned_hdf5/wrappers.py:565
↓ 3 callersMethod_changes_plan
Formulate a plan to export all the staged and unchanged chunks. This is a read-only operation.
versioned_hdf5/staged_changes.py:419
↓ 3 callersMethod_commit_plan
Formulate a plan to deduplicate and consolidate all staged chunks. You must run _calc_hashes() before invoking this. See Also
versioned_hdf5/staged_changes.py:546
↓ 3 callersMethod_copy_slab
Deep-copy a slab into a new NumPy array, padded to full chunk_size.
versioned_hdf5/staged_changes.py:796
↓ 3 callersMethod_getitem_plan
Formulate a plan to get a slice of the array. This is a read-only operation.
versioned_hdf5/staged_changes.py:431
↓ 3 callersMethod_hash_plan
Formulate a plan to hash all staged chunks. This is a read-only operation.
versioned_hdf5/staged_changes.py:521
↓ 3 callersMethod_maybe_swap_string_dtype
(self, dtype: np.dtype)
versioned_hdf5/wrappers.py:514
↓ 3 callersFunction_recreate_hashtable
Recreate the hashtable for the dataset f, with only the new chunks in the raw_data_chunks_map. If tmp=True, a new hashtable called '_tmp
versioned_hdf5/replay.py:295
↓ 3 callersFunction_replace_prefix
Replace the prefix name1 with name2 in path
versioned_hdf5/replay.py:748
↓ 3 callersMethod_set_filters
(self, dataset_name: str, filters: Filters)
versioned_hdf5/wrappers.py:455
↓ 3 callersFunctioncommit_staged_changes
Commit a StagedChangesArray into `raw_data` and its on-disk hash table. 1. Load the on-disk hash table dataset that hashes all chunks of `raw_dat
versioned_hdf5/backend.py:436
↓ 3 callersFunctioncount2stop
Inverse of stop2count. When count == 0 or when step>1, multiple stops can yield the same count. This function returns the smallest stop >= st
versioned_hdf5/cytools.py:35
↓ 3 callersMethoddatasets
(self)
versioned_hdf5/wrappers.py:411
↓ 3 callersMethoddtype
(self)
versioned_hdf5/typing_.py:39
↓ 3 callersFunctionformat_ndindex
Format a numpy ndindex for pretty-printing. >>> format_ndindex(slice(None)) ':' >>> format_ndindex(slice(None, 10, 2)) ':10:2' >>
versioned_hdf5/tools.py:121
↓ 3 callersMethodfrom_dataset
Reverse engineer create_dataset kwargs from an h5py.Dataset.
versioned_hdf5/backend.py:112
↓ 3 callersMethodget_version_by_timestamp
(self, timestamp, exact=False)
versioned_hdf5/api.py:223
↓ 3 callersFunctionh5py_astype
(ds: h5py.Dataset, dtype: DTypeLike)
versioned_hdf5/h5py_compat.py:17
↓ 3 callersFunctionhash_one
Hash a single chunk via hash_slab (treating it as a one-chunk slab) and return the 32-byte digest.
tests/test_hash_legacy_compat.py:25
↓ 3 callersFunctioninitialize
(f)
versioned_hdf5/backend.py:70
↓ 3 callersFunctionlegacy_hash
(h5file)
tests/test_hash_legacy_compat.py:20
next →1–100 of 917, ranked by callers