The graphgps data loader no longer overshadows all other dataloaders.#29
Open
jkminder wants to merge 3 commits intorampasek:mainfrom
Open
The graphgps data loader no longer overshadows all other dataloaders.#29jkminder wants to merge 3 commits intorampasek:mainfrom
jkminder wants to merge 3 commits intorampasek:mainfrom
Conversation
… This allows users of the library to add their own datasets
This reverts commit 34dd9a7. Was wrongly commited to the main branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If users want to use graphGPS as a library in their projects the graphgps master dataloader should not overshadow all other dataloaders. Otherwise they can not create new custom graphgym datasets when building on top of the graphgps library.
The
create_datasetfunction first checks whether any custom dataset loader function returns a dataset. A custom data loader function is ignored if it returnes None. See graphgym implementation here. Currently thecustom_master_loaderof graphGPS throws a ValueError if the format is not recognised, but this prohibits any user from registering their own data loader function with graphgym. Further it is not necessary to call the default pyg loaders if no customisation is applied, as thecreate_datasetwill fallback to them if no custom routine returns a dataset.This modification still allows the OGB dataset loader to be overwritten because any custom loader is called first (see again the official implementation in graphgym).
After the modification a user can install the graphgps library normaly and add new dataloaders functions, while any graphGPS datasets are still available (if your code has
import graphgpssomewhere and you have thegraphgpslibrary installed. In my opinion this is how the creators of graphgym intended this to work.