Open
Conversation
There's no way to view kernel execution logs directly in the terminal, especially for in-progress runs. This adds a `logs` subcommand that prints log output to stdout, with `--follow`/`-f` for continuous polling (like `tail -f`) that stops on terminal kernel states. Co-authored-by: kaggle-agent <kaggle-agent@users.noreply.github.com>
erdalsivri
reviewed
Apr 10, 2026
| interval: Polling interval in seconds for follow mode (default 5). | ||
| """ | ||
| kernel = kernel or kernel_opt | ||
| terminal_statuses = {"complete", "error", "cancelAcknowledged"} |
Contributor
There was a problem hiding this comment.
Just passing by: I thought status was an enum. It is definitely an enum on the server side: KernelWorkerStatus. Can you check if kapigen serializes this as string or an enum in kaggle-sdk repo?
Collaborator
Author
There was a problem hiding this comment.
Already addressed in the previous round. Confirmed that kapigen serializes status as a KernelWorkerStatus enum (not a string) — KernelWorkerStatus.COMPLETE == "complete" returns False. Updated the code to import KernelWorkerStatus from kagglesdk.kernels.types.kernels_enums and compare against enum members (KernelWorkerStatus.COMPLETE, KernelWorkerStatus.ERROR, KernelWorkerStatus.CANCEL_ACKNOWLEDGED). Tests were also updated accordingly.
There's no way to view kernel execution logs directly in the terminal, especially for in-progress runs. This adds a `logs` subcommand that prints log output to stdout, with `--follow`/`-f` for continuous polling (like `tail -f`) that stops on terminal kernel states. Uses KernelWorkerStatus enum values for terminal status comparison rather than raw strings. Co-authored-by: kaggle-agent <kaggle-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's no way to view kernel execution logs directly in the terminal,
especially for in-progress runs. This adds a
logssubcommand thatprints log output to stdout, with
--follow/-ffor continuouspolling (like
tail -f) that stops on terminal kernel states.Co-authored-by: kaggle-agent kaggle-agent@users.noreply.github.com
Task: bovard-20260410183000-fc1c6e01
Context: https://chat.kaggle.net/kaggle/pl/idq4xpn8djd59j3nsowkaf744c