Skip to content

Add more explanation to missing python actor object error #366

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

Closed
wants to merge 1 commit into from

Conversation

pzhan9
Copy link
Contributor

@pzhan9 pzhan9 commented Jun 27, 2025

Summary:
I hit this error when plumbing cast to the python side (D77386342, v1). Briefly, I use cast when mesh is available, and fall back on direct send if not. This lead to a mixture usage of cast and direct send in this test

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=256-263

Briefly, proc.spawn uses cast, but inside f.get.stream(t), it uses direct send:

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=250-253

That is because when t gets pickle, PythonActorMesh is not included.

This is very painful to debug. Let us beef up the error message so hopefully I can remember what happened when I run into it next time.

Differential Revision: D77446127

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 27, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77446127

pzhan9 added a commit to pzhan9/monarch-1 that referenced this pull request Jun 27, 2025
…bs#366)

Summary:

I hit this error when plumbing `cast` to the python side (D77386342, v1). Briefly, I use `cast` [when mesh is available, and fall back on direct send if not](https://www.internalfb.com/code/fbsource/[D77386342-V1]/fbcode/monarch/python/monarch/actor_mesh.py?lines=192-216). This lead to a mixture usage of `cast` and `direct send` in this test

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=256-263

Briefly, `proc.spawn` uses cast, but inside `f.get.stream(t)`, it uses direct send:

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=250-253

That is because when `t` gets pickle, `PythonActorMesh` is [not included](https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/monarch/actor_mesh.py?lines=153-163).

This is very painful to debug. Let us beef up the error message so hopefully I can remember what happened when I run into it next time.

Differential Revision: D77446127
@pzhan9 pzhan9 force-pushed the export-D77446127 branch from dea1d26 to 7781636 Compare June 27, 2025 21:08
pzhan9 added a commit to pzhan9/monarch-1 that referenced this pull request Jun 27, 2025
…bs#366)

Summary:

I hit this error when plumbing `cast` to the python side (D77386342, v1). Briefly, I use `cast` [when mesh is available, and fall back on direct send if not](https://www.internalfb.com/code/fbsource/[D77386342-V1]/fbcode/monarch/python/monarch/actor_mesh.py?lines=192-216). This lead to a mixture usage of `cast` and `direct send` in this test

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=256-263

Briefly, `proc.spawn` uses cast, but inside `f.get.stream(t)`, it uses direct send:

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=250-253

That is because when `t` gets pickle, `PythonActorMesh` is [not included](https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/monarch/actor_mesh.py?lines=153-163).

This is very painful to debug. Let us beef up the error message so hopefully I can remember what happened when I run into it next time.

Differential Revision: D77446127
@pzhan9 pzhan9 force-pushed the export-D77446127 branch from 7781636 to 27a4ef1 Compare June 27, 2025 21:08
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77446127

pzhan9 added a commit to pzhan9/monarch-1 that referenced this pull request Jun 27, 2025
…bs#366)

Summary:
Pull Request resolved: pytorch-labs#366

I hit this error when plumbing `cast` to the python side (D77386342, v1). Briefly, I use `cast` [when mesh is available, and fall back on direct send if not](https://www.internalfb.com/code/fbsource/[D77386342-V1]/fbcode/monarch/python/monarch/actor_mesh.py?lines=192-216). This lead to a mixture usage of `cast` and `direct send` in this test

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=256-263

Briefly, `proc.spawn` uses cast, but inside `f.get.stream(t)`, it uses direct send:

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=250-253

That is because when `t` gets pickle, `PythonActorMesh` is [not included](https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/monarch/actor_mesh.py?lines=153-163).

This is very painful to debug. Let us beef up the error message so hopefully I can remember what happened when I run into it next time.

Differential Revision: D77446127
@pzhan9 pzhan9 force-pushed the export-D77446127 branch from 27a4ef1 to e30b652 Compare June 27, 2025 21:12
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77446127

pzhan9 added a commit to pzhan9/monarch-1 that referenced this pull request Jun 27, 2025
…bs#366)

Summary:
Pull Request resolved: pytorch-labs#366

I hit this error when plumbing `cast` to the python side (D77386342, v1). Briefly, I use `cast` [when mesh is available, and fall back on direct send if not](https://www.internalfb.com/code/fbsource/[D77386342-V1]/fbcode/monarch/python/monarch/actor_mesh.py?lines=192-216). This lead to a mixture usage of `cast` and `direct send` in this test

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=256-263

Briefly, `proc.spawn` uses cast, but inside `f.get.stream(t)`, it uses direct send:

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=250-253

That is because when `t` gets pickle, `PythonActorMesh` is [not included](https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/monarch/actor_mesh.py?lines=153-163).

This is very painful to debug. Let us beef up the error message so hopefully I can remember what happened when I run into it next time.

Differential Revision: D77446127
@pzhan9 pzhan9 force-pushed the export-D77446127 branch from e30b652 to 54b440d Compare June 27, 2025 21:17
…bs#366)

Summary:

I hit this error when plumbing `cast` to the python side (D77386342, v1). Briefly, I use `cast` [when mesh is available, and fall back on direct send if not](https://www.internalfb.com/code/fbsource/[D77386342-V1]/fbcode/monarch/python/monarch/actor_mesh.py?lines=192-216). This lead to a mixture usage of `cast` and `direct send` in this test

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=256-263

Briefly, `proc.spawn` uses cast, but inside `f.get.stream(t)`, it uses direct send:

https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/meta/tests/test_python_actors.py?lines=250-253

That is because when `t` gets pickle, `PythonActorMesh` is [not included](https://www.internalfb.com/code/fbsource/[5ef41e9fdc95c3a2f4f9135244dbb990d0818d0d]/fbcode/monarch/python/monarch/actor_mesh.py?lines=153-163).

This is very painful to debug. Let us beef up the error message so hopefully I can remember what happened when I run into it next time.

Reviewed By: mariusae

Differential Revision: D77446127
@pzhan9 pzhan9 force-pushed the export-D77446127 branch from 54b440d to 0ac2853 Compare June 30, 2025 11:21
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D77446127

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in cc8630b.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants