Coder Social home page Coder Social logo

Comments (2)

rampasek avatar rampasek commented on August 30, 2024

Hi Rishabh!

Yes that is possible, but would need a little bit of refactoring:

  1. PyG Datasets have pre_transform hook, see the doc, which applies a transformation function to each graph example in the dataset and saves that version to the disk, keeping that version cached so it is only computed once -- the first time the dataset is downloaded and processed.
  2. The way I precompute the PE/SE stats is already implemented as transformation function applied to each dataset, but I do so after loading the "vanilla" dataset from the disk, having to recompute it each time as you mention. But this could be hooked up to the pre_transform hook and cached.
  3. In order to load the correct dataset with the desired precomputed PE/SE you need to rename the dataset accordingly, so it is saved under a unique name and make sure that if the PE/SE config matches what was used to precompute the cached version.

So that is roughly what needs to be done. I haven't implemented yet as it was impractical for me to have many different cached versions of the datasets (I'm a bit storage limited). I don't immediately plan to do it now, hopefully later on.

from graphgps.

rish-16 avatar rish-16 commented on August 30, 2024

That's a great suggestion, thanks! I'll look into it :D

Appreciate the help!

from graphgps.

Related Issues (20)

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.