Skip to main content

Modelmanager api

Project description

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.py
  • EXAMPLE ASSETS - Project Assets - Model Assets

Example Codes

###Add_Project###
from modelmanager_api.modelmanager_api import Usecase
secret_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###
from modelmanager_api.modelmanager_api import Usecase
secret_key = 'Secret-Key'
url = 'URL'
project_id = Project_id #use model_id number to update
data = {
		"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###
from modelmanager_api.modelmanager_api import Usecase
secret_key = 'Secret-Key'
url = 'URL'
project_id = Project_id #use project_id number to delete
Usecase(secret_key,url).delete_usecase(project_id)
###Add_Model### 
from modelmanager_api.modelmanager_api import Model
secret_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### 
from modelmanager_api.modelmanager_api import Model
secret_key = 'Secret-Key'
url = 'URL'
model_id = Model_id #use model_id number to update
data = {
		"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###
from modelmanager_api.modelmanager_api import Model
secret_key = 'Secret-Key'
url = 'URL'
model_id = Model_id #use model_id number to delete
Model(secret_key,url).delete_model(model_id)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for modelmanager-api, version 2.0.5
Filename, size File type Python version Upload date Hashes
Filename, size modelmanager_api-2.0.5-py3-none-any.whl (577.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page