mirror of
https://github.com/clearml/clearml
synced 2025-02-08 05:43:14 +00:00
Fix Task.get_reported_console_output() for new API v2.9
This commit is contained in:
parent
df0e5deb02
commit
ce483521ef
@ -1297,13 +1297,19 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
last (most updated) console output
|
last (most updated) console output
|
||||||
:return: A list of strings, each entry corresponds to one report.
|
:return: A list of strings, each entry corresponds to one report.
|
||||||
"""
|
"""
|
||||||
res = self.send(
|
if Session.check_min_api_version('2.9'):
|
||||||
events.GetTaskLogRequest(
|
request = events.GetTaskLogRequest(
|
||||||
|
task=self.id,
|
||||||
|
order='asc',
|
||||||
|
navigate_earlier=True,
|
||||||
|
batch_size=number_of_reports)
|
||||||
|
else:
|
||||||
|
request = events.GetTaskLogRequest(
|
||||||
task=self.id,
|
task=self.id,
|
||||||
order='asc',
|
order='asc',
|
||||||
from_='tail',
|
from_='tail',
|
||||||
batch_size=number_of_reports,)
|
batch_size=number_of_reports)
|
||||||
)
|
res = self.send(request)
|
||||||
response = res.wait()
|
response = res.wait()
|
||||||
if not response.ok() or not response.response_data.get('events'):
|
if not response.ok() or not response.response_data.get('events'):
|
||||||
return []
|
return []
|
||||||
|
Loading…
Reference in New Issue
Block a user