semvec/pypi-packages huggingface dataset:
metamaker 0.1.0
Simple CLI to train and deploy your ML models with AWS SageMaker
License: MIT
Requires Python: >=3.8,<4.0
Keywords: python,machine-learning,sagemaker

metamaker
=========

[![Actions Status](https://github.com/altescy/metamaker/workflows/CI/badge.svg)](https://github.com/altescy/metamaker/actions/workflows/main.yaml)
[![License](https://img.shields.io/github/license/altescy/metamaker)](https://github.com/altescy/metamaker/blob/master/LICENSE)

Simple command line tool to train and deploy your machine learning models with AWS SageMaker

## Features

metamaker enables you to:

- Build a docker image for training and inference with [poetry](https://python-poetry.org/) and [FastAPI](https://fastapi.tiangolo.com/)
- Train your own machine learning model with SageMaker
- Deploy inference endpoint with SageMaker

## Usage

1. Create poetry project and install metamaker

```
❯ poetry new your_module
❯ cd your_module
❯ poetry add git+https://github.com/altescy/metamaker#main
```

2. Define scripts for traning and inference in `main.py`

```main.py
from pathlib import Path
from typing import Any, Dict

from metamaker import MetaMaker

from your_module import Model, Input, Output

app = MetaMaker[Model, Input, Output]()

@app.trainer
def train(
    dataset_path: Path,
    artifact_path: Path,
    hyperparameters: Dict[str, Any],
) -> None:
    model = Model(**hyperparameters)
    model.train(dataset_path / "train.csv")
    model.save(artifact_path / "model.tar.gz")

@app.loader
def load(artifact_path: Path) -> Model:
    return Model.load(artifact_path / "model.tar.gz")

@app.predictor
def predict(model: Model, data: Input) -> Output:
    return model.predict(data)
```

3. Write metamaker configs in `metamaker.yaml`

```metamaker.yaml
handler: main:app
dataset_path: s3://your-bucket/path/to/dataset/
artifact_path: s3://your-bucket/path/to/artifacts/
hyperparameter_path: ./hparams.yaml

image:
  name: metamaker
  includes:
    - your_module/
    - main.py
  excludes:
    - __pycache__/
    - '*.py[cod]'

training:
  execution_role: arn:aws:iam::xxxxxxxxxxxx:role/SageMakerExecutionRole
  instance:
    type: ml.m5.large
    count: 1

inference:
  endpoint_name: your_endpoint
  instance:
    type: ml.t2.meduim
    count: 1
```

4. Build docker image and push to ECR

```
metamaker build --deploy .
```

5. Train your model with SageMaker and deploy endpoint

```
metamker sagemaker train --deploy
```
dumbdb 0.1.1
A super easy, but really really bad DBMS
License: MIT
Keywords: db,database,python,peewee,sqlite,mysql,postgresql,mongo,orm


# Dumb DB

### Are you looking for a reliable database management system? 
Then you've come to the wrong place. 

This is a very small database management system to store a minuscule amount of data in one of the worst possible ways. But hey, atleast its easy to use .

## Installation

Installation is super easy. Just use your favorite package manager.

```bash
  pip install dumbdb
```
    
## Usage/Examples

```python
from dumbdb import DumbDB

my_db = DumbDB(location="/tmp", file_name="temp_data.json")

# Use .set to set value
my_db.set("int", 1)
my_db.set("list", [])
my_db.set("cars", {})

# Use .get to get value
my_db.get("int")

# You can optionally pass a default value to the get method

my_db.get("new_key", default="Default Val")

```


## Advantages and Disadvantages

A good DMBS is characterized by the following. You can have a look how well the module fits the ideal DMBS.


| Desired Feature | Module Status |
|---|---|
| Data Availability | Data is stored in a file in JSON format. Your operating system handles data availability, but it is only accessible locally and only by users with priveledge to read the file |
| Minimized Redundancy | None. No effort at all |
| Data Security | Your operating system worries about this. Not this module |
| Easiness in Data Management | An easy to get started system |
| Data Structuring | None. You worry about that. |
| Querying Language | Two methods! Thats all you get. |

## Authors

- Github: [Elias Amha](https://www.github.com/0xecho)
- LinkedIn: [Elias Amha](https://www.linkedin.com/in/elijahma)


## Contributing

Contributions are always welcome!