File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 55import numpy as np
66import pandas as pd
77import pprint
8+ import sys
89
910try :
1011 import anndata
@@ -112,6 +113,14 @@ def train_sequence(
112113 logger .debug ("training strategy:\n %s" , pprint .pformat (training_strategy ))
113114 for idx , d in enumerate (training_strategy ):
114115 logger .debug ("Beginning with training sequence #%d" , idx + 1 )
116+ # Override duplicate arguments with user choice:
117+ if np .any ([x in list (d .keys ()) for x in list (kwargs .keys ())]):
118+ d = dict ([(x , y ) for x , y in d .items () if x not in list (kwargs .keys ())])
119+ for x in [xx for xx in list (d .keys ()) if xx in list (kwargs .keys ())]:
120+ sys .stdout .write (
121+ "overrding %s from training strategy with value %s with new value %s\n " %
122+ (x , str (d [x ]), str (kwargs [x ]))
123+ )
115124 self .train (** d , ** kwargs )
116125 logger .debug ("Training sequence #%d complete" , idx + 1 )
117126
You can’t perform that action at this time.
0 commit comments