intel / cloud-native-ai-pipeline

AI cloud native pipeline for confidential and sustainable computing
https://intel.github.io/cloud-native-ai-pipeline/
Apache License 2.0
37 stars 15 forks source link

model.py: design and create the basic model info class #30

Closed leyao-daily closed 1 year ago

leyao-daily commented 1 year ago

This PR is to fix #29 and it introduces three new classes: ModelInfo, ModelDetails, and ModelMetrics. These classes are designed to encapsulate all relevant information about an Inference model within a inference pipeline.

ModelMetrics holds the performance metrics of a inference learning model, such as accuracy, precision, recall, F1 score, and loss value. Each of these metrics can be accessed using their respective property methods.

ModelDetails encapsulates various details about the model, including the model's name, version, the framework used for training, the target, and the data type of the model.

ModelInfo ties all this information together, containing an instance of ModelDetails, the model's upload date, and an instance of ModelMetrics. Additionally, it includes a unique identifier for each model using Python's built-in uuid library.

leyao-daily commented 1 year ago

Closes #29