Package: modelmanager-api
Welcome to Modelmanager-api!This is a api model for interacting with modelmanager.Note:Example files are are in example_script directory.Example assets are in api_assets directory.It contains scripts for different actions(Add, Update, Delete).EXAMPLE SCRIPTS- add_model.py
- add_project.py
- update_model.py
- update_project.py
- delete_model.py
- delete_project.pyEXAMPLE ASSETS- Project Assets
- Model AssetsExample Codes###Add_Project###frommodelmanager_api.modelmanager_apiimportUsecasesecret_key='Secret-Key'url='URL'data={"name":"UsecaseName","author":"AuthorName","description":"UsecaseDescription","source":"UsecasSource","contributor":"UsecaseContributor","image":'image.jpg',#path to image file"banner":'banner.jpg',#path to banner file}Usecase(secret_key,url).post_usecase(data)###Update_Project###frommodelmanager_api.modelmanager_apiimportUsecasesecret_key='Secret-Key'url='URL'project_id=Project_id#use model_id number to updatedata={"author":"AuthorName","description":"UsecaseDescription","source":"UsecasSource","contributor":"UsecaseContributor","image":'image.jpg',#path to image file"banner":'banner.jpg',#path to banner file}Usecase(secret_key,url).patch_usecase(data,project_id)###Delete_Project###frommodelmanager_api.modelmanager_apiimportUsecasesecret_key='Secret-Key'url='URL'project_id=Project_id#use project_id number to deleteUsecase(secret_key,url).delete_usecase(project_id)###Add_Model###frommodelmanager_api.modelmanager_apiimportModelsecret_key='Secret-Key'url='URL'data={"project":Project_ID,#model add to which project"transformerType":"logistic","target_column":"id","note":"api script Model","model_area":"api script Model","model_dependencies":"api script Model","model_usage":"api script Model","model_audjustment":"api script Model","model_developer":"api script Model","model_approver":"api script Model","model_maintenance":"api script Model","documentation_code":"api script Model","implementation_plateform":"api script Model","training_dataset":"train.csv",#path to csv file"pred_dataset":"submissionsample.csv",#path to csv file"actual_dataset":"truth.csv",#path to csv file"test_dataset":"test.csv",#path to csv file}Model(secret_key,url).post_model(data)###Update_Model###frommodelmanager_api.modelmanager_apiimportModelsecret_key='Secret-Key'url='URL'model_id=Model_id#use model_id number to updatedata={"project":Project_ID,"transformerType":"logistic","target_column":"id","note":"api script Model","model_area":"api script Model","model_dependencies":"api script Model","model_usage":"api script Model","model_audjustment":"api script Model","model_developer":"api script Model","model_approver":"api script Model","model_maintenance":"api script Model","documentation_code":"api script Model","implementation_plateform":"api script Model","training_dataset":"train.csv",#path to csv file"pred_dataset":"submissionsample.csv",#path to csv file"actual_dataset":"truth.csv",#path to csv file"test_dataset":"test.csv",#path to csv file}Model(secret_key,url).patch_model(data,model_id)###Delete_Model###frommodelmanager_api.modelmanager_apiimportModelsecret_key='Secret-Key'url='URL'model_id=Model_id#use model_id number to deleteModel(secret_key,url).delete_model(model_id)