class_docstr: A training job represents a Sagemaker training job within an experiment.
class_docstr_tok: ["A","training","job","represents","a","Sagemaker","training","job","within","an","experiment","."]
docstr: Retrieves the logs emitted by this training job.
code: def logs(self) -> list[str]:
      """
      Retrieves the logs emitted by this training job.
      """
      # We can't put the `pull_logs` code here directly since `cached_property` seems to be CPU-
      # bound for some odd reason.
      return self.pull_logs()
  
imports: from __future__ import annotations
  import datetime
  import json
  import logging
  import re
  import shutil
  import tempfile
  import time
  from collections import Counter
  from functools import cached_property, lru_cache
  from pathlib import Path
  from typing import Any, Callable, cast, Dict, Iterator, List, Tuple, Union
  import boto3
  import numpy
  from botocore.exceptions import ClientError
  from .session import default_session
label_desc: Use image node_id 7 for calling the TrainingJob obj's underlying member method code with example usage: obj.logs() and returns: self