For some reason it does not work for me 😕req_obj = client.events.DownloadTaskLogRequest(clearml_task.id) AttributeError: 'Events' object has no attribute 'DownloadTaskLogRequest'
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?
The first thing you tried didn't work since the APIclient is not designed to receive plain text response, just Jason response
SuccessfulKoala55 it's working!
Thank you very much for letting me know 😄
You mean downloading logs from an experiment in a workspace you've been invited to?
Perhaps it is connected with the issue mentioned here (since I authenticate with the same credentials)
https://clearml.slack.com/archives/CTK20V944/p1652351085434649
oups please pardon me I made a confusion, this answer is not related to your issue. my fault 🙏
it should be released ub about two weeks, I think
Hi SuccessfulKoala55 !
Any update regarding pushing new version with a fix? 🙂
Hi CrabbyKoala94
I am working on your issue, I will update you asap. Thanks
🙂
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()) `
This is actually one of the only endpoints that returns this kind of output
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 :)
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
Already in the pipeline, should be available in the next server update 🙂
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
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)
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 😄
I see
Thanks for explanation!
And are there any updates about downloading logs from UI bug? 🙂
Hi CrabbyKoala94 , the download log request actually returns a different payload and is meant for the browser to intercept
I suggest using cURL and figuring out how to store the plain text response into a file
Yep sorry I have not pasted the import line. You should add something like this :
from clearml.backend_api.services import events
🙏