Ces exemples impliquent l'obtention de métriques d'exécution, de paramètres d'exécution, de métriques de séries d'exécution, d'artefacts et de métriques de classification pour une exécution de test particulière.
À l'aide du SDK Vertex AI pour Python, vous pouvez récupérer les données associées à votre test. Les données pour les exécutions de test sont renvoyées dans un DataFrame.
Utilisez la console Google Cloud pour afficher les détails de vos exécutions de test et comparer les exécutions de test entre elles.
Afficher les données des exécutions de test
Dans la console Google Cloud, accédez à la page Tests. Accéder à Tests La liste des tests associés à un projet s'affiche.
Sélectionnez le test contenant l'exécution que vous souhaitez vérifier. Une liste d'exécutions, de graphiques de données de séries temporelles, ainsi qu'une table de données de métriques et de paramètres s'affiche. Dans ce cas, remarquez que trois exécutions sont sélectionnées, mais que deux lignes seulement apparaissent dans les graphiques de données de séries temporelles.
Il n'y a pas de troisième ligne, car la troisième exécution de test ne comporte aucune donnée de séries temporelles à afficher.
Cliquez sur le nom de l'exécution pour accéder à sa page d'informations. La barre de navigation et les graphiques de données de séries temporelles s'affichent.
Pour afficher les métriques, les paramètres, les artefacts et les détails de l'exécution sélectionnée, cliquez sur les boutons correspondants dans la barre de navigation.
Métriques
Paramètres
Artefacts
Pour afficher la traçabilité des artefacts, cliquez sur le lien Ouvrir l'artefact dans le magasin de métadonnées. Le graphique de traçabilité associé à l'exécution s'affiche.
Détails
Pour partager les données avec d'autres utilisateurs, utilisez les URL associées aux vues. Par exemple, partagez la liste des exécutions de test associées à un test :
Comparer les exécutions de test
Vous pouvez sélectionner des exécutions à comparer à la fois dans un test et entre plusieurs tests.
Dans la console Google Cloud, accédez à la page Tests. Accéder à Tests La liste des tests s'affiche.
Sélectionnez le test contenant les exécutions que vous souhaitez comparer. La liste des exécutions s'affiche.
Sélectionnez les exécutions de test que vous souhaitez comparer. Cliquez sur Comparer. Par défaut, des graphiques s'affichent, comparant les métriques de séries temporelles des exécutions de test sélectionnées.
Pour ajouter des exécutions supplémentaires à partir de n'importe quel test de votre projet, cliquez sur Ajouter une exécution.
Pour partager les données avec d'autres utilisateurs, utilisez les URL associées aux vues. Par exemple, partagez la vue comparative des données de métriques de séries temporelles :
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/11/22 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2024/11/22 (UTC)."],[],[],null,["# Compare and analyze runs\n\nYou can use the Vertex AI SDK for Python to view Vertex AI Experiments\nruns data and compare the runs.\n\n- [Get runs data](/vertex-ai/docs/experiments/compare-analyze-runs#api-analyze-runs)\n- [Compare runs](/vertex-ai/docs/experiments/compare-analyze-runs#api-compare-runs)\n\nThe Google Cloud console provides a visualization of the data\nassociated with these runs.\n\n- [View experiment run data](/vertex-ai/docs/experiments/compare-analyze-runs#view-experiment-run-data)\n- [Compare experiment runs](/vertex-ai/docs/experiments/compare-analyze-runs#compare-experiment-runs)\n\nGet experiment runs data\n------------------------\n\nThese samples involve getting run metrics, run parameters, runtime series\nmetrics, artifacts, and classification metrics for a particular experiment run. \n\n### Summary metrics\n\n### Python\n\n from typing import Dict, Union\n\n from google.cloud import aiplatform\n\n\n def get_experiment_run_metrics_sample(\n run_name: str,\n experiment: Union[str, aiplatform.Experiment],\n project: str,\n location: str,\n ) -\u003e Dict[str, Union[float, int]]:\n experiment_run = aiplatform.ExperimentRun(\n run_name=run_name, experiment=experiment, project=project, location=location\n )\n\n return experiment_run.get_metrics()\n\n- `run_name`: Specify the appropriate run name for this session.\n- `experiment`: The name or instance of this experiment. You can find your list of experiments in the Google Cloud console by selecting **Experiments** in the section nav.\n- `project`: . You can find these in the Google Cloud console [welcome](https://console.cloud.google.com/welcome) page.\n- `location`: See [List of available locations](/vertex-ai/docs/general/locations).\n\n### Parameters\n\n### Python\n\n from typing import Dict, Union\n\n from google.cloud import aiplatform\n\n\n def get_experiment_run_params_sample(\n run_name: str,\n experiment: Union[str, aiplatform.Experiment],\n project: str,\n location: str,\n ) -\u003e Dict[str, Union[float, int, str]]:\n experiment_run = aiplatform.ExperimentRun(\n run_name=run_name, experiment=experiment, project=project, location=location\n )\n\n return experiment_run.get_params()\n\n- `run_name`: Specify the appropriate run name for this session.\n- `experiment`: The name or instance of this experiment. You can find your list of experiments in the Google Cloud console by selecting **Experiments** in the section nav.\n- `project`: . You can find these in the Google Cloud console [welcome](https://console.cloud.google.com/welcome) page.\n- `location`: See [List of available locations](/vertex-ai/docs/general/locations).\n\n### Time series metrics\n\n### Python\n\n from typing import Union\n\n from google.cloud import aiplatform\n\n\n def get_experiment_run_time_series_metric_data_frame_sample(\n run_name: str,\n experiment: Union[str, aiplatform.Experiment],\n project: str,\n location: str,\n ) -\u003e \"pd.DataFrame\": # noqa: F821\n experiment_run = aiplatform.ExperimentRun(\n run_name=run_name, experiment=experiment, project=project, location=location\n )\n\n return experiment_run.get_time_series_data_frame()\n\n- `run_name`: Specify the appropriate run name for this session.\n- `experiment`: The name or instance of this experiment. You can find your list of experiments in the Google Cloud console by selecting **Experiments** in the section nav.\n- `project`: . You can find these in the Google Cloud console [welcome](https://console.cloud.google.com/welcome) page.\n- `location`: See [List of available locations](/vertex-ai/docs/general/locations).\n\n### Artifacts\n\n### Python\n\n from typing import List, Union\n\n from google.cloud import aiplatform\n from google.cloud.aiplatform.metadata import artifact\n\n\n def get_experiment_run_artifacts_sample(\n run_name: str,\n experiment: Union[str, aiplatform.Experiment],\n project: str,\n location: str,\n ) -\u003e List[artifact.Artifact]:\n experiment_run = aiplatform.ExperimentRun(\n run_name=run_name,\n experiment=experiment,\n project=project,\n location=location,\n )\n\n return experiment_run.get_artifacts()\n\n- `run_name`: Specify the appropriate run name for this session.\n- `experiment`: The name or instance of this experiment. You can find your list of experiments in the Google Cloud console by selecting **Experiments** in the section nav.\n- `project`: . You can find these in the Google Cloud console [welcome](https://console.cloud.google.com/welcome) page.\n- `location`: See [List of available locations](/vertex-ai/docs/general/locations).\n\n### Classification metrics\n\n### Python\n\n from typing import Dict, List, Union\n\n from google.cloud import aiplatform\n\n\n def get_experiment_run_classification_metrics_sample(\n run_name: str,\n experiment: Union[str, aiplatform.Experiment],\n project: str,\n location: str,\n ) -\u003e List[Dict[str, Union[str, List]]]:\n experiment_run = aiplatform.ExperimentRun(\n run_name=run_name, experiment=experiment, project=project, location=location\n )\n\n return experiment_run.get_classification_metrics()\n\n- `run_name`: Specify the appropriate run name for this session.\n- `experiment`: The name or instance of this experiment. You can find your list of experiments in the Google Cloud console by selecting **Experiments** in the section nav.\n- `project`: . You can find these in the Google Cloud console [welcome](https://console.cloud.google.com/welcome) page.\n- `location`: See [List of available locations](/vertex-ai/docs/general/locations).\n\nCompare runs\n------------\n\nUsing the Vertex AI SDK for Python, you can retrieve the data associated with\nyour experiment. The data for the experiment runs is returned in a DataFrame. \n\n### Compare runs\n\n\nThe data for the experiment runs is returned in a DataFrame.\n\n### Python\n\n from google.cloud import aiplatform\n\n\n def get_experiments_data_frame_sample(\n experiment: str,\n project: str,\n location: str,\n ):\n aiplatform.init(experiment=experiment, project=project, location=location)\n\n experiments_df = aiplatform.get_experiment_df()\n\n return experiments_df\n\n- `experiment_name`: Provide a name for the experiment. You can find your list of experiments in the Google Cloud console by selecting **Experiments** in the section nav.\n- `project`: . You can find these IDs in the Google Cloud console [welcome](https://console.cloud.google.com/welcome) page.\n- `location`: See [List of available locations](/vertex-ai/docs/general/locations).\n\nGoogle Cloud console\n--------------------\n\nUse the Google Cloud console to view details of your\n\nand compare the experiment runs to each other.\n\n### View experiment run data\n\n1. In the Google Cloud console, go to the **Experiments** page. \n [Go to Experiments](https://console.cloud.google.com/vertex-ai/experiments). \n A list of experiments associated with a project appears.\n2. Select the experiment containing the run that you want to check. \n A list of runs, timeseries data charts, and a metrics and parameters data table appear. Notice, in this case, three runs are selected, but only two lines appear in the timeseries data charts. There is no third line because the third experiment run does not have any timeseries data to display. \n\n3. Click the name of the run to navigate to its details page. \n\n The navigation bar and timeseries data charts appear. \n4. To view metrics, parameters, artifacts, and details for your selected run, click the respective buttons in the navigation bar.\n - Metrics \n - Parameters \n - Artifacts \n\n To view artifact lineage, click the **Open artifact in Metadata Store** link. The lineage graph associated with the run appears. \n - Details \n\nTo share the data with others, use the URLs associated with the views. For example, share\nthe list of experiment runs associated with an experiment:\n\n### Compare experiment runs\n\nYou can select runs to compare both within an experiment and across experiments.\n\n1. In the Google Cloud console, go to the **Experiments** page. \n [Go to Experiments](https://console.cloud.google.com/vertex-ai/experiments). \n A list of experiments appears.\n2. Select the experiment containing the runs that you want to compare. A list of runs appears.\n3. Select the experiment runs that you want to compare. Click **Compare** . \n\n By default, charts appear comparing timeseries metrics of the selected experiment runs.\n4. To add additional runs from any experiment in your project, click **Add run** .\n\nTo share the data with others, use the URLs associated with the views. For example, share\nthe comparison view of timeseries metrics data:\n\n\nSee [Create and manage experiment runs](/vertex-ai/docs/experiments/create-manage-exp-run)\nfor how to update the status of a run.\n\nWhat's next\n-----------\n\n- [Track executions and artifacts](/vertex-ai/docs/experiments/track-executions-artifacts)"]]