trainer: Update the get_job_logs() API#4198
Conversation
Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
|
|
||
| log_dict = client.get_job_logs(job_name, step=constants.DATASET_INITIALIZER) | ||
| print(log_dict[constants.DATASET_INITIALIZER]) | ||
| print("\n".join(client.get_job_logs(job_name, step=constants.DATASET_INITIALIZER))) |
There was a problem hiding this comment.
Why not this way?
for logline in TrainerClient().get_job_logs(job_id, step=constants.DATASET_INITIALIZER, follow=True):",
print(logline)There was a problem hiding this comment.
That will also work. I just try to show users different ways to print the logs.
In this doc, we just print logs without follow=True.
There was a problem hiding this comment.
I agree that we should show different ways :) however on the website we only show examples with a string
Maybe on the getting started page we could add a note that you can use follow=True?
There was a problem hiding this comment.
Good point, let me change the getting started example.
Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andreyvelich The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* trainer: Update the get_job_logs() API Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com> * Use follow=True for getting started example Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com> --------- Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
* trainer: Update the get_job_logs() API Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com> * Use follow=True for getting started example Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com> --------- Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
Part of: kubeflow/sdk#75
We should update the
get_job_logs()API in Trainer SDK./assign @kubeflow/kubeflow-trainer-team @kubeflow/kubeflow-sdk-team