colda.database.train_database package
Submodules
colda.database.train_database.algorithm_database module
- class colda.database.train_database.algorithm_database.TrainAlgorithmDatabase
Bases:
BaseDatabase
,AbstractAlgorithmDatabase
Store and manage train_algorithm database. Train algorithm database mainly stores the output and log generated from algorithm part of train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[colda.database.train_database.algorithm_database.TrainAlgorithmDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainAlgorithmDatabase]
colda.database.train_database.api module
- class colda.database.train_database.api.TrainAlgorithmDatabase
Bases:
BaseDatabase
,AbstractAlgorithmDatabase
Store and manage train_algorithm database. Train algorithm database mainly stores the output and log generated from algorithm part of train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[database.train_database.algorithm_database.TrainAlgorithmDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainAlgorithmDatabase]
- class colda.database.train_database.api.TrainAssistorMetadataDatabase
Bases:
BaseDatabase
,AbstractMetadataDatabase
Store and manage data generated from assistor train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[database.train_database.assistor_metadata_database.TrainAssistorMetadataDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainAssistorMetadataDatabase]
- get_record(user_id: str, train_id: str) None
Get record
Parameters
user_id : str train_id : str
Returns
None
- store_record(user_id: str, train_id: str, mode: Literal['auto', 'manual'], task_mode: Literal['classification', 'regression'], model_name: Literal['linear', 'decision_tree', 'svm', 'gradient_boosting', 'mlp'], train_file_path: str, train_id_column: str, train_data_column: str, task_name: str | None = None, task_description: str | None = None) None
Store record
Parameters
user_id : str train_id : str mode : Mode task_mode : Task_Mode model_name : Model_Name train_file_path : str train_id_column : str train_data_column : str task_name : str=None task_description : str=None
Returns
None
- class colda.database.train_database.api.TrainSponsorMetadataDatabase
Bases:
BaseDatabase
,AbstractMetadataDatabase
Store and manage data generated from sponsor train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[database.train_database.sponsor_metadata_database.TrainSponsorMetadataDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainSponsorMetadataDatabase]
- get_record(user_id: str, train_id: str) None
Get record
Parameters
user_id : str train_id : str
Returns
None
- store_record(user_id: str, train_id: str, task_mode: Literal['classification', 'regression'], model_name: Literal['linear', 'decision_tree', 'svm', 'gradient_boosting', 'mlp'], metric_name: Literal['MAD', 'RMSE', 'R2', 'Accuracy', 'F1', 'AUCROC'], train_file_path: str, train_id_column: str, train_data_column: str, train_target_column: str, task_name: str | None = None, task_description: str | None = None) None
Store record
Parameters
user_id : str train_id : str task_mode : Task_Mode model_name : Model_Name metric_name : Metric_Name train_file_path : str train_id_column : str train_data_column : str train_target_column : str task_name : str=None task_description : str=None
Returns
None
colda.database.train_database.assistor_metadata_database module
- class colda.database.train_database.assistor_metadata_database.TrainAssistorMetadataDatabase
Bases:
BaseDatabase
,AbstractMetadataDatabase
Store and manage data generated from assistor train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[colda.database.train_database.assistor_metadata_database.TrainAssistorMetadataDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainAssistorMetadataDatabase]
- get_record(user_id: str, train_id: str) None
Get record
Parameters
user_id : str train_id : str
Returns
None
- store_record(user_id: str, train_id: str, mode: Literal['auto', 'manual'], task_mode: Literal['classification', 'regression'], model_name: Literal['linear', 'decision_tree', 'svm', 'gradient_boosting', 'mlp'], train_file_path: str, train_id_column: str, train_data_column: str, task_name: str | None = None, task_description: str | None = None) None
Store record
Parameters
user_id : str train_id : str mode : Mode task_mode : Task_Mode model_name : Model_Name train_file_path : str train_id_column : str train_data_column : str task_name : str=None task_description : str=None
Returns
None
colda.database.train_database.sponsor_metadata_database module
- class colda.database.train_database.sponsor_metadata_database.TrainSponsorMetadataDatabase
Bases:
BaseDatabase
,AbstractMetadataDatabase
Store and manage data generated from sponsor train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[colda.database.train_database.sponsor_metadata_database.TrainSponsorMetadataDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainSponsorMetadataDatabase]
- get_record(user_id: str, train_id: str) None
Get record
Parameters
user_id : str train_id : str
Returns
None
- store_record(user_id: str, train_id: str, task_mode: Literal['classification', 'regression'], model_name: Literal['linear', 'decision_tree', 'svm', 'gradient_boosting', 'mlp'], metric_name: Literal['MAD', 'RMSE', 'R2', 'Accuracy', 'F1', 'AUCROC'], train_file_path: str, train_id_column: str, train_data_column: str, train_target_column: str, task_name: str | None = None, task_description: str | None = None) None
Store record
Parameters
user_id : str train_id : str task_mode : Task_Mode model_name : Model_Name metric_name : Metric_Name train_file_path : str train_id_column : str train_data_column : str train_target_column : str task_name : str=None task_description : str=None
Returns
None
Module contents
- class colda.database.train_database.TrainAlgorithmDatabase
Bases:
BaseDatabase
,AbstractAlgorithmDatabase
Store and manage train_algorithm database. Train algorithm database mainly stores the output and log generated from algorithm part of train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[colda.database.train_database.algorithm_database.TrainAlgorithmDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainAlgorithmDatabase]
- class colda.database.train_database.TrainAssistorMetadataDatabase
Bases:
BaseDatabase
,AbstractMetadataDatabase
Store and manage data generated from assistor train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[colda.database.train_database.assistor_metadata_database.TrainAssistorMetadataDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainAssistorMetadataDatabase]
- get_record(user_id: str, train_id: str) None
Get record
Parameters
user_id : str train_id : str
Returns
None
- store_record(user_id: str, train_id: str, mode: Literal['auto', 'manual'], task_mode: Literal['classification', 'regression'], model_name: Literal['linear', 'decision_tree', 'svm', 'gradient_boosting', 'mlp'], train_file_path: str, train_id_column: str, train_data_column: str, task_name: str | None = None, task_description: str | None = None) None
Store record
Parameters
user_id : str train_id : str mode : Mode task_mode : Task_Mode model_name : Model_Name train_file_path : str train_id_column : str train_data_column : str task_name : str=None task_description : str=None
Returns
None
- class colda.database.train_database.TrainSponsorMetadataDatabase
Bases:
BaseDatabase
,AbstractMetadataDatabase
Store and manage data generated from sponsor train stage.
Methods
get_instance get_all_records store_record get_record
- classmethod delete()
- get_all_records_history() list[tuple[str, str]]
Return all keys of records in this database
Returns
list[tuple[str, str]]
- classmethod get_instance() type[colda.database.train_database.sponsor_metadata_database.TrainSponsorMetadataDatabase]
Singleton pattern. Get instance of current class.
Returns
type[TrainSponsorMetadataDatabase]
- get_record(user_id: str, train_id: str) None
Get record
Parameters
user_id : str train_id : str
Returns
None
- store_record(user_id: str, train_id: str, task_mode: Literal['classification', 'regression'], model_name: Literal['linear', 'decision_tree', 'svm', 'gradient_boosting', 'mlp'], metric_name: Literal['MAD', 'RMSE', 'R2', 'Accuracy', 'F1', 'AUCROC'], train_file_path: str, train_id_column: str, train_data_column: str, train_target_column: str, task_name: str | None = None, task_description: str | None = None) None
Store record
Parameters
user_id : str train_id : str task_mode : Task_Mode model_name : Model_Name metric_name : Metric_Name train_file_path : str train_id_column : str train_data_column : str train_target_column : str task_name : str=None task_description : str=None
Returns
None