-
Notifications
You must be signed in to change notification settings - Fork 239
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
[Model monitoring] Init - adding API endpoints #625
Conversation
# Conflicts: # mlrun/api/schemas/__init__.py
…dated API, added tests, fixed several bugs,
Added metrics query param list_endpoints. Removed delete_endpoint and create_endpoint. Implemented clear method. Updated tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, with good testing coverage. I do have some concerns (see in comments) about project scoping and various semantic issues with how label queries are formed etc.
Also, the main concern I have is about processing time for performing these APIs, and whether they should perhaps be delegated to a different thread to not cause issues with the REST API handling of MLRun in general. After all, some APIs here perform IO operations as well as data aggregations, and these may be heavy, depending on the amount of data being processed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Michaelliv Looks really good, minor comments, please update the PR description
@theSaarco note that the endpoints are defined with def
(and not async def
) FastAPI automatically run those in an awaited threadpool so we're good (see here for details)
Co-authored-by: Hedingber <hedingber@gmail.com>
Co-authored-by: Hedingber <hedingber@gmail.com>
…into model_endpoints_api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some left overs (see unresolved comments):
ModelEndpointMetaData
->ModelEndpointMetadata
staticmethod
->classmethod
- You forget to actually
return Response(status_code=HTTPStatus.NO_CONTENT.value)
in the clear endpoint - You removed the TODO, but didn't add type hints (e.g.
-> FramesClient
) for the v3io clients getters
Also note the PR has conflicts with upstream, please pull latest development
What is the point of this? a class method is wrong here. |
This PR introduces a restful API that enables querying model endpoint monitoring (v2_mode_serving) related statistics and collected data.
The exposed endpoints are:
POST /projects/{project}/model-endpoints
DELETE /projects/{project}/model-endpoints/{endpoint_id}
GET /projects/{project}/model-endpoints
GET /projects/{project}/model-endpoints/{endpoint_id}
GET /projects/{project}/model-endpoints/{endpoint_id}/metrics
The tests included in this PR, require the V3IO_API, V3IO_ACCESS_KEY and V3IO_FRAMESD environment parameters to be present at execution.