Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a Standardized API to access Models #16

Open
MaxenceGui opened this issue Feb 9, 2024 · 1 comment
Open

Implement a Standardized API to access Models #16

MaxenceGui opened this issue Feb 9, 2024 · 1 comment

Comments

@MaxenceGui
Copy link

Issue description

To ensure a scalable and maintainable system, every model should have a standardized access method. Currently, the system needs to adapt three ways of accessing three models.

Expected Behavior

Models are accessed using the same request format each time, with a consistent header and body. The api_key and endpoint_url parameters are expected to be unique for each model.

Current Behavior

Currently, there are three different ways to call three models. Here's a list of functioning headers and body by models

Nachet-6seed:
headers = {
    "Content-Type": "application/json",
    "Authorization": ("Bearer " + endpoint_api_key),
}

body = {
    "input_data": {
        "columns": ["image"],
        "index": [0],
        "data": [image_bytes],
    }
}

Seed-detector:
headers = {
    "Content-Type": "application/json",
    "Authorization": ("Bearer " + endpoint_api_key),
    'azureml-model-deployment': 'seed-detector-1'
}

body = {
    "input_data": {
        "columns": ["image"],
        "index": [0],
        "data": [image_bytes],
    }
}

Swin:
headers = {
   "Content-Type": "application/json",
   "Authorization": ("Bearer " + api_key),
}

body = b64encode(image)

Additional Context

Issue 51 Implement Model Switching Functionality in Inference Request

@MaxenceGui MaxenceGui added this to Nachet Feb 9, 2024
@rngadam
Copy link
Contributor

rngadam commented Feb 12, 2024

@amirardalan9473 can you provide an explanation and link to documentation on how the app.py/score.py is selected and inserted for the model.

"standard way" should be standardized API

also needs discussion on what functionality and data format we want for that API

@MaxenceGui MaxenceGui changed the title Implement a Standard Way to access Models Implement a Standardized API to access Models Feb 12, 2024
@MaxenceGui MaxenceGui moved this to Todo in Nachet Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants