Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor revision about example scripts #417

Open
Minys233 opened this issue Mar 12, 2020 · 1 comment
Open

Minor revision about example scripts #417

Minys233 opened this issue Mar 12, 2020 · 1 comment

Comments

@Minys233
Copy link

I noticed in example code, some argument are inconsistent in the commented parts, such as lines in examples/molnet/train_molnet.py:

# trainer.extend(ROCAUCEvaluator(
# valid_iter, predictor, eval_func=predictor,
# device=args.gpu, converter=concat_mols, name='val',
# pos_labels=1, ignore_labels=-1, raise_value_error=False))
#
# trainer.extend(E.snapshot_object(
# model, "best_val_" + model_filename[task_type]),
# trigger=training.triggers.MaxValueTrigger('val/main/roc_auc'))

args.gpu and concat_mols are not consistent with other codes and will throw errors. They should be modified to device and converter, since they are extracted from args or defined in previous lines like this:

device = chainer.get_device(args.device)

converter = converter_method_dict[method]

Since this mistake is too minor to PR, a small issue is enough. Have a nice day :-)

@corochann
Copy link
Member

Sorry for confusion for remaining the old legacy code, and thank you for report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants