Skip to main content

The official Python client for the MOSTLY AI platform.

Project description

MOSTLY AI - GenAI for Tabular Data

A Python wrapper for the MOSTLY AI platform (https://app.mostly.ai/).

Intent Primitive
Train a Generative AI on tabular data g = mostly.train(data)
Empower your team with safe synthetic data mostly.share(g, email)
Generate any number of synthetic data records mostly.generate(g, size)
Prompt the generator for the data that you need mostly.generate(g, seed)
Live probe the generator on demand mostly.probe(g, size | seed)
Connect to any data source within your org mostly.connect(config)
List the available models mostly.models(model_type)
List the available computes mostly.computes()
Info about the current user mostly.me()
Info about the platform mostly.about()

Installation

pip install -U mostlyai

Basic Usage

from mostlyai import MostlyAI
mostly = MostlyAI(api_key='your_api_key')
g = mostly.train(data)      # train a generator on your data
mostly.share(g, email)      # share the generator with your team
sd = mostly.generate(g)     # use the generator to create a synthetic dataset
syn = sd.data()             # consume the synthetic data as pandas DataFrame(s)
mostly.probe(g, size=100)   # generate few samples on demand

Supported Methods

Connectors

c = mostly.connect(config)

c = mostly.connectors.create(config)
c = mostly.connectors.get(id)
it = mostly.connectors.list()
c = c.update(config)
ls = c.locations(prefix)
config = c.config()
c.open()
c.reload()
c.delete()

Generators

g = mostly.train(data, config, name, start=True, wait=True)

g = mostly.generators.create(config)
g = mostly.generators.get(id)
it = mostly.generators.list()
g = g.update(config)
config = g.config()
g.open()
g.reload()
g.delete()

# training
g.training.start()
g.training.progress()
g.training.cancel()
g.training.wait()

# import / export
g.export_to_file(file_path)
mostly.generators.import_from_file(file_path)

# clone
cloned_g = g.clone(training_status="NEW")       # clone the generator for new training
cloned_g = g.clone(training_status="CONTINUE")  # clone the generator and reuse its weights for continued training

Synthetic Datasets

sd = mostly.generate(g, seed=seed)
sd = mostly.generate(g, size=size)
sd = mostly.generate(g, config=config)

sd = mostly.synthetic_datasets.create(g, config)
sd = mostly.synthetic_datasets.get(id)
it = mostly.synthetic_datasets.list()
config = sd.config()
sd.open()
sd.reload()
sd.delete()


sd.generation.start()
sd.generation.progress()
sd.generation.cancel()
sd.generation.wait()

sd.data()
sd.download(file, format)

Synthetic Probes

sp = mostly.probe(g, seed=seed)
sp = mostly.probe(g, size=size)
sp = mostly.probe(g, config=config)

Sharing

mostly.share(g | sd | c, email)
mostly.unshare(g | sd | c, email)

g.shares()
sd.shares()
c.shares()

Job Configuration Info

mostly.models(model_type)
mostly.computes()

User Info

mostly.me()
mostly.about()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mostlyai-0.4.8.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

mostlyai-0.4.8-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file mostlyai-0.4.8.tar.gz.

File metadata

  • Download URL: mostlyai-0.4.8.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for mostlyai-0.4.8.tar.gz
Algorithm Hash digest
SHA256 887b76115c37bda50dd6bac7f66fd8a81a5640f9d5bd17a7be592b34999d7a0f
MD5 1e12cba80222114067293ddd41c28445
BLAKE2b-256 041357a8c525f32c5e0ae6467b2fdc0fe776820360f318067787717421f4b427

See more details on using hashes here.

File details

Details for the file mostlyai-0.4.8-py3-none-any.whl.

File metadata

  • Download URL: mostlyai-0.4.8-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for mostlyai-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5896f1deace8c488b66e0b1d62feb6c3ed165cedba0ee70222872df065dcdb0d
MD5 d66fcf985574205ce409cb740be0051e
BLAKE2b-256 c874798779ff8bb88e2485fed5f31f307201e51fca17339ffc1e9cfbda75d4b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page