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

[Model Monitoring] Implement TDEngine read metrics API #5642

Merged

Conversation

Eyal-Danieli
Copy link
Member

@Eyal-Danieli Eyal-Danieli commented May 27, 2024

Following #5620, this PR implements the metrics endpoints on top of the TDEngine.

In general, the implementation is quite similar to the V3IO Connector. For example, read_metrics endpoint includes:

  • Type validate (metrics or results)
  • Prepare SQL query with the provided metrics
  • Query the DB and get a DataFrame result
  • Parse the DataFrame into a list of metrics values per distinct results (using df_to_results_values & df_to_metrics_values that are now stored under the base class).

In addition, to keep consistency with the V3IO TSDB schema, we updated the application result table and added a new tag - result_kind.

Related JIRA: https://iguazio.atlassian.net/browse/ML-6557

@Eyal-Danieli Eyal-Danieli changed the title [Model Monitoring] Support read metrics API [Model Monitoring] Implement TDEngine read metrics API May 27, 2024
@jond01 jond01 self-requested a review May 28, 2024 13:33
@Eyal-Danieli Eyal-Danieli requested a review from gtopper May 28, 2024 14:07
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py Outdated Show resolved Hide resolved
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py Outdated Show resolved Hide resolved
tests/model_monitoring/test_tdengine.py Outdated Show resolved Hide resolved
Copy link
Member

@jond01 jond01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I had some minor comments.

My major question is about documentation: I think that installing TDEngine and setting the env vars has to be documented. If I want to test it myself, it would be hard to understand what I need to configure.

mlrun/model_monitoring/db/tsdb/base.py Outdated Show resolved Hide resolved
mlrun/model_monitoring/db/tsdb/base.py Outdated Show resolved Hide resolved
mlrun/model_monitoring/db/tsdb/base.py Outdated Show resolved Hide resolved
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py Outdated Show resolved Hide resolved
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py Outdated Show resolved Hide resolved
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py Outdated Show resolved Hide resolved
mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py Outdated Show resolved Hide resolved
server/api/api/endpoints/model_endpoints.py Show resolved Hide resolved
tests/model_monitoring/test_tdengine.py Outdated Show resolved Hide resolved
@Eyal-Danieli Eyal-Danieli requested a review from gtopper May 29, 2024 13:25
@Eyal-Danieli Eyal-Danieli reopened this May 30, 2024
@Eyal-Danieli Eyal-Danieli reopened this May 30, 2024
@assaf758 assaf758 merged commit fc2d6db into mlrun:development May 30, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants