Skip to content

Conversation

@pablorfb-meta
Copy link
Contributor

Summary:
Logs do not show on Notebooks running monarch with no Conda

Why are FD watchers needed on IPython (Bento/Colab)?

  • On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
  • Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
  • On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
  • monarch_conda automatically displays all logs

More context: https://fburl.com/gdoc/36pyayi5

Differential Revision: D83712603

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 2, 2025
@meta-codesync
Copy link

meta-codesync bot commented Oct 2, 2025

@pablorfb-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83712603.

pablorfb-meta added a commit to pablorfb-meta/monarch that referenced this pull request Oct 2, 2025
Summary:

Logs do not show on Notebooks running monarch with no Conda


Why are FD watchers needed on IPython (Bento/Colab)?

- On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
- Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
- On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
- monarch_conda automatically displays all logs


More context: https://fburl.com/gdoc/36pyayi5

Differential Revision: D83712603
@pablorfb-meta pablorfb-meta force-pushed the export-D83712603 branch 2 times, most recently from 18a9d03 to 7138949 Compare October 3, 2025 19:57
pablorfb-meta added a commit to pablorfb-meta/monarch that referenced this pull request Oct 3, 2025
Summary:

Logs do not show on Notebooks running monarch with no Conda


Why are FD watchers needed on IPython (Bento/Colab)?

- On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
- Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
- On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
- monarch_conda automatically displays all logs


More context: https://fburl.com/gdoc/36pyayi5

Reviewed By: pzhan9

Differential Revision: D83712603
pablorfb-meta added a commit to pablorfb-meta/monarch that referenced this pull request Oct 6, 2025
Summary:

Logs do not show on Notebooks running monarch with no Conda


Why are FD watchers needed on IPython (Bento/Colab)?

- On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
- Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
- On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
- monarch_conda automatically displays all logs


More context: https://fburl.com/gdoc/36pyayi5

Reviewed By: pzhan9

Differential Revision: D83712603
pablorfb-meta added a commit to pablorfb-meta/monarch that referenced this pull request Oct 10, 2025
Summary:

Logs do not show on Notebooks running monarch with no Conda


Why are FD watchers needed on IPython (Bento/Colab)?

- On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
- Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
- On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
- monarch_conda automatically displays all logs


More context: https://fburl.com/gdoc/36pyayi5

Reviewed By: pzhan9

Differential Revision: D83712603
pablorfb-meta added a commit to pablorfb-meta/monarch that referenced this pull request Oct 10, 2025
Summary:

Logs do not show on Notebooks running monarch with no Conda


Why are FD watchers needed on IPython (Bento/Colab)?

- On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
- Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
- On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
- monarch_conda automatically displays all logs


More context: https://fburl.com/gdoc/36pyayi5

Reviewed By: pzhan9

Differential Revision: D83712603
Summary:

Logs do not show on Notebooks running monarch with no Conda


Why are FD watchers needed on IPython (Bento/Colab)?

- On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
- Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
- On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
- monarch_conda automatically displays all logs


More context: https://fburl.com/gdoc/36pyayi5

Reviewed By: pzhan9

Differential Revision: D83712603
@meta-codesync
Copy link

meta-codesync bot commented Oct 10, 2025

This pull request has been merged in 22dc699.

AlirezaShamsoshoara pushed a commit to AlirezaShamsoshoara/monarch that referenced this pull request Oct 30, 2025
Summary:
Pull Request resolved: meta-pytorch#1407

Logs do not show on Notebooks running monarch with no Conda

Why are FD watchers needed on IPython (Bento/Colab)?

- On notebook, the top level process is IPython kernel which captures Python streams (sys.stdout/sys.stderr)
- Monarch routes logs to parent’s process io::stdout/stderr (OS File Descriptors 1 and 2), which the IPython Kernel does not monitor by default
- On buck, the top process is the Monarch binary itself, meaning that FD 1/2 are connected to the terminal, so logs show up automatically
- monarch_conda automatically displays all logs

More context: https://fburl.com/gdoc/36pyayi5

Reviewed By: pzhan9

Differential Revision: D83712603

fbshipit-source-id: 3bf3ac1a1b65def7e1ff461f137385957e64a023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants