def del_gen_img_path(pid, expid, path): db = get_db() delImgPath(db, expid, path) img_gen_list = get_output_imgs(db, expid, "GENDATA") emit('data-get-gen-images', img_gen_list, namespace='/data') print("Emitted to data-get-gen-images")
def request_inference_generate(pid, expid, model_path): print("Request received to make inference plot") db = get_db() (ganDir, ganFile, ganClass) = getGANInfo(db, expid) # my_module = importlib.import_module("GANEX.fastGAN.{}".format(ganFile)) # gan = eval("my_module.{}(db, pid, expid)".format(ganClass)) gan = create_gan_object(db, pid, expid, ganDir, ganFile, ganClass) gan.inference(model_path) img_list = get_output_imgs(db, expid, "INFERENCED") emit("inference-get-inferenced-imgs", img_list, namespace='/inference') print(img_list)
def rqst_del_img(expid, path): db = get_db() delImgPath(db, expid, path) img_list = get_output_imgs(db, expid, "INFERENCED") emit("inference-get-inferenced-imgs", img_list, namespace='/inference')
def request_available_inferenced_imgs(pid, expid): db = get_db() img_list = get_output_imgs(db, expid, "INFERENCED") emit("inference-get-inferenced-imgs", img_list, namespace='/inference')
def data_request_gan_gen_images(pid, expid): db = get_db() img_list = get_output_imgs(db, expid, "GENDATA") emit('data-get-gen-images', img_list, namespace='/data')