Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Notebook.Fix Logging

БесплатноБез исполняемых скриптовНе проверен

Use idiom for controlling logging in Jupyter notebooks

gpsaggeseот gpsaggese★ 158 звёзд на GitHub

Об этом скилле

Goal

  • <NOTEBOOK> is the Jupyter notebook to fix, passed by the user

  • Implement the instructions in .claude/skills/notebook.rules.md under ## Use Standard Template Structure

  • Use the structure from .claude/templates/notebook.template.py for notebook initialization

  • Use display

  • The local utility *_utils.py should have a function like

    import helpers.hnotebook as hnotebo
    
    def init_loggers(notebook_log: logging.Logger) -> None:
        """
        Wire the notebook logger into the utils logger.
    
        :param notebook_log: logger owned by the notebook
        """
        hnotebo.init_loggers(notebook_log, utils_log=_LOG)
    
    • hnotebo.init_loggers() already calls config_notebook(), initializes hdbg at INFO level, and redirects the notebook and utils loggers to print
    • For a third-party logger (e.g., causalml), redirect it inside init_loggers() with hnotebo.set_logger_to_print():
      hnotebo.set_logger_to_print(logging.getLogger("causalml"))
      
  • The last setup cell in the notebook calls utils.init_loggers(_LOG), not logging.basicConfig() or hdbg.init_logger()

Workflow

Sync Notebook

  • At the end, sync the paired .py file with Jupytext following the conventions in # Code Architecture and Responsibility -> ## Utilities vs. Notebook Responsibilities in .claude/skills/notebook.rules.md

Conventions

  • Always follow the conventions and guidelines in .claude/skills/notebook.rules.md

Verification

  • Confirm the notebook init cell matches .claude/templates/notebook.template.py
  • Confirm utils.init_loggers() is called and log messages print in the notebook
  • Confirm the .ipynb and paired .py file are in sync via Jupytext

Установить Notebook.Fix Logging в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Notebook.Fix Logging?

Use idiom for controlling logging in Jupyter notebooks

Как установить скилл Notebook.Fix Logging?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Notebook.Fix Logging запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Notebook.Fix Logging с