Skip to main content

xpl.ai client SDK.

Project description

Request early access from xpl.ai to get login credentials. ##CLI Usage

Authentication

Login.

xpl auth login

Options:
    -u, --username
    -s, --secret

Logout

    xpl auth logout

Tasks

Create task draft

xpl task draft

    Options:
    -n, --name
    -m, --modality: # 'image', 'video', 'audio', 'text'
                    # Currently supported: 'image'
    -c, --csv: # A path to csv file containing training examples that will be used to pretreain the model.

Initialize Active learning pipeline from the task.

  • Model for the task will be assembled,
  • Data pipelines will be initialized
  • Sample examples for pretraining will be uploaded
  • Training from provided examples will start
xpl task commit

List tasks

xpl task list

Describe task's detail information

xpl task describe

    Options:
    -t, --task_id: # an id of the task. Can be obtained from "xpl task list" command

Annotations

List active annotation jobs that are associated with the task. This will return list of urls, corresponding toi annotation jobs. Url directs to the annotation UI.

xpl annotations list

    Options:
    -t, --task_id: # an id of the task. Can be obtained from "xpl task list" command

Concepts

Search XPL Platform for the concepts by the lemma

xpl concept search

    Options:
    -l, --lemma: # A single word human-readable lemma that describes concept in English

##End-user integration The core of end-user integration is a Task object. ###Instantiate Task object

task = Task(task_id='b622d1e8bd0d43d0be184239bf9ce53d',
            task_api_key='a714e3ce19594872be7fb9042d02134b')
            # task_api_key can be obtained from cli: "xpl task describe"

Instantiating Task object will:

  • verify validity of the task's api key,
  • check the active version of the model
  • if needed: fetch the model from storage using secured http channel and cache it on the disk
  • load model and will be ready to accept data for inferences ###Run task on data of corresponding modality
from xplai import Task

image_path = '/data/image.png'
concepts_detected = task.run(source=image_path)

# do something useful
for concept in concepts_detected:
    print(f'detected {concept.display_name} in {image_path}')

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

xplai-0.1.9-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file xplai-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: xplai-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for xplai-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 366905a085d7a5b640b429c41d610adc2bb3d52421e7b0434f3ac4a2e00e2c92
MD5 b1eec1ba9a3cc1e27952d12fd47b21ab
BLAKE2b-256 7fd5006a3d9c5dc45e3e9aedaa153cfaed27553bcf077f5da9142314eafb21e4

See more details on using hashes here.

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