Model Repository
TIR Model Repositories are storage buckets to store model weights and config files. A model may be backed by E2E Object Storage or a PVC storage in kubernetes.
List of Model Type
To get the list of Model Type, send a GET request to the Model Repository Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/model_types?apikey={{tapi_key}}://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/?apikey={{tapi_key}}&page_no=1&per_page=5
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/model_types?apikey={{tapi_key}}"
payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/model_types?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
List of EOS Bucket
To get the list of EOS Buckets, send a GET request to the Model Repository Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/eos-bucket-selection-list/?apikey={{tapi_key}}
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/eos-bucket-selection-list/?apikey={{tapi_key}}"
payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/datasets/eos-bucket-selection-list/?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
List of Model Repository
To get the list of Model Repository, send a GET request to the Model Repository Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}&page_no=1&per_page=5
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}&page_no=1&per_page=5"
payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}&page_no=1&per_page=5' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
Create Model Repository (New Bucket)
To create a new model repository with New Bucket, send a POST request to the Model Repository Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}
import requests
import json
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}"
payload = json.dumps({
"name": "adahfihhhhhh",
"storage_type": "managed",
"bucket_name": "",
"model_type": "pytorch",
"access_key": "",
"secret_key": ""
})
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
--data '{
"name":"adahfihhhhhh",
"storage_type":"managed",
"bucket_name":"",
"model_type":"pytorch",
"access_key":"",
"secret_key":""
}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
{
"name":"adahfihhhhhh",
"storage_type":"managed",
"bucket_name":"",
"model_type":"pytorch",
"access_key":"",
"secret_key":""
}
Create Model Repository (Existing Bucket)
To create a new Model Repository using Existing Bucket , send a POST request to the Model Repository Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}
import requests
import json
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}"
payload = json.dumps({
"name": "tir-model-012915222323ii",
"storage_type": "e2e_s3",
"bucket_name": "{{bucket_name}}",
"model_type": "pytorch",
"access_key": "",
"secret_key": ""
})
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
--data '
{
"name": "tir-model-012915222323ii",
"storage_type": "e2e_s3",
"bucket_name": "{{bucket_name}}",
"model_type": "pytorch",
"access_key": "",
"secret_key": ""
}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
{
"name": "tir-model-012915222323ii",
"storage_type": "e2e_s3",
"bucket_name": "{{bucket_name}}",
"model_type": "pytorch",
"access_key": "",
"secret_key": ""
}
Create Model Repository (External Bucket)
To create a new Model Repository using External Bucket, send a POST request to the Model Repository Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}
import requests
import json
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}"
payload = "{\n \"name\": \"tir-model-06fd03165dd0011\",\n \"storage_type\": \"external\",\n \"bucket_name\": \"tir-model-060316214343-32a908\", //enter the external bucket name here\n \"model_type\": \"pytorch\",\n \"access_key\": \"HVLO9FB4EF564W0ESBKN\", //enter the access key for the same bucket\n \"secret_key\": \"IWQRGWRQCS30RJGRA2FP4GVWFH8M4U006WIPBZOF\" //enter the secret key for the same\n}"
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location -g 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/?apikey={{tapi_key}}' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
--data '{
"name": "tir-model-06fd03165dd0011",
"storage_type": "external",
"bucket_name": "tir-model-060316214343-32a908", //enter the external bucket name here
"model_type": "pytorch",
"access_key": "HVLO9FB4EF564W0ESBKN", //enter the access key for the same bucket
"secret_key": "IWQRGWRQCS30RJGRA2FP4GVWFH8M4U006WIPBZOF" //enter the secret key for the same
}'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218
{
"name":"tir-model-06fd03165dd0011",
"storage_type":"external",
"bucket_name":"tir-model-060316214343-32a908", //enter the external bucket name here
"model_type":"pytorch",
"access_key":"HVLO9FB4EF564W0ESBKN", //enter the access key for the same bucket
"secret_key":"IWQRGWRQCS30RJGRA2FP4GVWFH8M4U006WIPBZOF" //enter the secret key for the same
}
Delete Model Repository
To delete a Model Repository, send a DELETE request to the Model Repository Endpoint
https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/{{modelrepo_id}}/?apikey={{tapi_key}}&prefix=models/
import requests
url = "https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/{{modelrepo_id}}/?apikey={{tapi_key}}&prefix=models/"
payload={}
headers = {
'Authorization': 'Bearer {{Token}}',
'Content-Type': 'application/json',
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
curl --location -g --request DELETE 'https://api.e2enetworks.com/myaccount/api/v1/gpu/teams/{{team_id}}/projects/{{project_id}}/serving/model/{{modelrepo_id}}/?apikey={{tapi_key}}&prefix=models%2F' \
--header 'Authorization: Bearer {{Token}}' \
--header 'Content-Type: application/json'
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...
content-type: application/json; charset=utf-8
status: 202 Accepted
ratelimit-limit: 1200
ratelimit-remaining: 965
ratelimit-reset: 1415984218