Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello, I Am Trying To Programmatically Retrieve The Artifact

Hello, I am trying to programmatically retrieve the artifact FILE_PATH information that get displayed in the UI. So I have a pandas dataframe uploaded as artifact, when I print the task artifact (task.artifacts), I can see the output look like this:

{"my-artifact-name": {"name": "my-artifact-name", "size": xxx, "type": "pandas", "url": "
"}}

but when I attempted to get the url (expect the outcome would be a string) using task.artifacts.get("my-artifact-name").get("url") , the outcome is actually a pandas dataframe. So is there a way to get the actual url as string?

  
  
Posted 5 days ago
Votes Newest

Answers 2


Hi ScrawnyCrocodile51 ,

I can understand the confusion here, from the code you shared, the issue is with how you're accessing the artifact properties. When you call .get() on an Artifact object, you're actually invoking the get() method defined in the Artifact class, which returns the artifact's content (in your case, a pandas DataFrame), not a dictionary value.
Instead, you should access the URL property directly:

task.artifacts.get("my-artifact-name").url
  
  
Posted 5 days ago

Aha, I see. Thanks for the tip

  
  
Posted 4 days ago