Skip to main content

Luk.ai Python Management Library

PyPI

This is a library for uploading machine learning models to Luk.ai.

Upload Models

You'll need to create an API token first.

import lukai

# ... your model definition code

sess = tf.Session()
sess.run(tf.initialize_all_variables())

# Sets the Luk.ai API token.
lukai.set_api_token('<your token>')

# Uploads the model to Luk.ai and creates a training job.
lukai.upload(
    session=sess,
    domain='<your domain>',
    model_type='<your model type>',
    name='Hello World',
    description='This is the first model I've uploaded!',
    hyper_params=lukai.HyperParams(
        num_clients = 10,
        batch_size = 10,
        num_rounds = 100,
        learning_rate = learning_rate,
        num_local_rounds = 10,
    ),
    metrics={
      accuracy: lukai.REDUCE_MEAN,
    },
    event_targets={
      lukai.EVENT_TRAIN: (keep_prob.assign(0.5),),
      lukai.EVENT_INFER: (keep_prob.assign(1.0),),
      lukai.EVENT_EVAL: (keep_prob.assign(1.0),),
    },
)

See the full mnist example.

Export Models

You can also directly output the model.tar.gz file if you'd like.

from lukai import saver

# ... your model definition code

sess = tf.Session()
sess.run(tf.initialize_all_variables())

print('Node names: x = {}, y_ = {}, train_step = {}, w = {}, b = {}, y = {}'.format(
  x.name, y_.name, train_step.name, w.name, b.name, y.name,
))

saver.save(sess)

See the full leastsquares example

Metadata

Release files for lukai 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lukai 0.6
File Size Uploaded Provenance Actions
lukai-0.6.tar.gz 23.0 kB Without provenance Details for lukai-0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lukai 0.6
File Interpreter ABI Platform Actions
lukai-0.6-py3-none-any.whl Python 3 none any Details for lukai-0.6-py3-none-any.whl

Total release size: 70.4 kB

Release files / lukai-0.6.tar.gz

Download URL lukai-0.6.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
31d7653e5f8d1c3b21bb96f18cd5c8b55962ba3e45c44a097f4d6e8a4b65168a
BLAKE2b-256 checksum
How to use checksums
adda1a008b8da41ec7c3f8160952507e0cae752c265b302ee0fb69121842af9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / lukai-0.6-py3-none-any.whl

Download URL lukai-0.6-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0eac46bc078cdff95c7da5c862413d8c31f1ddbdc785bd3793416b79131a86d
BLAKE2b-256 checksum
How to use checksums
c2fed876b51e2c88b8c7bfe4da149b170cf62c95b4ade49eeddf21c470683fe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for lukai 0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page