Commit b134513a6a853376d7cb9f41f2637adde45afbb4

Authored by Thomas Grill
1 parent 71f61d40e7

skip missing validations

Showing 2 changed files with 4 additions and 4 deletions

code/predict.py View file @ b134513
... ... @@ -20,7 +20,7 @@
20 20 parser.add_argument("--out-prefix", type=str, default='', help="out item prefix (default='%(default)s')")
21 21 parser.add_argument("--out-suffix", type=str, default='', help="out item suffix (default='%(default)s')")
22 22 parser.add_argument("--out-header", action='store_true', help="write eventual filelist header")
23   -parser.add_argument("--skip-not-found", action='store_true', help="Skip files with missing predictions")
  23 +parser.add_argument("--skip-missing", action='store_true', help="Skip files with missing predictions")
24 24 args = parser.parse_args()
25 25  
26 26 facc = np.__dict__[args.acc]
... ... @@ -69,8 +69,8 @@
69 69 try:
70 70 pred = results[fid]
71 71 except KeyError:
72   - print >>sys.stderr, "Prediction not found for %s," % fid
73   - if args.skip_not_found:
  72 + print >>sys.stderr, "Prediction missing for %s," % fid
  73 + if args.skip_missing:
74 74 print >>sys.stderr, "skipping."
75 75 continue
76 76 else:
... ... @@ -207,7 +207,7 @@
207 207 # prediction by bagging
208 208 echo_status "Bagging first stage validations."
209 209 vallists=`echo $LISTPATH/val_?`
210   - "$here/code/predict.py" "$WORKPATH"/model_first_?.validation.h5 --filelist ${vallists// /,} --out "$first_validations" --keep-prefix --keep-suffix --out-header || return $?
  210 + "$here/code/predict.py" "$WORKPATH"/model_first_?.validation.h5 --filelist ${vallists// /,} --out "$first_validations" --keep-prefix --keep-suffix --out-header --skip-missing || return $?
211 211 filelists=""
212 212 for t in ${TRAIN}; do
213 213 filelists+=" ${LABELPATH}/${t}.csv"