Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazyflow logging and fix default operator naming #2850

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on Apr 22, 2024

  1. Logging: Log signal callbacks

    btbest committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    c47c5e9 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Logging: Implement per-slot loggers for debugging

    This avoids instantiating dozens of loggers outside of debugging, but allows fine-grained control during debugging.
    
    * Move old debugs to the new per-slot loggers
    * Move old errors to a new module-level logger that always exists
    * Add more debugs for better tracing what slots are doing
    btbest committed May 8, 2024
    Configuration menu
    Copy the full SHA
    7332dfe View commit details
    Browse the repository at this point in the history
  2. Logging: Implement per-op logger for debugging

    This should give flexible control. Logs from operator.py for a specific op (e.g. `lazyflow.op_debug.OpPixelClassification`) can be separately controlled from the individual module's logging for the same op (e.g. `ilastik.applets.pixelClassification.opPixelClassification`).
    btbest committed May 8, 2024
    Configuration menu
    Copy the full SHA
    91fa202 View commit details
    Browse the repository at this point in the history
  3. Logging: Encode file in utf-8 so slot.meta can be logged on Windows

    Some slots put unicode characters in the slot's meta dict. E.g. `OpPixelFeaturesPresmoothed.Output.meta.channel_names` will contain the sigma character. On Windows, the log file is encoded with cp1252 by default, which cannot handle such characters and raises UnicodeEncodeError.
    
    Logging f"{slot}" is therefore not possible by default, as the slot's repr will contain the full meta dict along with the unicode chars.
    btbest committed May 8, 2024
    Configuration menu
    Copy the full SHA
    ec1d8ab View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7fc421b View commit details
    Browse the repository at this point in the history
  5. Operator: Set default name earlier

    So that default name is available during subclass.__init__ and slots instantiated can use it in their logger name.
    btbest committed May 8, 2024
    Configuration menu
    Copy the full SHA
    4b6c0d1 View commit details
    Browse the repository at this point in the history
  6. OperatorWrapper: Fix default name

    This was always defaulting to "Wrapped Operator (base class)"
    btbest committed May 8, 2024
    Configuration menu
    Copy the full SHA
    26fd121 View commit details
    Browse the repository at this point in the history