Skip to content

Conversation

@sumiya-kuroda
Copy link
Collaborator

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Right now, Python's print is buffered, which makes it difficult to understand what the pipeline is doing in real-time. For example, suite2p's output is lagged and difficult to assess the progress.

What does this PR do?
This adds an option to change the environment variable PYTHONUNBUFFERED. One can call photon-mosaic like below and it prints the output immediately.

PYTHONUNBUFFERED=1 photon-mosaic

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@lauraporta lauraporta changed the base branch from main to folder-name-metadata October 10, 2025 15:20
@lauraporta lauraporta changed the base branch from folder-name-metadata to main October 10, 2025 15:20
@lauraporta
Copy link
Member

This sounds like a good idea, I didn't know of PYTHONUNBUFFERED. I will leave some comments.

@lauraporta
Copy link
Member

I am curious of what happens with buffering when running multiple jobs in parallel. Will the print statement be included in a chronological order? That will make debugging harder. To be investigated.

@lauraporta lauraporta moved this to Todo in photon-mosaic Oct 10, 2025
@lauraporta lauraporta moved this from Todo to In Progress in photon-mosaic Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants