Start a new session and returns the key.
param force_restart: if != 0, forces restart by wiping current session.
type force_restart: int
return server status dictionary.
raises HTTPException: When there is already an active session.
Method | URL |
---|
GET | /start_session |
Name | In | Description | Required |
---|
force_restart | query | | Optional |
Field | Type | Description |
---|
detail | array | |
Update the training config.
param key: session key to check validity.
type key: str
param config: intended configuration for the training process.
type config: TrainingConfigParams
return server status dictionary with a copy of the full config parameters.
raises HTTPException: when trying to configure in a non-setup state.
Method | URL |
---|
POST | /parameters/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description | Required |
---|
model | string | | Optional |
task_type | string | | Optional |
batch_size | integer | | Optional |
epochs | integer | | Optional |
eval_metrics | array | | Optional |
epochs_per_test_run | integer | | Optional |
learning_rate | number | | Optional |
seed | integer | | Optional |
init_eval | boolean | | Optional |
cache_dir | string | | Optional |
overwrite_cache | boolean | | Optional |
Field | Type | Description |
---|
detail | array | |
Return the training config.
return server status dictionary with configuration params and session key.
raises HTTPException: When there is no active session.
Name | In | Description | Required |
---|
Perform preprocessing.
param key: session key to check validity.
type key: str
return server status dictionary.
raises HTTPException: when endpoint called and preprocessing is not possible.
Method | URL |
---|
POST | /preprocess/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description |
---|
detail | array | |
Get the preprocessing status.
return server status dictionary.
Method | URL |
---|
GET | /preprocess_status |
Name | In | Description | Required |
---|
Start training.
param key: session key to check validity.
type key: str
param background_task: FastAPI parameter used to perform background tasks.
type background_task: BackgroundTask
return server status dictionary.
raises HTTPException: when endpoint called and training is not possible.
Method | URL |
---|
POST | /training/start/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description |
---|
detail | array | |
Stop training.
param key: session key to check validity.
type key: str
param force_restart: if != 0, forcess restart by wiping current session.
type force_restart: int
return server status dict.
raises HTTPException: when there is no training session.
Method | URL |
---|
POST | /training/stop/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
force_restart | query | | Optional |
Field | Type | Description |
---|
detail | array | |
Get status.
return server session status.
Name | In | Description | Required |
---|
Get the last training info.
param key: session key to check validity.
type key: str
return server status dict.
Method | URL |
---|
GET | /monitor/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description |
---|
detail | array | |
Upload the dataset.
param key: session key to check validity.
type key: str
param train_file: training dataset file in FastAPI type.
type train_file: UploadFile
param test_file: validation dataset file in FastAPI type.
type test_file: UploadFile
return server status dict.
raises HTTPException:
If an error occured while loading the dataset or while
attempting to upload datasets in non-setup states.
Method | URL |
---|
POST | /upload_dataset/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description | Required |
---|
train_file | string | | Required |
test_file | string | | Required |
Field | Type | Description |
---|
detail | array | |
Check if the model is ready.
param key: session key to check validity.
type key: str
return server status dict.
Method | URL |
---|
GET | /model_ready/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description |
---|
detail | array | |
Download the model.
param key: session key to check validity.
type key: str
return FileResponse, model in FastAPI response type.
raises HTTPException: If mode not trained yet.
Method | URL |
---|
GET | /download_model/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description |
---|
detail | array | |
Download the test results.
param key: session key to check validity.
type key: str
return FileResponse, training results in FastAPI response type.
raises HTTPException: If mode not trained yet.
Method | URL |
---|
GET | /download_results/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
Field | Type | Description |
---|
detail | array | |
Return a healthcheck status for the API.
return server status dict with healthcheck info.
Name | In | Description | Required |
---|
Start the model import process.
Method | URL |
---|
POST | /import_model/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
model_type | query | | Required |
model_name | query | | Required |
Field | Type | Description |
---|
detail | array | |
Get the import status.
Method | URL |
---|
GET | /import_status |
Name | In | Description | Required |
---|
Get the imported model.
param key: session key to check validity.
type key: str
return server status dict.
raises HTTPException: If mode not trained yet.
Method | URL |
---|
GET | /get_imported_model/{key} |
Name | In | Description | Required |
---|
key | path | | Required |
on_disk | query | | Optional |
tokenizer | query | | Optional |
Field | Type | Description |
---|
detail | array | |