> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Comment puis-je trouver un artifact issu du meilleur run d’un sweep ?

Pour récupérer les artifacts du run le plus performant d’un sweep, utilisez le code suivant. Il trie les runs du sweep selon leur précision de validation, sélectionne le meilleur run, puis télécharge chaque artifact journalisé par ce run.

```python theme={"system"}
api = wandb.Api()
sweep = api.sweep("entity/project/sweep_id")
runs = sorted(sweep.runs, key=lambda run: run.summary.get("val_acc", 0), reverse=True)
best_run = runs[0]
for artifact in best_run.logged_artifacts():
    artifact_path = artifact.download()
    print(artifact_path)
```

Chaque artifact est téléchargé vers un chemin local, que le script affiche dans la console.

***

<Badge stroke shape="pill" color="blue" size="md">[Artifacts](/fr/support/models/tags/artifacts)</Badge>
