Name | t3qai-client JSON |
Version |
1.1.6
JSON |
| download |
home_page | |
Summary | t3qai client module |
upload_time | 2023-08-07 06:44:46 |
maintainer | |
docs_url | None |
author | t3q |
requires_python | >=3 |
license | |
keywords |
t3q
t3qai
t3qai client
t3qai_client
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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)
```
Raw data
{
"_id": null,
"home_page": "",
"name": "t3qai-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "t3q,t3qai,t3qai client,t3qai_client",
"author": "t3q",
"author_email": "lab@t3q.com",
"download_url": "",
"platform": null,
"description": "# t3qai_client Description\r\na library for t3qai platform client.\r\n\r\nThe client module provides properties/functions\r\nthat links platform and client's learning/Inference algorithm.\r\n\r\n- Provide platform path properties\r\n- Provides functions to link learning state, set log, call learning parameter elements, load data, save learning results, and download inference results\r\n\r\n## To install with pip\r\n```\r\npip install t3qai_client\r\n\r\n```\r\n\r\n## How to Use (Example)\r\n### properties\r\n```\r\n## train\r\nfrom t3qai_client import T3QAI_TRAIN_OUTPUT_PATH, T3QAI_TRAIN_MODEL_PATH, T3QAI_TRAIN_DATA_PATH, T3QAI_TEST_DATA_PATH, T3QAI_MODULE_PATH\r\n\r\n## inference\r\nfrom t3qai_client import T3QAI_INIT_MODEL_PATH\r\n```\r\n\r\n### functions\r\n```\r\nimport t3qai_client as tc\r\n\r\n## link learning state\r\ntc.train_start()\r\ntc.train_finish(result, result_msg)\r\n\r\n## set log\r\n# train\r\ntc.train_set_logger()\r\n# inference\r\ntc.inference_set_logger()\r\n\r\n## call learning parameter elements\r\n# train\r\nparams = tc.train_load_param()\r\nbatch_size= int(params['batch_size'])\r\n# inference\r\nparams = tc.inference_load_param()\r\nbatch_size= int(params['batch_size'])\r\n\r\n## load data\r\n# To use this function, the dataset with id and label must pass through the preprocessing module.\r\n(train_id, train_x, train_y), (test_id, test_x, test_y) = tc.load_data()\r\n\r\n## save learning results\r\n# To draw charts inside the platform, use this function to save the learning results.\r\n# save result (Loss, PCA 2D)\r\neval_results={}\r\neval_results['predict_y'] = [0, 1, 0] # predict y\r\neval_results['actual_y'] = [[0], [1], [0]] # actual y\r\neval_results['test_id'] = [0,1,2] # test id(unique id)\r\neval_results['loss']= float(0.3) # loss\r\ntc.train_save_result_metrics(eval_results)\r\n# save classifacation result (Accuary, Loss, Confusion Matrix, Pricision/Recall//F1-score)\r\neval_results={}\r\neval_results['predict_y'] = [0, 1, 0]\r\neval_results['actual_y'] = [[0], [1], [0]]\r\neval_results['test_id'] = [0,1,2]\r\neval_results['loss'] = float(0.3)\r\ntc.train_save_classification_result(metrics)\r\n\r\n## To download inference results at platform (2 options -> file_obj or file_path)\r\nfrom t3qai_client import DownloadFile\r\nresult = DownloadFile(file_obj=resultobj, file_name=filename)\r\nresult = DownloadFile(file_path=save_path, file_name=filename)\r\n```\r\n\r\n",
"bugtrack_url": null,
"license": "",
"summary": "t3qai client module",
"version": "1.1.6",
"project_urls": null,
"split_keywords": [
"t3q",
"t3qai",
"t3qai client",
"t3qai_client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cbe3ad56f31a866d2bbef5894b2a385dd2a7c4525d4c3a375bc447cdc0c737f6",
"md5": "e8ae3526ad697d7db0c34774cb007de2",
"sha256": "89506feed54ff8bc7b0a076978dbf409c5054e87df8392549c4544305a728029"
},
"downloads": -1,
"filename": "t3qai_client-1.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e8ae3526ad697d7db0c34774cb007de2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 15097,
"upload_time": "2023-08-07T06:44:46",
"upload_time_iso_8601": "2023-08-07T06:44:46.925406Z",
"url": "https://files.pythonhosted.org/packages/cb/e3/ad56f31a866d2bbef5894b2a385dd2a7c4525d4c3a375bc447cdc0c737f6/t3qai_client-1.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-07 06:44:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "t3qai-client"
}