Module Import alias Import alias Import alias Import alias ImportFrom alias Import alias Import alias identifier ImportFrom alias alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str NameLoad Assign NameStore ListLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad orelse Assign NameStore Num If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq NameLoad Num body Assign NameStore NameLoad orelse AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body If CompareNotIn NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad Str attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Import alias Import alias ImportFrom alias alias Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad NameLoad ExtSlice Slice NameLoad Slice Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad Assign NameStore ListLoad Str Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A glob N/A re N/A os N/A subprocess shutil rmtree N/A logging N/A numpy np mrec save_recommender load_recommender WARPMFRunner N/A object N/A run N/A N/A self view model input_format trainfile feature_format featurefile num_engines workdir overwrite modelfile N/A N/A N/A N/A N/A logging info N/A N/A creating models directory {0}... format workdir N/A N/A N/A subprocess check_call N/A mkdir -p workdir N/A done N/A N/A N/A overwrite N/A N/A N/A N/A logging info checking for existing output models... N/A N/A N/A done extend N/A N/A self find_done workdir N/A done N/A N/A N/A N/A logging info N/A N/A found {0} output files format N/A len done N/A N/A N/A logging info creating tasks... N/A tasks N/A N/A self create_tasks model input_format trainfile feature_format featurefile workdir num_engines done N/A tasks N/A N/A N/A N/A logging info running in parallel across ipython engines... N/A async_job N/A N/A view map_async process tasks retries 2 N/A results N/A N/A async_job get N/A N/A N/A logging info checking output files... N/A done N/A N/A self find_done workdir N/A remaining N/A N/A len tasks N/A len done N/A N/A remaining 0 N/A N/A remaining 0 N/A N/A N/A N/A logging info SUCCESS: all tasks completed N/A N/A N/A logging info N/A N/A concatenating {0} models... format N/A len done N/A ix N/A sorted done N/A N/A partial_model N/A load_recommender N/A N/A self get_modelfile ix workdir N/A N/A ix 0 N/A N/A model partial_model N/A N/A N/A model d N/A partial_model d N/A N/A model U N/A N/A np hstack N/A N/A model U N/A partial_model U N/A N/A model V N/A N/A np hstack N/A N/A model V N/A partial_model V N/A N/A hasattr model W N/A N/A N/A model W N/A N/A np hstack N/A N/A model W N/A partial_model W N/A N/A save_recommender model modelfile N/A N/A N/A logging info removing partial output files... N/A N/A rmtree workdir N/A N/A N/A logging info done N/A N/A N/A N/A logging error N/A N/A FAILED: {0}/{1} tasks did not complete successfully format remaining N/A len tasks N/A N/A N/A logging error try rerunning the command to retry the remaining tasks N/A create_tasks N/A N/A self model input_format trainfile feature_format featurefile outdir num_engines done N/A N/A N/A tasks N/A N/A ix N/A xrange num_engines N/A N/A N/A ix done N/A N/A outfile N/A N/A self get_modelfile ix outdir N/A N/A N/A tasks append N/A model input_format trainfile feature_format featurefile outfile ix num_engines N/A tasks N/A find_done N/A N/A self outdir N/A N/A N/A success_files N/A N/A glob glob N/A N/A N/A os path join outdir *.SUCCESS N/A r N/A N/A re compile .*?([0-9]+)\.model\.npz\.SUCCESS$ N/A done N/A N/A path success_files N/A N/A m N/A N/A r match path N/A ix N/A int N/A N/A m group 1 N/A N/A N/A done append ix N/A done N/A get_modelfile N/A N/A self ix workdir N/A N/A N/A N/A N/A N/A os path join workdir N/A N/A {0}.model.npz format ix N/A N/A process N/A N/A task N/A N/A N/A 
    Training task to run on an ipython engine.
     N/A os N/A subprocess mrec load_sparse_matrix save_recommender N/A N/A model input_format trainfile feature_format featurefile outfile offset step task N/A dataset N/A load_sparse_matrix input_format trainfile N/A N/A featurefile None N/A N/A item_features N/A N/A N/A load_sparse_matrix feature_format featurefile toarray N/A num_items N/A N/A dataset shape N/A 1 N/A item_features N/A item_features N/A N/A num_items N/A N/A N/A N/A model fit dataset item_features item_features N/A N/A N/A N/A model fit dataset N/A N/A save_recommender model outfile N/A cmd N/A touch N/A N/A {0}.SUCCESS format outfile N/A N/A N/A subprocess check_call cmd N/A offset N/A