Skip to main content

The easiest ML library you'll ever use.

Project description

lazytorch

The easiest ML library you'll ever use. Currently in early beta. Do not use for production yet.

What is LazyTorch?

LazyTorch is a ML library that lets you make neural networks and models with ease. Just like the name suggests, LazyTorch is for lazy people like me.

Code Examples

Brain - General classification and neural networks.

model = Brain(input={"text": ""}, output={"is_positive": True})

ds = Dataset(
    {"text": [
        "i love this",
        "this is great",
        "absolute perfection",
        "i hate this",
        "this is terrible",
        "this is awful"
    ]},
    {"is_positive": [True, True, True, False, False, False]}
)

model.teach(ds)

print(model.infer({"text": "i love this"})) # outputs: {'is_positive': True}
print(model.infer({"text": "this is terrible"})) # outputs: {'is_positive': False}

AutoregressiveBrain - Brain but for autoregressive text generation and word prediction.

model = AutoregressiveBrain(context_size=2)
model.teach("the capital of russia is moscow. the capital of britan is london. the capital of france is paris. the capital of greece is athens.")
print(model.generate("the capital of france is", max_words=1)) # output: paris

Dataset - Datasets.

ds = Dataset({"text": ["hello", "world"]}, {"is_positive": [True, True]})
model = Brain(input={"text": ""}, output={"is_positive": True})
model.teach(ds)

BrainTrust - Sample results from multiple Brain models to get a general consensus.

ensemble = BrainTrust([model_a, model_b])
print(ensemble.infer({"text": "spam message"})) # output: {'is_spam': True}

BrainScanner - Evaluate Brain models on datasets.

accuracy = BrainScanner.evaluate(model, ds)
print(accuracy) # output: 1.0 (100%)

These are all of the functions available in the beta of LazyTorch. These are not final.

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

lazytorch-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazytorch-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file lazytorch-0.1.0.tar.gz.

File metadata

  • Download URL: lazytorch-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lazytorch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7d895770261b016e0c23ab67000f283cdf377361c0676a017c5b0be8b89fcfd
MD5 b6aead761d8931805c46c2d884516db4
BLAKE2b-256 7367826d1d40eef753801390a9aaf751779958f154068549e7ab2c1a72423a00

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazytorch-0.1.0.tar.gz:

Publisher: publish.yml on reecdev/lazytorch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lazytorch-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lazytorch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lazytorch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a78f8c5e05920555b5c1044ac23a21d5113ee7dcd49a9d2ef43c2491fda2f15
MD5 2c866d6f5591b3bc016897ef25eb7986
BLAKE2b-256 9371dd24cd5a1ed68918763c99b7c7dee2c07df8c615168fba37ce32f0ca75aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazytorch-0.1.0-py3-none-any.whl:

Publisher: publish.yml on reecdev/lazytorch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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