-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Possible overwriting scenario with Jinja #8994
Labels
Comments
Thanks for the issue. I will take a look :) |
I have a potential fix in #9001 by making use of temporary files so that we don't write to the same file: with tempfile.NamedTemporaryFile(
mode='w',
prefix=f'{module_name}_',
suffix='.py',
delete=False,
) as tmp:
tmp.write(module_repr)
spec = importlib.util.spec_from_file_location(module_name, tmp.name) Do you mind trying this and see if it resolves your issues? |
If this doesn't help, then the issue is that |
rusty1s
added a commit
that referenced
this issue
Mar 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Describe the bug
I am getting the following error, not always but from time to time:
I am using pyg in a parallel setting with mpi. I think there is possibility of overwriting when pyg uses jina template here:
pytorch_geometric/torch_geometric/nn/conv/message_passing.py
Line 170 in 9b660ac
I put some following debug message around line 186:
Here is what I got from one process:
And this is the output from the other process:
It looks to me this can happen when two processes in the same node generate the same template file. One process read the python script in the middle, while the other process overwrites it.
This is just my thought. Anyhow, I am getting such error when using with MPI. Any help will be appreciated.
Versions
The text was updated successfully, but these errors were encountered: