Skip to content

Minor revision about example scripts #417

@Minys233

Description

@Minys233

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 :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions