lrjconan / GRAN

Efficient Graph Generation with Graph Recurrent Attention Networks, Deep Generative Model of Graphs, Graph Neural Networks, NeurIPS 2019
MIT License
469 stars 96 forks source link

TypeError: load() missing 1 required positional argument: 'Loader' #23

Open gianmarcoaversanoenx opened 2 years ago

gianmarcoaversanoenx commented 2 years ago

Running on Google Colab:

git clone https://github.com/lrjconan/GRAN.git
cd GRAN
pip install -r requirements.txt

so far so good. Then:

python run_exp.py -c config/gran_lobster.yaml

I got

Traceback (most recent call last):
  File "run_exp.py", line 48, in <module>
    main()
  File "run_exp.py", line 17, in main
    config = get_config(args.config_file, is_test=args.test)
  File "/content/GRAN/utils/arg_helper.py", line 39, in get_config
    config = edict(yaml.load(open(config_file, 'r')))
TypeError: load() missing 1 required positional argument: 'Loader'
msadat67 commented 2 years ago

Hi you change load to safeload config = edict(yaml.safeload(open(config_file, 'r')))

gianmarcoaversanoenx commented 2 years ago

Hello thanks for replying.

Yes, I could find a patch. I just wanted to point out that the source code should be updated with a correction.

Best, Gianmarco

saart commented 1 year ago

For future references: use config = edict(yaml.safe_load(open(config_file, 'r'))) :)