Methods, apparatuses, devices, media, and program products for evaluating model performance

By acquiring model performance evaluation plugins and image files, and using model inference and indicator evaluation plugins to process test sample sets, the problem of existing technologies being unable to fully cover industry scenarios and personalized evaluations is solved, thus achieving multi-dimensional model performance evaluation.

CN117648140BActive Publication Date: 2026-11-24BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311685060.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2026-11-24
Estimated Expiration
2043-12-08

AI Technical Summary

Technical Problem

Existing technologies cannot fully cover model performance evaluation across all industry scenarios, nor can they personalize the selection and switching of appropriate operating processes for evaluation.

Method used

By acquiring the model performance evaluation plugin and image file corresponding to the target class model, and using the model inference plugin and indicator evaluation plugin, the test sample set is processed according to the plugin operation mode information to determine the performance evaluation indicators, supporting personalized performance evaluation.

Benefits of technology

It enables personalized performance evaluation in different model scenarios, meets specific testing needs, and provides multi-dimensional performance evaluation metrics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117648140B_ABST
    Figure CN117648140B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, medium, and program product for evaluating model performance, relating to artificial intelligence technologies such as AI development and cloud platforms. One embodiment of the method includes: in response to receiving a test request for a target class model, obtaining a model performance evaluation plugin and an image file corresponding to the target class model; wherein the image file includes a test sample set and plugin operation mode information; starting the image file, and evaluating the test sample set according to the plugin operation mode information through the model performance evaluation plugin to determine the performance evaluation index corresponding to the target class model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computers, specifically to the fields of artificial intelligence technologies such as AI development and cloud platforms, and particularly to a method, apparatus, device, medium, and program product for evaluating model performance. Background Technology

[0002] In practical applications, appropriate metrics are usually selected for model performance evaluation based on the specific test scenario of the model.

[0003] Currently, performance evaluation methods in related technologies cannot fully cover all industry scenarios; moreover, performance evaluation of models in specific scenarios also suffers from the inability to personalize the selection and switching of appropriate operating processes to complete the model performance evaluation. Summary of the Invention

[0004] This disclosure provides a method, apparatus, device, medium, and program product for evaluating model performance.

[0005] In a first aspect, embodiments of this disclosure propose a method for evaluating model performance, comprising: in response to receiving a test request for a target class model, obtaining a model performance evaluation plugin and an image file corresponding to the target class model; wherein the image file includes a test sample set and plugin operation mode information; starting the image file, and evaluating the test sample set according to the plugin operation mode information through the model performance evaluation plugin to determine the performance evaluation index corresponding to the target class model.

[0006] In some examples, the model performance evaluation plugin includes a model inference plugin and a metric evaluation plugin; The model performance evaluation plugin evaluates the test sample set based on the plugin's runtime information to determine the performance evaluation metrics corresponding to the target class model, including: The model inference plugin processes the test samples in the test sample set according to its corresponding plugin operation mode information to obtain the inference result corresponding to the test sample; the indicator evaluation plugin processes the inference result corresponding to the test sample and the label corresponding to the test sample according to its corresponding plugin operation mode information to determine the performance evaluation indicator corresponding to the target class model.

[0007] In some examples, plugin runtime information includes: plugin runtime environment information, plugin runtime logic information, and plugin runtime parameter information.

[0008] In some examples, plugin runtime parameter information includes plugin input parameters and plugin output format; The model inference plugin processes the test samples in the test sample set according to its corresponding plugin operation information to obtain the inference result corresponding to the test sample, including: The model inference plugin executes the following process on the test samples in the test sample set according to its corresponding plugin operation logic information: parse the test samples in the test sample set to obtain the parsed test samples; traverse the parsed test samples and convert them into plugin input parameters; process the plugin input parameters to obtain inference results that match the plugin output format.

[0009] In some examples, the plugin's runtime parameter information includes the metric evaluation algorithm; The performance evaluation plugin processes the inference results and labels corresponding to the test sample based on its corresponding plugin operation information to determine the performance evaluation metrics corresponding to the target class model. This includes: the performance evaluation plugin executes the following process on the inference results according to its corresponding plugin operation logic information: parsing the inference results and labels corresponding to the test sample to obtain parsed labels and parsed inference results; and processing the parsed labels and parsed inference results according to the performance evaluation algorithm to determine the performance evaluation metrics corresponding to the target class model.

[0010] In some examples, the plugin runtime parameters include the display method; the method also includes: displaying the performance evaluation metrics of the target class model through the display method.

[0011] In some examples, if the target class model includes multiple class models, the performance evaluation metrics of the target class model are displayed in a way that corresponds to the display method, including: displaying the performance evaluation metrics of multiple class models through a comparison chart corresponding to the display method.

[0012] In some examples, the method also includes encapsulating the target class model's model service source code files, test sample sets, and plugin runtime information into an image file.

[0013] Secondly, embodiments of this disclosure propose an apparatus for evaluating model performance, comprising: an acquisition module, configured to, in response to receiving a test request for a target class model, acquire a model performance evaluation plugin and an image file corresponding to the target class model; wherein the image file includes a test sample set and plugin operation mode information; and a performance evaluation module, configured to start the image file and, through the model performance evaluation plugin, evaluate the test sample set according to the plugin operation mode information to determine the performance evaluation index corresponding to the target class model.

[0014] In some examples, the model performance evaluation plugin includes a model inference plugin and a metric evaluation plugin; The performance evaluation module includes: a model inference unit, which processes test samples in the test sample set through the model inference plugin according to its corresponding plugin operation mode information to obtain the inference result corresponding to the test sample; and a performance evaluation unit, which processes the inference result corresponding to the test sample and the label corresponding to the test sample through the indicator evaluation plugin according to its corresponding plugin operation mode information to determine the performance evaluation indicator corresponding to the target class model.

[0015] In some examples, plugin runtime information includes: plugin runtime environment information, plugin runtime logic information, and plugin runtime parameter information.

[0016] In some examples, plugin runtime parameter information includes plugin input parameters and plugin output format; The model inference unit is specifically used to: execute the following process on the test samples in the test sample set according to the corresponding plugin running logic information through the model inference plugin: parse the test samples in the test sample set to obtain the parsed test samples; traverse the parsed test samples and convert the parsed test samples into plugin input parameters; process the plugin input parameters to obtain inference results that match the plugin output format.

[0017] In some examples, the plugin's runtime parameter information includes the metric evaluation algorithm; The performance evaluation unit is specifically used to: execute the following process on the inference results through the indicator evaluation plugin according to its corresponding plugin operation logic information: parse the inference results and labels corresponding to the test sample respectively to obtain the parsed labels and parsed inference results; process the parsed labels and parsed inference results according to the indicator evaluation algorithm to determine the performance evaluation indicators corresponding to the target class model.

[0018] In some examples, the plugin runtime parameter information includes the display method; the device also includes a display module for displaying the performance evaluation metrics of the target class model in a display method.

[0019] In some examples, if the target class model includes multiple class models, the display module is specifically used to: display the performance evaluation metrics of multiple class models through a comparison chart corresponding to the display method.

[0020] In some examples, the device also includes a packaging module for packaging the target class model's model service code source files, test sample sets, and plugin runtime information into an image file.

[0021] Thirdly, embodiments of this disclosure provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.

[0022] Fourthly, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods described in the first aspect.

[0023] Fifthly, embodiments of this disclosure provide a computer program product including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0024] This disclosure provides a method, apparatus, device, medium, and program product for evaluating model performance. By requesting a test for a target model, performance evaluation of different model types can be achieved. Upon receiving a test request, a model performance evaluation plugin and image file corresponding to the target model are selected. After starting the image file, the model performance evaluation plugin evaluates the test sample set in the image file according to the plugin operation mode information in the image file to obtain the performance evaluation index of the target model. The personalized performance evaluation can be achieved by using customized plugin operation mode information to instruct the model performance evaluation plugin to evaluate the test sample set.

[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0026] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. Wherein: Figure 1 This is an exemplary system architecture diagram to which this disclosure can be applied; Figure 2 This is a flowchart of an embodiment of a method for evaluating model performance according to the present disclosure; Figure 3 This is a diagram illustrating the plugin development process; Figure 4 This is a flowchart of an embodiment of a method for evaluating model performance according to the present disclosure; Figure 5 , 6This is an application scenario diagram of the method for evaluating model performance based on this disclosure; Figure 7 This is a schematic diagram of one embodiment of an apparatus for evaluating model performance according to the present disclosure; Figure 8 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. Detailed Implementation

[0027] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0028] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0029] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the methods and apparatus for evaluating model performance of this disclosure can be applied.

[0030] like Figure 1 As shown, system architecture 100 may include a user terminal 101, a network 102, and a test platform 103. Network 102 serves as the medium for providing a communication link between user terminal 101 and test platform 103. Network 102 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0031] User terminal 101 interacts with test platform 103 via network 102 to receive or send test requests, etc.

[0032] The testing platform 103 can be a platform that provides various model performance evaluations. For example, it can match the test requests from the user terminal 101 to match the model performance evaluation plugin and image file corresponding to the target class model, and obtain the performance evaluation index of the target class model according to the image file through the model performance evaluation plugin.

[0033] The test platform 103 can be either hardware or software. When the test platform 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the test platform 103 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.

[0034] It should be noted that the method for evaluating model performance provided in this embodiment is generally executed by the test platform 103, and correspondingly, the device for evaluating model performance is generally disposed in the test platform 103.

[0035] It should be understood that Figure 1 The number of client terminals, networks, and testing platforms shown is merely illustrative. Depending on implementation needs, any number of client terminals, networks, and testing platforms can be included.

[0036] Continue to refer to Figure 2 The diagram illustrates a flow 200 of an embodiment of a method for evaluating model performance according to the present disclosure. The method for evaluating model performance may include the following steps: Step 201: In response to receiving a test request for the target class model, obtain the model performance evaluation plugin and image file corresponding to the target class model. The image file includes the test sample set and plugin operation information.

[0037] In this embodiment, the execution entity of the method for evaluating model performance (e.g. Figure 1 The test platform 103 shown can receive data from a user terminal (e.g., ...). Figure 1 When a test request for a target class model is sent by the client (as shown), the system retrieves the model performance evaluation plugin and image file corresponding to that target class model. The target class model can be a predetermined model type, which can be indicated by its name.

[0038] Here, the image file may include: a test sample set for testing, and plugin execution information. This plugin execution information can be used to define the plugin execution process, the environment required for plugin execution, the parameters involved in plugin execution, algorithms, etc.

[0039] In one example, when a test request for a target class model is received, the model performance evaluation plugin and image file corresponding to the target class model can be retrieved from the corresponding storage path.

[0040] It should be noted that the corresponding storage path can be the storage path specified in the plugin developer's customization specification or the storage path customized by the test user in the image file.

[0041] In this embodiment, different model performance evaluation plugins are selected or switched through test requests, and the plugin operation mode information guides the model performance evaluation plugins to evaluate the test sample set in order to complete the performance evaluation of different types of models.

[0042] In one example, Figure 3In the testing platform, testers can build model performance evaluation plugins and import test sample sets. They can then initiate test requests and obtain the corresponding model performance evaluation plugins based on those requests. After the test is completed, testers can view the performance evaluation metrics to gain a deeper understanding of the target model's performance.

[0043] When acquiring model performance evaluation plugins, the matching plugin is selected based on the type of the target model, thus making it applicable to various types of model performance evaluation scenarios and achieving personalized model performance evaluation.

[0044] Plugin developers can develop and debug model performance evaluation plugins using their development platform, ensuring the plugins function correctly in offline environments. Once the plugin is successfully debugged, the developer can upload the plugin's code package, dependencies, configuration, and other information to the testing platform for inclusion in the management system. Subsequently, after the plugin passes verification on the testing platform, it can be released and deployed, making it available for evaluation and use by test users.

[0045] When a plugin version needs to be updated, the development and debugging of the updated version can be completed first, and the updated version can be uploaded to the testing platform. After the testing platform verifies the plugin, it can be launched online for test users to evaluate and use the updated version of the plugin.

[0046] Here, plugin developers can use this to provide a runtime environment (e.g., an image) for plugin operation, and to define specifications for plugin operation. These specifications can include specifications for test sample sets, inference results, input parameters (e.g., plugin input parameters) and output parameters (e.g., plugin output format), and evaluation algorithm specifications for custom performance evaluation metrics. These specifications can also include specifications for storage paths, formats, etc.

[0047] It should be noted that test users can provide test requirements to plugin developers based on their specific testing needs. Plugin developers can then develop new plugins and share them with the testing platform to evaluate different types of models, while ensuring the scalability of the testing platform.

[0048] In this embodiment, the plugin's runtime environment and the storage path of the plugin's input and output parameter formats can be standardized by the plugin developer or customized by the test user in the image file.

[0049] Step 202: Start the image file and evaluate the test sample set according to the plugin's running mode information through the model performance evaluation plugin to determine the performance evaluation index corresponding to the target class model.

[0050] In this embodiment, the execution entity first starts the image file; then, it processes the test samples in the test sample set according to the plugin's running mode information through the model performance evaluation plugin to obtain the inference result corresponding to the test sample; then, based on the inference result corresponding to the test sample and the label corresponding to the test sample, it determines the performance evaluation index corresponding to the target class model.

[0051] Here, the performance evaluation metric corresponding to the target class model can be a performance evaluation metric specific to that class of models. This performance evaluation metric can characterize the performance of the target class model.

[0052] Here, starting the image file may include: starting the plugin's runtime information as a container; then, attaching the test sample set to the container to enable sharing or access to the test sample set.

[0053] In one example, the method for evaluating the test sample set can be determined based on the calculation method of the performance evaluation index corresponding to the target class model. For example, the root mean square error is obtained based on the square root of the root mean square error.

[0054] In one example, the performance evaluation metrics for the target class model may include:

[0055] For example, performance evaluation metrics for classification models may include: Accuracy: the proportion of correctly classified samples out of the total number of samples; Precision: the proportion of true positives out of false positives; Recall: the proportion of true positives out of false negatives; F1 Score: the harmonic mean of precision and recall, used to balance the two; ROC (Receiver Operating Characteristic) curve and AUC (Area Under Curve): the receiver operating characteristic curve and the area under the curve, used for binary classification problems.

[0056] Performance evaluation metrics for regression models may include: Mean Squared Error (MSE): the average of the squared differences between the actual and predicted values; Root Mean Squared Error (RMSE): the square root of the MSE; Mean Absolute Error (MAE): the average of the absolute differences between the actual and predicted values; and R-squared (R²): used to measure the extent to which the model explains the total variance.

[0057] Performance evaluation metrics for object detection models may include: Average Precision (AP): the average precision at different IoU (Intersection over Union) thresholds in an object detection task; mAP (mean Average Precision): the average AP across multiple classes; IoU (Intersection over Union): the ratio of the intersection to the union of the target bounding box and the ground truth bounding box; and FROC (Free-Response ROC) curve: the curve between the false positive rate and the recall rate in an object detection task.

[0058] Performance evaluation metrics for image generation models may include: SSIM (Structural Similarity Index): used to compare the structural similarity between the generated image and the original image; PSNR (Peak Signal-to-Noise Ratio): measures the signal-to-noise ratio between the generated image and the original image; LPIPS (Learned Perceptual Image Patch Similarity): measures the perceptual similarity of images, which is more in line with human visual perception.

[0059] Performance evaluation metrics for natural language processing models can include: BLEU (Bilingual Evaluation Understudy): an automatic evaluation metric for machine translation tasks; ROUGE (Recall-Oriented Understudy for Gisting Evaluation): an evaluation metric for text summarization tasks; METEOR (Metric for Evaluation of Translation with Explicit Ordering): an automatic evaluation metric for machine translation; and Perplexity: a metric for evaluating the performance of language models.

[0060] In this embodiment, the above-mentioned performance evaluation index can evaluate the model performance in different dimensions and give evaluation values ​​(i.e., performance evaluation index). The larger a certain index is, the better the model's classification performance is in a certain aspect.

[0061] In this embodiment, the performance evaluation of the target class model can be completed using the performance evaluation metrics corresponding to the target class model.

[0062] The method for evaluating model performance provided in this disclosure can achieve performance evaluation of different types of models by requesting a test for a target model. After receiving the test request, a model performance evaluation plugin and an image file corresponding to the target model are selected. After starting the image file, the model performance evaluation plugin evaluates the test sample set in the image file according to the plugin operation mode information in the image file to obtain the performance evaluation index of the target model. The personalized performance evaluation can be achieved by using customized plugin operation mode information to instruct the model performance evaluation plugin to evaluate the test sample set.

[0063] Further reference Figure 4 The diagram illustrates a flow 400 of an embodiment of a method for evaluating model performance according to the present disclosure. The method for evaluating model performance may include the following steps: Step 401: In response to receiving a test request for the target class model, obtain the model performance evaluation plugin and image file corresponding to the target class model. The image file includes the test sample set and plugin operation information.

[0064] In this embodiment, the execution entity of the method for evaluating model performance (e.g. Figure 1 The test platform 103 shown can obtain the model performance evaluation plugin and image file corresponding to the target class model when it receives a test request for the target class model.

[0065] Here, the model performance evaluation plugin can include a model inference plugin and a metric evaluation plugin. The model inference plugin can be used to process the test sample set and obtain the inference results. The metric evaluation plugin can be used to process the inference results and labels to obtain the performance evaluation metrics corresponding to the target class model.

[0066] In this embodiment, during the model testing process, plugins can be added accordingly to fulfill the test requests of the test users.

[0067] Step 402: The test samples in the test sample set are processed by the model inference plugin according to the corresponding plugin operation mode information to obtain the inference result corresponding to the test sample.

[0068] In this embodiment, the aforementioned execution entity can process the test sample set through the model inference plugin according to the plugin operation mode information corresponding to the model inference plugin to obtain the inference result. This inference result can be a predicted value.

[0069] Here, the aforementioned executing entity can configure the plugin's runtime information through the plugin developer and / or by the test user. This runtime information can be used to define the runtime logic, parameters, and environment involved in obtaining inference results from the test sample set.

[0070] In this embodiment, by setting the plugin operation mode information of the model inference plugin for the test user, the specific test requests of the test user can be met.

[0071] Step 403: The performance evaluation plugin processes the inference results and labels corresponding to the test sample based on the plugin operation information to determine the performance evaluation metrics corresponding to the target class model.

[0072] In this embodiment, the aforementioned execution entity processes the inference results and labels according to the plugin operation mode information corresponding to the indicator evaluation plugin through the indicator evaluation plugin, and determines the performance evaluation indicator corresponding to the target class model. The plugin operation mode information of the indicator evaluation plugin can be used to define the operation logic, operation parameters, operation environment, etc. involved in the process of obtaining the performance evaluation indicator from the inference results.

[0073] Here, the aforementioned implementing entities can evaluate the plugin's operation information by setting metrics through the plugin developer and / or by test users.

[0074] In this embodiment, by setting the plugin operation mode information of the indicator evaluation plugin by the test user, the specific test request of the test user can be met.

[0075] In this embodiment, the specific operations of step 40 have been described in detail below. Figure 2 Step 201 in the illustrated embodiment is described in detail and will not be repeated here.

[0076] from Figure 4 It can be seen from this that, with Figure 2 Compared to the corresponding embodiments, the method for evaluating model performance in this embodiment emphasizes processing the test sample set through a model inference plugin to obtain inference results; then, evaluating the inference results and labels through an indicator evaluation plugin to obtain performance evaluation indicators, thereby enabling pluggable plugins to fulfill the specific testing needs of test users.

[0077] In some optional implementations of this embodiment, the plugin runtime information includes: plugin runtime environment information, plugin runtime logic information, and plugin runtime parameter information.

[0078] In this implementation, the running mode of the model performance evaluation plugin can be configured by at least one of the plugin runtime environment information, plugin runtime logic information, and plugin runtime parameter information. This running mode can be used to define the running process of the model performance evaluation plugin to evaluate the test sample set.

[0079] Here, the plugin runtime environment information can be used to evaluate the model performance plugin on the test platform (e.g., Figure 1 The test platform 103 shown contains environment information for operation. The plugin's runtime logic information defines the execution logic of the model performance evaluation plugin in processing the test sample set. The plugin's runtime parameter information defines parameter-related information during the model performance evaluation plugin's operation, such as parameter format, parameter type, corresponding algorithm, and parameter display method.

[0080] In this implementation, the execution flow of the model performance evaluation plugin evaluation test sample set is defined by plugin runtime environment information, plugin runtime logic information, and plugin runtime parameter information.

[0081] In some optional implementations of this embodiment, the plugin runtime parameter information includes plugin input parameters and plugin output format; The model inference plugin processes the test samples in the test sample set according to its corresponding plugin operation information to obtain the inference result corresponding to the test sample, including: The following execution flow is performed on the test samples in the test sample set by following the corresponding plugin execution logic information through the model inference plugin: The test samples in the test sample set are parsed to obtain the parsed test samples; Iterate through the parsed test samples and convert them into plugin input parameters; Process the plugin input parameters to obtain inference results that match the plugin output format.

[0082] In this implementation, the aforementioned execution entity parses the test samples in the test sample set according to its corresponding plugin execution logic information through the model inference plugin to obtain the parsed test samples; it traverses the parsed test samples and converts them into plugin input parameters; it processes the plugin input parameters to obtain the inference result and converts the inference result into an inference result that matches the plugin output format.

[0083] In one example, the operational logic of the model inference plugin may include: 1. Obtain the test sample set from the test sample set path and parse the test sample set; 2. Traverse the parsed test samples and execute: 3.1 Convert the parsed test samples into plugin input parameters; 3.2 Initiate an inference request and obtain the inference result; 3.3 Convert the format of the inference result into the plugin output format; 3.4 Write the inference result in the plugin output format into the result file; 4. If there is other information that needs to be output, it can be written into the result file for subsequent reading by other plugins.

[0084] Among them, input_func is the model inference input parameter script, which is used to convert test samples into plugin input parameters; output_func is the model output conversion script, which is used to convert the format of the inference results into the plugin output format.

[0085] It should be noted that the inference results are written to the results file; other data that can be used by subsequent evaluation indicator plugins, such as labels, can also be written to the results file or other files in file format.

[0086] Before parsing the test samples, it is necessary to obtain the model service code source files according to the path of the model service code source files, deploy them to the model service address, and obtain the model performance evaluation plugin; then, the test sample set is processed through the model inference plugin to obtain the inference results.

[0087] The model service address is the device address (e.g., the network address of the user terminal) of the model service to be deployed.

[0088] Here, the aforementioned paths and addresses can all be set in the plugin's runtime parameters. For example, the path used to store the test sample set and the plugin's input and output results can be a storage path customized by the plugin developer or set by the test user in the plugin's runtime parameters.

[0089] Correspondingly, in this example, if it is also necessary to collect the "average inference latency" metric during the evaluation of the target class model, it can be used to warm up the model and obtain the metric evaluation results corresponding to the "average inference latency".

[0090] In this implementation, test users can fulfill their specific test requests by setting the plugin's running mode information.

[0091] In some optional implementations of this embodiment, the plugin runtime parameter information includes an indicator evaluation algorithm; The performance evaluation plugin processes the inference results and labels corresponding to the test sample based on its corresponding plugin operation information to determine the performance evaluation metrics corresponding to the target class model, including: The following execution flow is performed on the inference results by the indicator evaluation plugin according to its corresponding plugin execution logic information: The inference results and labels corresponding to the test sample are analyzed separately to obtain the analyzed labels and the analyzed inference results. Based on the parsed labels and inference results processed by the index evaluation algorithm, the performance evaluation index corresponding to the target class model is determined.

[0092] In this implementation, the aforementioned execution entity can use the indicator evaluation plugin to parse the inference result corresponding to the test sample and the label corresponding to the test sample according to its corresponding plugin running logic information, thereby obtaining the parsed label and the parsed inference result; and then process the parsed label and the parsed inference result according to the indicator evaluation algorithm to determine the performance evaluation indicator corresponding to the target class model.

[0093] In one example, the execution logic of the metric evaluation plugin may include the following workflow: (1.1) Obtain the inference results and labels from the results file; (1.2) Parse the inference results and labels respectively, and the file path of the inference results is the path of the results file; (1.3) Determine the performance evaluation index corresponding to the target class model through the index evaluation plugin.

[0094] It should be noted that when determining performance evaluation metrics, the inference results and labels can also be evaluated using the metric evaluation algorithm defined in the plugin's runtime parameter information.

[0095] In this implementation, the evaluation algorithm defined in the plugin's runtime parameters is used to achieve personalized evaluation of the inference results and labels.

[0096] In some optional implementations of this embodiment, the method further includes: The target class model's model service source code files, test sample sets, and plugin runtime information are packaged into an image file.

[0097] In this implementation, before model performance evaluation, the method for evaluating model performance also includes: encapsulating the target class model's model service code source file, test sample set, and plugin runtime information into an image file.

[0098] The model performance evaluation plugin for the target model can be either a file-based model or a mirror-based model. During the performance evaluation process, it shares the model service source code file and appears as a model service. This model service source code file can be used to define the path to the model service source code file, the model service address, etc.

[0099] Test sample set: This includes tags, and the format of the test sample set can be set in the image file by the plugin developer or the test user. For example, the storage path of the sample data package can be provided by the plugin developer.

[0100] Performance evaluation metrics: Performance evaluation metrics calculated based on labels and inference results to evaluate the target class model, such as accuracy and prediction latency.

[0101] Plugin execution information: Based on Python code, this defines the execution flow of the plugin in the model performance evaluation process. For example, plugin execution information includes plugin runtime environment information, which defines the runtime environment (or resources, etc.) for the plugin, typically consisting of an image, such as a Python 38+ environment.

[0102] In some optional implementations of this embodiment, if the plugin runtime parameter information includes a display method, the method further includes: displaying the performance evaluation metrics of the target class model through the display method.

[0103] In this implementation, the display methods can include: numerical type, text type, and line graph.

[0104] Here, the above display method may refer to the display method of some or all of the performance evaluation indicators of the target class model.

[0105] After obtaining the performance evaluation metrics, they can be written to the corresponding storage target, such as a metrics database or list, based on the plugin's runtime parameter information.

[0106] In one example, the line chart can display the performance evaluation results of the target class model using elements such as lines, bar charts, etc.

[0107] In this implementation, performance evaluation metrics are displayed by showing the plugin's runtime parameter information.

[0108] In some optional implementations of this embodiment, if the target class model includes multiple class models, the performance evaluation metrics of the target class model are displayed in a presentation manner, including: The performance evaluation metrics of various models are displayed through comparison charts corresponding to the display methods.

[0109] In this implementation, performance evaluation metrics for multiple models are displayed using a comparison chart corresponding to the display method. This comparison chart can be configured to show all or some performance evaluation metrics of multiple models together, or to perform cross-analysis of all or some performance evaluation metrics and display them, or to display all or some performance evaluation metrics of multiple models, such as sample proportions, using a confusion matrix.

[0110] Here, cross-analysis of all or some performance evaluation metrics can be performed to demonstrate some of the model's performance through the cross-analysis results. For example, accuracy and latency can measure the model's latency and resource consumption.

[0111] In one example, a comparison chart is used to display all performance metrics for various models. This comparison chart can present the model name, a list of performance evaluation metrics, and a line graph of all performance evaluation metrics for each model.

[0112] In one example, at least a portion of all performance metrics are shown through a comparison chart, such as a line chart, bar chart, or curve (e.g., PR curvature or ROC curve), for example, accuracy.

[0113] In this implementation, multiple types of models are displayed through comparison charts. During the display process, test users can select the content to be displayed according to their needs (e.g., a certain type of model, certain performance evaluation indicators, etc.), thereby meeting the specific testing needs of the test users.

[0114] Further reference Figures 5-6 The diagram illustrates an application scenario of the method for evaluating model performance according to this disclosure. In this application scenario, the method for evaluating model performance may include the following steps: (1) Preparation before evaluation: Prepare the source code files and test sample set of the model service, and launch and publish the model performance evaluation plugin as an online service; (2) Start the model service: Request the target class model and test sample set to the model inference stage through the test request; (3) Model inference: The model inference plugin first parses the test sample set to obtain the parsed test samples, converts the parsed test samples into plugin input parameters (i.e., input_func), and converts the format of the inference result into the plugin output format (i.e., output_func); (4) Performance evaluation: The metric evaluation plugin parses the inference result and label, and evaluates the inference result and label through metric evaluation calculation (i.e., calculate_metrics_func) to obtain the performance evaluation metric.

[0115] After obtaining the performance evaluation metrics, the method may further include: displaying the performance evaluation metrics in a display manner; after displaying the performance evaluation metrics, the method may further include middleware cleanup and destruction of model services to evaluate the resources consumed by the target class model, namely, CPU (Central Processing Unit / Processor) / memory / GPU (Graphics Processing Unit) for performance evaluation.

[0116] It should be noted that when evaluating the performance of a target class model, the resource consumption of that model can also be considered to assist in the evaluation. For example, a model with lower resource consumption will outperform a model with higher resource consumption.

[0117] In this embodiment, the performance evaluation of the target class model is completed through a pluggable plugin.

[0118] Further reference Figure 7 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an apparatus for evaluating model performance, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0119] like Figure 7 As shown, the apparatus 700 for evaluating model performance in this embodiment may include an acquisition module 701 and a performance evaluation module 702. The acquisition module 701 is used to acquire a model performance evaluation plugin and an image file corresponding to the target class model in response to receiving a test request for the target class model; wherein the image file includes a test sample set and plugin operation mode information; the performance evaluation module 702 is used to start the image file and evaluate the test sample set according to the plugin operation mode information through the model performance evaluation plugin to determine the performance evaluation index corresponding to the target class model.

[0120] In this embodiment, the specific processing of the acquisition module 701 and the performance evaluation module 702 in the apparatus 700 for evaluating model performance, and the resulting technical effects, can be found in reference to [reference needed]. Figure 2 The relevant descriptions of steps 201-202 in the corresponding embodiments will not be repeated here.

[0121] In some examples, the model performance evaluation plugin includes a model inference plugin and a metric evaluation plugin; The performance evaluation module 702 includes: a model inference unit, used to process test samples in the test sample set through the model inference plugin according to its corresponding plugin operation mode information, and obtain the inference result corresponding to the test sample; and a performance evaluation unit, used to process the inference result corresponding to the test sample and the label corresponding to the test sample through the indicator evaluation plugin according to its corresponding plugin operation mode information, and determine the performance evaluation indicator corresponding to the target class model.

[0122] In some examples, plugin runtime information includes: plugin runtime environment information, plugin runtime logic information, and plugin runtime parameter information.

[0123] In some examples, plugin runtime parameter information includes plugin input parameters and plugin output format; The model inference unit is specifically used to: execute the following process on the test samples in the test sample set according to the corresponding plugin running logic information through the model inference plugin: parse the test samples in the test sample set to obtain the parsed test samples; traverse the parsed test samples and convert the parsed test samples into plugin input parameters; process the plugin input parameters to obtain inference results that match the plugin output format.

[0124] In some examples, the plugin's runtime parameter information includes the metric evaluation algorithm; The performance evaluation unit is specifically used to: execute the following process on the inference results through the indicator evaluation plugin according to its corresponding plugin operation logic information: parse the inference results and labels corresponding to the test sample respectively to obtain the parsed labels and parsed inference results; process the parsed labels and parsed inference results according to the indicator evaluation algorithm to determine the performance evaluation indicators corresponding to the target class model.

[0125] In some examples, the plugin runtime parameter information includes the display method; the device also includes a display module for displaying the performance evaluation metrics of the target class model in a display method.

[0126] In some examples, if the target class model includes multiple class models, the display module is specifically used to: display a comparison chart of performance evaluation metrics for multiple class models.

[0127] In some examples, the device also includes a packaging module for packaging the target class model's model service code source files, test sample sets, and plugin runtime information into an image file.

[0128] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0129] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0130] like Figure 8As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.

[0131] Multiple components in device 800 are connected to I / O interface 805, including: input unit 808, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0132] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as methods for evaluating model performance. For example, in some embodiments, the methods for evaluating model performance may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the methods for evaluating model performance described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform methods for evaluating model performance by any other suitable means (e.g., by means of firmware).

[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0138] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0139] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0140] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution mentioned in this disclosure can be achieved, and this is not limited herein.

[0141] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for evaluating model performance, comprising: In response to receiving a test request for a target class model, the system obtains a model performance evaluation plugin and an image file corresponding to the target class model; wherein, the model performance evaluation plugin includes a model inference plugin and a metric evaluation plugin, and the image file includes a test sample set and plugin operation information; The image file is started, and the test samples in the test sample set are processed by the model inference plugin according to its corresponding plugin operation mode information to obtain the inference result corresponding to the test sample; and the inference result corresponding to the test sample and the label corresponding to the test sample are processed by the indicator evaluation plugin according to its corresponding plugin operation mode information to determine the performance evaluation indicator corresponding to the target class model. The plugin operation mode information includes: plugin operation environment information, plugin operation logic information and plugin operation parameter information.

2. The method according to claim 1, wherein, The plugin runtime parameter information includes the plugin input parameters and the plugin output format; The process of processing test samples in the test sample set through the model inference plugin according to its corresponding plugin operation mode information to obtain the inference result corresponding to the test sample includes: The following execution flow is performed on the test samples in the test sample set by using the model inference plugin according to its corresponding plugin execution logic information: The test samples in the test sample set are parsed to obtain the parsed test samples; Iterate through the parsed test samples and convert the parsed test samples into input parameters for the plugin; The input parameters of the plugin are processed to obtain inference results that match the output format of the plugin.

3. The method according to claim 1, wherein, The plugin's runtime parameter information includes an indicator evaluation algorithm; The step of processing the inference result and the label corresponding to the test sample based on the corresponding plugin operation information through the indicator evaluation plugin to determine the performance evaluation indicator corresponding to the target class model includes: Based on its corresponding plugin execution logic, the indicator evaluation plugin performs the following execution flow for the inference result corresponding to the test sample: The inference results and labels corresponding to the test sample are analyzed separately to obtain the analyzed labels and the analyzed inference results. Based on the aforementioned indicator evaluation algorithm, the parsed labels and the parsed inference results are processed to determine the performance evaluation indicators corresponding to the target class model.

4. The method according to claim 1, wherein, The plugin runtime parameter information includes the display method; the method also includes: The performance evaluation metrics of the target class model are displayed using the aforementioned display method.

5. The method according to claim 4, wherein, If the target class model includes multiple class models, the display of the performance evaluation metrics of the target class model through the display method includes: The performance evaluation metrics of the various models are displayed through comparison charts corresponding to the aforementioned display methods.

6. The method according to claim 1, wherein, The method further includes: The model service source code file, test sample set, and plugin operation information of the target class model are packaged into an image file.

7. An apparatus for evaluating model performance, comprising: The acquisition module is used to, in response to receiving a test request for a target class model, acquire the model performance evaluation plugin and image file corresponding to the target class model; wherein, the model performance evaluation plugin includes a model inference plugin and a metric evaluation plugin, and the image file includes a test sample set and plugin operation information; The performance evaluation module is used to launch the image file, process the test samples in the test sample set according to the corresponding plugin operation mode information through the model inference plugin, obtain the inference result corresponding to the test sample, and process the inference result and the label corresponding to the test sample according to the corresponding plugin operation mode information through the indicator evaluation plugin, and determine the performance evaluation indicator corresponding to the target class model. The plugin operation mode information includes: plugin operation environment information, plugin operation logic information and plugin operation parameter information.

8. The apparatus according to claim 7, wherein, The plugin runtime parameter information includes the plugin input parameters and the plugin output format; The model inference unit is specifically used to: execute the following operation process on the test samples in the test sample set according to the corresponding plugin operation logic information through the model inference plugin: parse the test samples in the test sample set to obtain the parsed test samples; traverse the parsed test samples and convert the parsed test samples into input parameters of the plugin; process the input parameters of the plugin to obtain an inference result that matches the output format of the plugin.

9. The apparatus according to claim 7, wherein, The plugin's runtime parameter information includes an indicator evaluation algorithm; The performance evaluation unit is specifically used to: execute the following operation process on the inference result corresponding to the test sample according to the corresponding plugin operation logic information through the indicator evaluation plugin: respectively parse the inference result corresponding to the test sample and the label corresponding to the test sample to obtain the parsed label and the parsed inference result; Based on the aforementioned indicator evaluation algorithm, the parsed labels and the parsed inference results are processed to determine the performance evaluation indicators corresponding to the target class model.

10. The apparatus according to claim 7, wherein, The plugin's runtime parameter information includes a display method; the device further includes a display module, used to display the performance evaluation metrics of the target class model through the display method.

11. The apparatus according to claim 10, wherein, If the target class model includes multiple class models, the display module is specifically used to: display the performance evaluation indicators of the multiple class models through a comparison chart corresponding to the display method.

12. The apparatus according to claim 7, wherein, The device further includes an encapsulation module, used to encapsulate the model service code source file, test sample set, and plugin operation mode information of the target class model into an image file.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

14. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-6.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Model evaluation method and system and storage medium

    CN114281706A

  • Operator performance evaluation method and device, electronic equipment and storage medium

    CN114564374A