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

t3qai_client-1.1.6-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

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