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 Was Trying To Download The Task Log Using Api In Python I'M Using

Hello
I was trying to download the task log using API in Python
I'm using client.events.download_task_log(task="task_id_string") but for some reason I always get an error:
ValueError: Missing meta section in response payload
Am I missing something obvious?

PS. I'm using http://app.clear.ml with self-hosted compute cluster

  
  
Posted one year ago
Votes Newest

Answers 26


Perhaps it is connected with the issue mentioned here (since I authenticate with the same credentials)
https://clearml.slack.com/archives/CTK20V944/p1652351085434649

  
  
Posted one year ago

Hi CrabbyKoala94
I am working on your issue, I will update you asap. Thanks

  
  
Posted one year ago

This is actually one of the only endpoints that returns this kind of output

  
  
Posted one year ago

🙂
here is a bit of code that seems to do the job. have a look
`
wrapper = Task.get_task(project_name="***", task_name="***")

req_obj = events.DownloadTaskLogRequest(wrapper.id)
res = wrapper.session.send_request(
service=req_obj._service,
action=req_obj._action,
version=req_obj._version,
json=req_obj.to_dict(),
method=req_obj._method,
async_enable=False,
headers=None,
)
print(res.json()) `

  
  
Posted one year ago

For some reason it does not work for me 😕
req_obj = client.events.DownloadTaskLogRequest(clearml_task.id) AttributeError: 'Events' object has no attribute 'DownloadTaskLogRequest'

  
  
Posted one year ago

I see
Thanks for explanation!

And are there any updates about downloading logs from UI bug? 🙂

  
  
Posted one year ago

You mean downloading logs from an experiment in a workspace you've been invited to?

  
  
Posted one year ago

yes

  
  
Posted one year ago

Any update regarding pushing new version with a fix?

CrabbyKoala94 a patch fixing this was deployed today - please take a look and see if your issue was resolved :)

  
  
Posted one year ago

SuccessfulKoala55 it's working!
Thank you very much for letting me know 😄

  
  
Posted one year ago

it should be released ub about two weeks, I think

  
  
Posted one year ago

I'm not sure I got it, sorry

I'm actually running the script from my local PC with clearml-init initialized using credentials generated on ClearML settings webpage (where you generate app credentials)

  
  
Posted one year ago

Ah, I was actually going to ask whether this is for sure related to my issue but I figured - nah, it must me be who is not getting it 😄

  
  
Posted one year ago

oups please pardon me I made a confusion, this answer is not related to your issue. my fault 🙏

  
  
Posted one year ago

For some reason it does not work for me

req_obj = client.events.DownloadTaskLogRequest(clearml_task.id) AttributeError: 'Events' object has no attribute 'DownloadTaskLogRequest'SweetBadger76 I think you missed the events import - this is not client.events

  
  
Posted one year ago

Yep sorry I have not pasted the import line. You should add something like this :

from clearml.backend_api.services import events

🙏

  
  
Posted one year ago

Hi CrabbyKoala94 , the download log request actually returns a different payload and is meant for the browser to intercept

  
  
Posted one year ago

I suggest using cURL and figuring out how to store the plain text response into a file

  
  
Posted one year ago

After fixing imports I was able to successfully run the code
Thanks a lot!

However I'm still curious why the first option I pasted in the original message did not work + do you have any update about the issue when downloading logs from the UI?

  
  
Posted one year ago

The first thing you tried didn't work since the APIclient is not designed to receive plain text response, just Jason response

  
  
Posted one year ago

JSON

  
  
Posted one year ago

Hi SuccessfulKoala55 !
Any update regarding pushing new version with a fix? 🙂

  
  
Posted one year ago

Already in the pipeline, should be available in the next server update 🙂

  
  
Posted one year ago

Amazing! 🤩
Thank you for the info!

  
  
Posted one year ago

(undergoing tests)

  
  
Posted one year ago

If the AWS machine has an ssh key installed, it should work - I assume it's possible to either use a custom AMI for that, or you can use the autoscaler instance startup bash script

  
  
Posted one year ago