Skip to content

Commit

Permalink
Fix list training_job logs.
Browse files Browse the repository at this point in the history
Signed-off-by: pitt-liang <[email protected]>
  • Loading branch information
pitt-liang committed Jan 4, 2024
1 parent 1a7f0c2 commit 06d5bac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pai/api/training_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,10 @@ def list_logs(
training_job_id=training_job_id,
request=request,
)
return self.make_paginated_result(resp)
# resp.logs may be None
logs = resp.logs or []
total_count = resp.total_count or 0
return PaginatedResult(
items=logs,
total_count=total_count,
)
2 changes: 1 addition & 1 deletion pai/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

VERSION = "0.4.5"
VERSION = "0.4.5.post0"

0 comments on commit 06d5bac

Please sign in to comment.