Skip to main content

t3qai client module

Project description

t3qai_client Description

a library for t3qai platform client.

The client module provides properties/functions that links platform and client's learning/Inference algorithm.

  • Provide platform path properties
  • Provides functions to link learning state, set log, call learning parameter elements, load data, save learning results, and download inference results

To install with pip

pip install t3qai_client

How to Use (Example)

properties

## train
from t3qai_client import T3QAI_TRAIN_OUTPUT_PATH, T3QAI_TRAIN_MODEL_PATH, T3QAI_TRAIN_DATA_PATH, T3QAI_TEST_DATA_PATH, T3QAI_MODULE_PATH

## inference
from t3qai_client import T3QAI_INIT_MODEL_PATH

functions

import t3qai_client as tc

## link learning state
tc.train_start()
tc.train_finish(result, result_msg)

## set log
# train
tc.train_set_logger()
# inference
tc.inference_set_logger()

## call learning parameter elements
# train
params = tc.train_load_param()
batch_size= int(params['batch_size'])
# inference
params = tc.inference_load_param()
batch_size= int(params['batch_size'])

## load data
# To use this function, the dataset with id and label must pass through the preprocessing module.
(train_id, train_x, train_y), (test_id, test_x, test_y) = tc.load_data()

## save learning results
# To draw charts inside the platform, use this function to save the learning results.
# save result (Loss, PCA 2D)
eval_results={}
eval_results['predict_y'] = [0, 1, 0]     # predict y
eval_results['actual_y'] = [[0], [1], [0]]  # actual y
eval_results['test_id'] = [0,1,2]        # test id(unique id)
eval_results['loss']=  float(0.3)        # loss
tc.train_save_result_metrics(eval_results)
# save classifacation result (Accuary, Loss, Confusion Matrix, Pricision/Recall//F1-score)
eval_results={}
eval_results['predict_y'] = [0, 1, 0]
eval_results['actual_y'] = [[0], [1], [0]]
eval_results['test_id'] = [0,1,2]
eval_results['loss'] =  float(0.3)
tc.train_save_classification_result(metrics)

## To download inference results at platform (2 options -> file_obj or file_path)
from t3qai_client import DownloadFile
result = DownloadFile(file_obj=resultobj, file_name=filename)
result = DownloadFile(file_path=save_path, file_name=filename)

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.

t3qai_client-1.1.4-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file t3qai_client-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: t3qai_client-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for t3qai_client-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 15df9b57e6d3b859f2acedb31314fa773ba84af9670cac486975892d90e09770
MD5 337d5a5f9c041d082362f6bda474491c
BLAKE2b-256 41ee14d8179b85de20fc7ebf06d317b2d269eebd54a8acf6ad6cb8cf6ff284ea

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