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
Release history Release notifications | RSS feed
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
Close
Hashes for t3qai_client-1.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89506feed54ff8bc7b0a076978dbf409c5054e87df8392549c4544305a728029 |
|
MD5 | e8ae3526ad697d7db0c34774cb007de2 |
|
BLAKE2b-256 | cbe3ad56f31a866d2bbef5894b2a385dd2a7c4525d4c3a375bc447cdc0c737f6 |