Esempio n. 1
0
def test_download_options():
    sys.argv = [sys.argv[0], "-dt", "cora"]
    parser = options.get_download_data_parser()
    args = parser.parse_args()
    print(args)

    assert args.dataset[0] == "cora"
Esempio n. 2
0
import numpy as np

from cogdl import options
from cogdl.datasets import build_dataset_from_name


def download_datasets(args):
    if not isinstance(args.dataset, list):
        args.dataset = [args.dataset]

    for name in args.dataset:
        build_dataset_from_name(name)


if __name__ == "__main__":
    parser = options.get_download_data_parser()
    args = parser.parse_args()

    download_datasets(args)