Hi @OlivierCR.
You’re right: I did create another notebook in my AWS notebook instance where a training notebook is running and I copied/pasted the metrics code from the HF sagemaker notebook about this topic.
The main one is what you posted:
from sagemaker.analytics import TrainingJobAnalytics
df = TrainingJobAnalytics( training_job_name="jobname").dataframe()

My problem was as following:
In my training notebook, I did create a job_name as @philschmid did in the notebook workshop_1_getting_started_with_amazon_sagemaker/lab_1_default_training.ipynb, job_name that I used in my HuggingFaceEstimator as following:
# define Training Job Name 
import time
job_name = f'huggingface-workshop-{time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())}'

# create the Estimator
huggingface_estimator = HuggingFace(
    base_job_name        = job_name,          # the name of the training job
   (...)
)

For example, this code gave job_name = 'huggingface-workshop-2021-12-09-18-03-30'
However, this job_name did not work in the metrics code (at the top of the post).
Then, I was to AWS SageMaker console >> Training Jobs and saw a name slightly different that I copied/pasted as job_name… and it worked!
Why the AWS SageMaker console does change the training jobs names?