Clean Versions
Browse files17 unmodified lines181920212221222332 unmodified lines5657586159606364656661626364656667687369707576777879807172737475767717 unmodified linesfrom aiflows.utils.colink_utils import start_colink_serverfrom aiflows.workers import run_dispatch_worker_thread
CACHING_PARAMETERS.do_caching = False # Set to True in order to disable caching# clear_cache() # Uncomment this line to clear the cache
logging.set_verbosity_debug()
32 unmodified lines
#3. ~~~~ Serve The Flow ~~~~ serve_utils.recursive_serve_flow( serve_utils.serve_flow( cl = cl, flow_type="FlowModule", default_config=cfg, default_state=None, default_dispatch_point="coflows_dispatch" flow_class_name="flow_modules.aiflows.FlowModule.NAMEHERE", flow_endpoint="FlowModule", ) #4. ~~~~~Start A Worker Thread~~~~~ run_dispatch_worker_thread(cl, dispatch_point="coflows_dispatch", flow_modules_base_path=FLOW_MODULES_PATH)
#5. ~~~~~Mount the flow and get its proxy~~~~~~ proxy_flow = serve_utils.recursive_mount( proxy_flow= serve_utils.get_flow_instance( cl=cl, client_id="local", flow_type="FlowModule", config_overrides=None, initial_state=None, dispatch_point_override=None, ) flow_endpoint="FlowModule", user_id="local", config_overrides = cfg ) #6. ~~~ Get the data ~~~ data = {"id": 0}run.py+8-14