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
Is There A Way To Access Dataframe Logged Using Report_Table From The A Task Instance Instantiated Using Task.Get_Task(Id='.....')? I Have: T = Task.Get_Task(Id='....') And I Am Looking For Something Along The Lines Of: Df = T.Get_Table('Table Name')

Is there a way to access DataFrame logged using report_table from the a task instance instantiated using Task.get_task(id='.....')?
I have:
t = Task.get_task(id='....')
and I am looking for something along the lines of:
df = t.get_table('table name')

  
  
Posted 4 years ago
Votes Newest

Answers 10


Hi ThickDove42 ,
Yes, but by the time you will be able to access it, it will be in a display form (plotly), not very convient.
If this is something you need to re-use, I would argue that it is an artifact and should be stored as artifact (then accessing it is transparent) , obviously you can both report as table and upload as artifact, no harm in that.
what do you think?

  
  
Posted 4 years ago

I understand. Thing is I already have a bunch of tasks where I logged the tables and did not upload an artifact. If I can get them using the SDK, as something that I can possibly extract the values from as JSON (as in the web GUI) that would be great. Currently I'm just manually downloading the json one by one as I need them.

  
  
Posted 4 years ago

Let me check...

  
  
Posted 4 years ago

You should have a download button when you hover over the table, I guess that would be the easiest.
If needed I can send an SDK code but unfortunately there is no single call for that

  
  
Posted 4 years ago

Yeah, I know how to do it manually from the web GUI using the button, that's just not scalable. What I need is the Python SDK code. It doesn't have to be a single liner.

  
  
Posted 4 years ago

Give me a moment 🙂

  
  
Posted 4 years ago

ThickDove42 sorry, it took some time 🙂
import json from trains.backend_api.session.client import APIClient client = APIClient() events = client.events.get_task_plots(task='task_id_here') table = json.loads(events.plots[0]['plot_str']) print('column order', table['data'][0]['cells']['values'])Not the most comfortable way, but at least it is there

  
  
Posted 4 years ago

great, I'll give it a try

  
  
Posted 4 years ago

AgitatedDove14 Looks goo, thanks! I see that I can also find the plot index based on the 'metric' key, so I can write something that would choose the plot by name rather than ordinal position.

  
  
Posted 4 years ago

ThickDove42 If you need the name itself :
events.plots[0]['metric'] events.plots[0]['variant']

  
  
Posted 4 years ago
1K Views
10 Answers
4 years ago
one year ago
Tags