def runCompilationScript(self): # Run compile script setting the working directory to ensure the compiled file are contained in the # appropriate subfolder and not the project root file_subfolder = "/Recommenders/MatrixFactorization/Cython" file_to_compile_list = ['MatrixFactorization_Cython_Epoch.pyx'] run_compile_subprocess(file_subfolder, file_to_compile_list) print("{}: Compiled module {} in subfolder: {}".format(RECOMMENDER_NAME, file_to_compile_list, file_subfolder))
def runCompilationScript(self): # Run compile script setting the working directory to ensure the compiled file are contained in the # appropriate subfolder and not the project root file_subfolder = "/FW_Similarity/Cython" file_to_compile_list = ['HP3_Similarity_Cython_SGD.pyx'] run_compile_subprocess(file_subfolder, file_to_compile_list) print("{}: Compiled module {} in subfolder: {}".format( self.RECOMMENDER_NAME, file_to_compile_list, file_subfolder))
fail_count = 0 for file_index, file_path in enumerate(cython_file_list): file_path = file_path.replace("\\", "/").split("/") file_name = file_path[-1] file_path = "/".join(file_path[:-1]) + "/" log_string = "Compiling [{}/{}]: {}... ".format( file_index + 1, len(cython_file_list), file_name) print(log_string) try: run_compile_subprocess(file_path, [file_name]) log_string += "PASS\n" print(log_string) log_file.write(log_string) log_file.flush() except Exception as exc: traceback.print_exc() fail_count += 1 log_string += "FAIL: {}\n".format(str(exc)) print(log_string) log_file.write(log_string) log_file.flush()