semvec/pypi-packages huggingface dataset:
rul_datasets 0.17.1
A collection of datasets for RUL estimation as Lightning Data Modules.
License: MIT
Requires Python: <4.0,>=3.8

# RUL Datasets

[![Master](https://github.com/tilman151/rul-datasets/actions/workflows/on_push.yaml/badge.svg)](https://github.com/tilman151/rul-datasets/actions/workflows/on_push.yaml)
[![Release](https://github.com/tilman151/rul-datasets/actions/workflows/on_release.yaml/badge.svg)](https://github.com/tilman151/rul-datasets/actions/workflows/on_release.yaml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

This library contains a collection of common benchmark datasets for **remaining useful lifetime (RUL)** estimation.
They are provided as [LightningDataModules](https://pytorch-lightning.readthedocs.io/en/stable/api/pytorch_lightning.core.LightningDataModule.html#pytorch_lightning.core.LightningDataModule) to be readily used in [PyTorch Lightning](https://pytorch-lightning.readthedocs.io/en/latest/).

Currently, five datasets are supported:

* **C-MAPSS** Turbofan Degradation Dataset
* **FEMTO** (PRONOSTIA) Bearing Dataset
* **XJTU-SY** Bearing Dataset
* **N-C-MAPSS** New Turbofan Degradation Dataset
* **Dummy** A tiny, simple dataset for debugging

All datasets share the same API, so they can be used as drop-in replacements for each other.
That means, if an experiment can be run with one of the datasets, it can be run with all of them.
No code changes needed.

Aside from the basic ones, this library contains data modules for advanced experiments concerning **transfer learning**, **unsupervised domain adaption** and **semi-supervised learning**.
These data modules are designed as **higher-order data modules**.
This means they take one or more of the basic data modules as inputs and adjust them to the desired use case.

## Installation

The library is pip-installable. Simply type:

```shell
pip install rul-datasets
```

## Contribution

Contributions are always welcome. Whether you want to fix a bug, add a feature or a new dataset, just open an issue and a PR.
ymlstash 1.2.1
A simple ORM-like utility for operating on local YAML files via Python dataclasses
License: MIT
Requires Python: <4.0,>=3.8

# ymlstash

A simple ORM-like utility for operating on local YAML files via Python dataclasses.

In the context of this library, a *stash* is a diretory in the filesystem that holds many `.yml` files that all adhere to the same structure.

`ymlstash` simplifies the management of such a basic database of files.

## Install

Package is published on PyPI - https://pypi.org/project/ymlstash/

Install from pip or your favorite package manager:

```bash
$ pip install ymlstash
```

## Usage

Start by defining your model as a dataclass:

```python
from dataclasses import dataclass
from typing import ClassVar

@dataclass
class User:
    name: str
    age: int
    active: bool
    key: ClassVar[str] = "name"
```

### Primary Keys

Each model **must** include a primary key that will be used as the entry filename to uniquely access each record. 

The recommended way do to this is with the special `key` field which is used to denote that `name` should be used as the primary key field. If an object has `name: "foo"`, it will be saved as `foo.yml` in the stash root directory.

### Actions

Instantiate a new object:

```python
user = User(name="yuval", age=42, active=True)
```

Save it to file:

```python
from ymlstash import YmlStash

stash = YmlStash(User, "path/to/db")  # path can either be a string or Path() object
stash.save(user)
```

This will create a `yuval.yml` file in the stash root directory.

If the `key` field is not present on the dataclass, an explicit `key` must be passed:

```python
stash.save(obj, key="custom-key")
```

Load from file:

```python
user = stash.load("yuval")
```

List all keys existing in stash:

```python
keys = stash.list_keys()
```

Delete a key:

```python
stash.delete("foo")
```

Check for key existence:

```python
stash.exists("foo")
```

Drop all files (careful, this deletes everything):

```python
stash.drop()
```

## License

[MIT](LICENSE)