Giter VIP home page Giter VIP logo

networkdismantling / review Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 11.0 216.01 MB

Repository of scripts and data for the "Robustness and resilience of complex networks" paper by Oriol Artime, Marco Grassia, Manlio De Domenico, James P. Gleeson, Hernán A. Makse, Giuseppe Mangioni, Matjaž Perc and Filippo Radicchi, published at Nature Review Physics (2024). https://doi.org/10.1038/s42254-023-00676-y

Home Page: https://rdcu.be/dvsId

C++ 35.83% Makefile 0.81% Python 52.19% C 5.30% CMake 0.12% Cython 5.44% TeX 0.32%
graph-problems network-dismantling network-resilience network-robustness np-hard

review's Issues

Fix Makefile for MacOS and Linux alike

Thank you for sharing the code, but when I reached the 'common' step, the code encountered an error.

(dismantling) yiding@yiding-virtual-machine:~/review$ pip install -e .
Obtaining file:///home/yiding/review
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 255
  ╰─> [29 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-gwxox9_f/NetworkDismantling.egg-info
      writing /tmp/pip-pip-egg-info-gwxox9_f/NetworkDismantling.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-gwxox9_f/NetworkDismantling.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-pip-egg-info-gwxox9_f/NetworkDismantling.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-gwxox9_f/NetworkDismantling.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-pip-egg-info-gwxox9_f/NetworkDismantling.egg-info/SOURCES.txt'
      writing manifest file '/tmp/pip-pip-egg-info-gwxox9_f/NetworkDismantling.egg-info/SOURCES.txt'
      In file included from /home/yiding/anaconda3/envs/dismantling/include/boost/function/detail/requires_cxx11.hpp:9,
                       from /home/yiding/anaconda3/envs/dismantling/include/boost/function/detail/prologue.hpp:12,
                       from /home/yiding/anaconda3/envs/dismantling/include/boost/function/function_template.hpp:13,
                       from /home/yiding/anaconda3/envs/dismantling/include/boost/function/detail/maybe_include.hpp:15,
                       from /home/yiding/anaconda3/envs/dismantling/include/boost/function/function0.hpp:11,
                       from /usr/include/boost/python/errors.hpp:13,
                       from /usr/include/boost/python/handle.hpp:11,
                       from /usr/include/boost/python/args_fwd.hpp:10,
                       from /usr/include/boost/python/args.hpp:10,
                       from /usr/include/boost/python.hpp:11,
                       from dismantler.cpp:10:
      /home/yiding/anaconda3/envs/dismantling/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
         36 | BOOST_PRAGMA_MESSAGE(
            | ^~~~~~~~~~~~~~~~~~~~
      /home/yiding/anaconda3/envs/dismantling/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
         13 | BOOST_HEADER_DEPRECATED("<iterator>")
            | ^~~~~~~~~~~~~~~~~~~~~~~
      /usr/bin/ld: unrecognised option: -install_name
      collect2: error: ld returned 1 exit status
      make: *** [Makefile:29: dismantler.so] Error 1
      ERROR! Command 'cd network_dismantling/common/external_dismantlers/ && make clean && make' returned non-zero exit status 2.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Apart from creating the environments for GDM and FINDER, I have completed all the previous steps.

Originally posted by @DionysusF in #1

Could not find the lib network_utils

I am sorry I could not run the code for the problem ModuleNotFoundError: No module named 'network_utils', which happened in your dataset_provider.py., when I was following your instruction to try python network_dismantling/dismantler.py -l dataset/test_review/ -t 0.1 -H GND MS CollectiveInfluenceL2 -o out/df/heuristics.csv -F "*corruption*"

from network_utils.io.graph_tool import load_graph

I am sure the pypi lib of https://pypi.org/project/network-utils/ has nothing to do with the lib you are using and I search the github ending up with the only reference in your file.

I saw the load_graph func in common.loaders.

Failed to install FINDER_ND algorithm

Hi, nice to read the excellent review paper, and thanks for sharing and organizing the data & codes.
I didn't install FINDER successfully when Cythoning PrepareBatchGraph.pyx to PrepareBatchGraph.cpp. Some issue screenshots are as follows:
image
image

The uploaded PrepareBatchGraph.cpp file is also invalid with error: Do not use this file, it is the result of a failed Cython compilation.
By the way, I can install and test the original FINDER_ND algorithm under the same conda env.
I have installed gcc-8 and g++-8 as suggested, and I have no clue why it happened. Could you give me any advice?

ModuleNotFoundError: No module named 'network_dismantling.machine_learning'

2024-04-07 23:39:39 :: ERROR    :: MainProcess :: Error while dismantling network dblp-cite: No module named 'network_dismantling.machine_learning'                                                                              
Traceback (most recent call last):
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/dismantler.py", line 326, in main
    runs = dismantling_method(
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/__init__.py", line 92, in __call__
    output = self.function(*args, **kwargs)
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/CoreGDM/python_interface.py", line 387, in CoreGDM
    return _CoreGDM(network, **kwargs)
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/CoreGDM/python_interface.py", line 295, in _CoreGDM
    from network_dismantling.CoreGDM.core_grid import parse_parameters
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/CoreGDM/core_grid.py", line 34, in <module>
    from network_dismantling.CoreGDM.core_network_dismantler import get_df_columns
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/CoreGDM/core_network_dismantler.py", line 34, in <module>
    from network_dismantling.GDM.network_dismantler import init_network_provider, \
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/GDM/network_dismantler.py", line 35, in <module>
    from network_dismantling.GDM.predictors import static_predictor, get_predictions, lcc_static_predictor
  File "/home/ta/c0mm4nd/netlab/review/network_dismantling/GDM/predictors.py", line 27, in <module>
    from network_dismantling.machine_learning.pytorch.training_data_extractor import (
ModuleNotFoundError: No module named 'network_dismantling.machine_learning'

BTW, make compiling the cpp codes would be better when installing the package, rather than running the program.

A typo in Readme file.

In the part of building your own env 'finder': tensorflow-cpu==1.14.0 should be changed to tensorflow-gpu==1.14.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.