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

Run timing scripts from nx-parallel #191

Open
MridulS opened this issue Sep 27, 2023 · 10 comments
Open

Run timing scripts from nx-parallel #191

MridulS opened this issue Sep 27, 2023 · 10 comments

Comments

@MridulS
Copy link
Member

MridulS commented Sep 27, 2023

[Everyone can do this task. There is no need to claim/assign this issue]

In this task we will look at the https://github.com/networkx/nx-parallel repository which contains the parallel implementations for some NetworkX algorithms. The task for this issue is to generate a heat map file heatmap_betweenness_centrality_timing.png and upload to this repository.

Add this file to your folder created in the first task and push the changes to github.

Create a pull request against this repository and add the file 2023-round-2/<your-github-username>/heatmap_betweenness_centrality_timing.png.

@Schefflera-Arboricola
Copy link
Member

hi @MridulS sir, I am facing an issue with running timing/timing_individual_function.py script. I am getting a ModuleNotFound error for nx_parallel. I also tried creating a virtual environment but I'm still getting the same error.

Usually, when I create and activate virtual environments there is a __pycache__ folder in the Python modules. But, it's not getting created in the nx_parallel folder or any other folder. I checked using which python that my Python interpreter is also correct(the virtual environment one) and the environment is also getting activated. I cannot figure out what's the problem, please help.

Thank you :)

@akshayamadhuri
Copy link
Contributor

ModuleNotFoundError: No module named 'nx_parallel' i am facing the same error too

@achluma
Copy link
Contributor

achluma commented Oct 4, 2023

I also faced the same issue, but you can execute the file in the interpreter as such:
>>> exec(open('timing/timing_individual_function.py').read())
it should generate a heatmap file. To be sure, you can rm the existing .png files before running the command. Also make sure modules matplotlib, seaborn, networkx are installed($ python -m pip install packagename)
heatmap_betweenness_centrality_timing

@MridulS
Copy link
Member Author

MridulS commented Oct 4, 2023

You need to install the package too. So after cloning nx-parallel, could you try running pip install . in the root directory?

@PromiseFru
Copy link
Contributor

You need to install the package too. So after cloning nx-parallel, could you try running pip install . in the root directory?

Hello @MridulS

The Error ModuleNotFoundError: No module named 'nx_parallel' persists even after running pip install .. I used the solution described here and it generated the heat map file.

@MridulS
Copy link
Member Author

MridulS commented Oct 5, 2023

Try running PYTHONPATH=. python timing/timing_individual_function.py ?

@PromiseFru
Copy link
Contributor

Try running PYTHONPATH=. python timing/timing_individual_function.py ?

This works thank you 🚀

@akshayamadhuri
Copy link
Contributor

i'm unable to fetch the output as I'm getting Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> this as my oputput

@PromiseFru
Copy link
Contributor

i'm unable to fetch the output as I'm getting Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> this as my oputput

Hello @akshayamadhuri,

The output you have indicates that your script is running correctly. Please wait for it to exit, and then check the output in the timing/ directory. The file name you should be looking out for is heatmap_betweenness_centrality_timing.png.

@Ytemiloluwa
Copy link
Contributor

i'm unable to fetch the output as I'm getting Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> Finished <function betweenness_centrality at 0x000002EBDF0DAAC0> this as my oputput

Hello @akshayamadhuri,

The output you have indicates that your script is running correctly. Please wait for it to exit, and then check the output in the timing/ directory. The file name you should be looking out for is heatmap_betweenness_centrality_timing.png.

worked me for too, I checked the time the file was created, it was the time I ran PYTHONPATH=. python timing/timing_individual_function.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants