Files
Utilities for file operations.
atomic_write
#
Write to a file atomically.
This means that the file will be flushed to disk and explicitly ask the operating systems to sync the contents to disk. This ensures that other processes that read from this file should see the contents immediately.
Source code in neps\utils\files.py
deserialize
#
Deserialize data from a yaml file.
Source code in neps\utils\files.py
load_and_merge_yamls
#
Load and merge yaml files into a single dictionary.
RAISES | DESCRIPTION |
---|---|
ValueError
|
If there are duplicate keys in the yaml files. |
Source code in neps\utils\files.py
serializable_format
#
Format data to be serializable.
Source code in neps\utils\files.py
serialize
#
serialize(
data: Any,
path: Path,
*,
check_serialized: bool = True,
file_format: Literal["json", "yaml"] = "yaml",
sort_keys: bool = True
) -> None
Serialize data to a yaml file.