Skip to content

Commit

Permalink
possible to not provide test
Browse files Browse the repository at this point in the history
  • Loading branch information
andersjo committed May 7, 2014
1 parent 225238b commit a15f9e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rungsted/runner.py
Expand Up @@ -51,9 +51,11 @@

# Prevents the addition of new features when loading the test set
feat_map.freeze()
test = read_vw_seq(args.test, args.n_labels, ignore=args.ignore, feat_map=feat_map)
logging.info("Test data {} sentences".format(len(test)))
logging.info("Weight vector size {}".format(feat_map.n_feats()))
test = None
if args.test:
test = read_vw_seq(args.test, args.n_labels, ignore=args.ignore, feat_map=feat_map)
logging.info("Test data {} sentences".format(len(test)))
logging.info("Weight vector size {}".format(feat_map.n_feats()))

# Loading weights
w = Weights(n_labels, feat_map.n_feats())
Expand Down

0 comments on commit a15f9e5

Please sign in to comment.