Skip to content

How to get model references logged by a specific run? #1485

Discussion options

You must be logged in to vote

To get the logged model refs:

from polyaxon.client import RunClient

run_client = RunClient(project="PROJECT_NAME", run_uuid="RUN_UUID")

# Query the lineage information
lineages = run_client.get_artifacts_lineage(query="kind: model").results

# Download the lineage assets
for lineage in lineages:
    run_client.download_artifact_for_lineage(lineage=lineage)

You can restrict the ref to specific lineage by filtering further by name:

lineages = run_client.get_artifacts_lineage(query="kind: model, name: best_auc").results

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by polyaxon-team
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
1 participant