Code Monkey home page Code Monkey logo

custom-dida's Introduction

Dependencies

  • CUDA == 11.7
  • python == 3.9
    conda create -n py39 python=3.9
  • pytorch == 2.0.1
    pip install torch==2.0.1 --extra-index-url https://download.pytorch.org/whl/cu117
  • torch-geometric == 2.3.1 and torch-scatter == 2.1.1+pt20cu117
    • Get appropriate whl files in link, then run following command
      pip install <scatter NAME>.whl # In this case, from https://data.pyg.org/whl/torch-2.0.1%2Bcu117.html
      
      pip install <geometric NAME>.whl ...
    • Do not use torch-scatter==2.1.1 because <scatter 2.1.1 NAME>.whl and torch-scatter==2.1.1 are differet
  • dgl == 1.1.1+cu117
  • fairseq == 0.12.2
  • gensim == 4.3.1
  • tensorboard == 2.13.0
  • scikit-learn == 1.3.0
  • pandas == 2.0.3
  • python-louvain == 0.16
  • loguru == 0.7.0
  • matplotlib == 3.7.2
  • mpmath == 1.3.0
  • networkx == 3.1
  • numpy == 1.25.1

Datasets

  • COLLAB and Yelp
    • Download dataset at ./data from following links
      https://drive.google.com/file/d/19SOqzYEKvkna6DKd74gcJ50Wd4phOHr3/view?usp=share_link
  • BitcoinAlpha, WikiElec and RedditBody
    • Run following commands
      python ./dataset_loader/preprocess_dgl_brw.py # Download dataset, produce DGL graphs and save DGL graphs as pt files to fix node features
      python ./dataset_loader/preprocess_dict_from_dgl.py # Produce dictionaries from DGL graphs, and save dictionaries as pt files becuase we need to fix negative edges for test

Usage

  • Check args.log_dir in config.py
  • Run the project
    • Option 1 - Use main.py directly, for example:
      # Our method with edge propagation with alpha_std
      python main.py --model ours --seed 123 --device_id 0 --propagate dyaug --alpha_std 1 --dataset collab --ex_name "Dynamic aug"
      
      # DIDA
      python main.py --model dida --seed 123 --device_id 0 --dataset collab --ex_name "Dynamic aug"
    • Option 2 - Use script.sh
      bash script.sh
      # Then, check the log folder <args.log_dir>/<args.ex_name>/* for this run
      
      # To check logs, move the log folder to <TENSORBOARD FOLDER> and run tensorboard
      tensorboard --logdir <TENSORBOARD FOLDER> --port <PORT>
      
      # Check the logs in tensorboard
  • After running the project, if you want to group the results from multiple runs to get the mean values, run following command
    # We assume that <LOG_PATH> has multiple runs with different seeds
    python group_multiple_runs.py <LOG_PATH>
    
    # Check <LOG_PATH>/combined_<RUN NAME>

Paper

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.