Skip to main content

Luk.ai management library

Project description

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

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

lukai-0.6.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

lukai-0.6-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file lukai-0.6.tar.gz.

File metadata

  • Download URL: lukai-0.6.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lukai-0.6.tar.gz
Algorithm Hash digest
SHA256 31d7653e5f8d1c3b21bb96f18cd5c8b55962ba3e45c44a097f4d6e8a4b65168a
MD5 6ee468121b95bd7bd0b7df6d29717920
BLAKE2b-256 adda1a008b8da41ec7c3f8160952507e0cae752c265b302ee0fb69121842af9e

See more details on using hashes here.

File details

Details for the file lukai-0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for lukai-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b0eac46bc078cdff95c7da5c862413d8c31f1ddbdc785bd3793416b79131a86d
MD5 5a4f53198673ca9ceb5db4057753df10
BLAKE2b-256 c2fed876b51e2c88b8c7bfe4da149b170cf62c95b4ade49eeddf21c470683fe9

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