def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'verus') send_src = path.join(cc_repo, 'src', 'verus_server') recv_src = path.join(cc_repo, 'src', 'verus_client') if args.option == 'deps': print 'libtbb-dev libasio-dev libalglib-dev libboost-system-dev' return if args.option == 'setup': # apply patch to reduce MTU size utils.apply_patch('verus.patch', cc_repo) sh_cmd = './bootstrap.sh && ./configure && make -j' check_call(sh_cmd, shell=True, cwd=cc_repo) return if args.option == 'sender': cmd = [send_src, '-name', utils.tmp_dir, '-p', args.port, '-t', '120'] check_call(cmd, cwd=utils.tmp_dir) return if args.option == 'receiver': cmd = [recv_src, args.ip, '-p', args.port] check_call(cmd, cwd=utils.tmp_dir) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-plus') send_src = path.join(cc_repo, 'net-em/net-em/net_em/envs', 'testing-td3.py') conn_src = path.join(cc_repo, 'net-em/net-em/net_em/envs/connect-Eagle') cmake_src = path.join(conn_src, 'build.sh') recv_src = path.join(conn_src, 'connect') # designate a trained model here (default path: cc_repo/net-em/.../envs/models/) model_src = '/TD3_Network_Emulation-v1itr930_rw-989' #ensemble_src = 'training_models/model-xentropy-ensemble-190iter-rw148.pt' if args.option == 'setup': # build C++ connection program cmd = ['bash', cmake_src] check_call(cmd, cwd=conn_src) return if args.option == 'sender': cmd = ['python3', send_src, args.port, '--only_expert', '--model', model_src] out = subprocess.check_output(cmd) text_file = open("shoof-sender.txt", 'w') text_file.write(out.decode("utf-8")) text_file.close() return if args.option == 'receiver': cmd = [recv_src, 'receive', args.ip, args.port] out = subprocess.check_output(cmd) text_file = open("shoof-receiver.txt", 'w') text_file.write(out.decode("utf-8")) text_file.close() return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'verus') send_src = path.join(cc_repo, 'src', 'verus_server') recv_src = path.join(cc_repo, 'src', 'verus_client') if args.option == 'deps': print 'libtbb-dev libasio-dev libalglib-dev libboost-system-dev' return if args.option == 'setup': # apply patch to reduce MTU size utils.apply_patch('verus.patch', cc_repo) sh_cmd = './bootstrap.sh && ./configure && make -j' check_call(sh_cmd, shell=True, cwd=cc_repo) return if args.option == 'sender': cmd = [send_src, '-name', utils.tmp_dir, '-p', args.port, '-t', '75'] check_call(cmd, cwd=utils.tmp_dir) return if args.option == 'receiver': cmd = [recv_src, args.ip, '-p', args.port] check_call(cmd, cwd=utils.tmp_dir) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-plus') send_src = path.join(cc_repo, 'net-em/net-em/net_em/envs', 'example_xentropy.py') conn_src = path.join(cc_repo, 'net-em/net-em/net_em/envs/connect-Eagle') cmake_src = path.join(conn_src, 'build.sh') recv_src = path.join(conn_src, 'connect') # designate a trained model here (default path: cc_repo/net-em/.../envs/models/) model_src = 'training_models/model-xentropy-505iter-rw97.pt' if args.option == 'setup': # build C++ connection program cmd = ['bash', cmake_src] check_call(cmd, cwd=conn_src) return if args.option == 'sender': cmd = [ 'python3', send_src, args.port, '--return_recent_meas', '--pass_hidden_states', '--model', model_src ] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, 'receive', args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'autocc') send_src = path.join(cc_repo, 'run_sender.py') recv_src = path.join(cc_repo, 'gym_pantheon', 'envs', 'run_receiver.py') if args.option == 'setup': check_call(['sudo pip install gym'], shell=True) check_call(['sudo pip install torch'], shell=True) return if args.option == 'sender': cmd = [ send_src, args.port, "--algorithm=dt", "--agent-path=auto_0.4_dt_weighted.pkl" ] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, args.ip, args.port] print(cmd) check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-plus') send_src = path.join(cc_repo, 'net-em/net-em/net_em/envs', 'offline_training.py') conn_src = path.join(cc_repo, 'net-em/net-em/net_em/envs/connect-Eagle') cmake_src = path.join(conn_src, 'build.sh') recv_src = path.join(conn_src, 'connect') # designate a trained model here (default path: cc_repo/net-em/.../envs/models/) model_src = 'training_models/model-xentropy-1920iter-rw245-scaling.pt' #ensemble_src = 'training_models/model-xentropy-ensemble-190iter-rw148.pt' if args.option == 'setup': # build C++ connection program cmd = ['bash', cmake_src] check_call(cmd, cwd=conn_src) return if args.option == 'sender': cmd = [ 'python3', send_src, args.port, '--train=heuristic', '--return_recent_meas', '--pass_hidden_states', '--model', model_src, '--expert=synthesizedBBR', '--test', '--scaling' ] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, 'receive', args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-plus') send_src = path.join(cc_repo, 'net-em/net-em/net_em/envs', 'agent.py') conn_src = path.join(cc_repo, 'net-em/net-em/net_em/envs/connect-Eagle') cmake_src = path.join(conn_src, 'build.sh') recv_src = path.join(conn_src, 'connect') # designate a trained model here (default path: cc_repo/net-em/.../envs/models/) model_src = 'training_models/retrain-ep459-task6-no_expert.pt' if args.option == 'setup': # build C++ connection program cmd = ['bash', cmake_src] check_call(cmd, cwd=conn_src) return if args.option == 'sender': cmd = [ 'python3', send_src, args.port, '--return_recent_meas', '--threads=1', '--pg', '--normalized', '--model', model_src ] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, 'receive', args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'mvfst-rl') src = path.join(cc_repo, '_build/build/traffic_gen/traffic_gen') if args.option == 'deps': dependencies_mvfst() return if args.option == 'setup': setup_mvfst(cc_repo) return if args.option == 'sender': cmd = [ src, '--mode=server', '--host=0.0.0.0', # Server listens on 0.0.0.0 '--port=%s' % args.port, '--cc_algo=cubic', ] + args.extra_args.split() check_call(cmd) return if args.option == 'receiver': cmd = [ src, '--mode=client', '--host=%s' % args.ip, '--port=%s' % args.port, '--cc_algo=cubic', ] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-v3') send_src = '/home/zi/PycharmProjects/gold-IRL/sender-receiver/sender-receiver/sender_receiver/DeepRL/deep_rl_2/ml_algos/run.py' # send_src = '/home/zi/PycharmProjects/gold-IRL/sender-receiver/sender-receiver/sender_receiver/envs/example_xentropy.py' recv_src = path.join(cc_repo, 'sender-receiver/sender_receiver/envs', 'run_receiver.py') if args.option == 'setup': return if args.option == 'sender': cmd = [ 'python3', send_src, args.port, "dqn", "Discount", "0.95", "dqn-0.95-40iter-rw269.pt" ] #cmd = ['python3', send_src, args.port, '--expert', 'pythonBBR', '--debug'] subprocess.check_output(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] subprocess.check_output(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'gold-IRL') send_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'example_DQN_003_msl_50e_rms_lr_0p001.py' ) # may have to give model params as arguments recv_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'run_receiver.py') model_name = 'Eagle-DQN-003-model-DQN-msl_50e_rms_lr_0p001-357iter-rw21402.pt' #'model-xentropy-0.01decay10iter-770iter.pt' # change - also look at directories involved #dependencies = path.join(cc_repo, 'dependencies.sh') if args.option == 'setup': #check_call(dependencies, shell = True) return if args.option == 'sender': cmd = [ 'python3', send_src, args.port, '--model=' + model_name, '--expert', 'synthesizedBBR' ] # change subprocess.check_output(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] subprocess.check_output(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'gold-IRL') send_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'example_xentropy.py') recv_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'run_receiver.py') model_name = 'model-xentropy-670iter-rw209.pt' #'model-xentropy-0.01decay10iter-770iter.pt' # change - also look at directories involved #dependencies = path.join(cc_repo, 'dependencies.sh') if args.option == 'setup': #check_call(dependencies, shell = True) return if args.option == 'sender': cmd = [ 'python3', send_src, args.port, '--model=' + model_name, '--expert', 'synthesizedBBR' ] # change subprocess.check_output(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] subprocess.check_output(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'webrtc') video = path.join(cc_repo, 'video.y4m') if args.option == 'deps': print('chromium-browser xvfb xfonts-100dpi xfonts-75dpi ' 'xfonts-cyrillic xorg dbus-x11 npm nodejs') return if args.option == 'setup': setup_webrtc(cc_repo, video) return if args.option == 'sender': if not xvfb_in_use(1): xvfb_proc = Popen(['Xvfb', ':1']) else: xvfb_proc = None os.environ['DISPLAY'] = ':1' # run signaling server on the sender side signaling_server_src = path.join(cc_repo, 'app.js') Popen(['node', signaling_server_src, args.port]) user_data_dir = path.join(utils.tmp_dir, 'webrtc-%s' % uuid.uuid4()) cmd = [ 'chromium-browser', '--app=http://localhost:%s/sender' % args.port, '--use-fake-ui-for-media-stream', '--use-fake-device-for-media-stream', '--use-file-for-fake-video-capture=%s' % video, '--user-data-dir=%s' % user_data_dir ] check_call(cmd) if xvfb_proc: xvfb_proc.kill() return if args.option == 'receiver': if not xvfb_in_use(2): xvfb_proc = Popen(['Xvfb', ':2']) else: xvfb_proc = None os.environ['DISPLAY'] = ':2' user_data_dir = path.join(utils.tmp_dir, 'webrtc-%s' % uuid.uuid4()) cmd = [ 'chromium-browser', '--app=http://%s:%s/receiver' % (args.ip, args.port), '--user-data-dir=%s' % user_data_dir ] check_call(cmd) if xvfb_proc: xvfb_proc.kill() return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'webrtc') video = path.join(cc_repo, 'video.y4m') if args.option == 'deps': print ('chromium-browser xvfb xfonts-100dpi xfonts-75dpi ' 'xfonts-cyrillic xorg dbus-x11 npm nodejs') return if args.option == 'setup': setup_webrtc(cc_repo, video) return if args.option == 'sender': if not xvfb_in_use(1): xvfb_proc = Popen(['Xvfb', ':1']) else: xvfb_proc = None os.environ['DISPLAY'] = ':1' # run signaling server on the sender side signaling_server_src = path.join(cc_repo, 'app.js') Popen(['node', signaling_server_src, args.port]) user_data_dir = path.join(utils.tmp_dir, 'webrtc-%s' % uuid.uuid4()) cmd = ['chromium-browser', '--app=http://localhost:%s/sender' % args.port, '--use-fake-ui-for-media-stream', '--use-fake-device-for-media-stream', '--use-file-for-fake-video-capture=%s' % video, '--user-data-dir=%s' % user_data_dir] check_call(cmd) if xvfb_proc: xvfb_proc.kill() return if args.option == 'receiver': if not xvfb_in_use(2): xvfb_proc = Popen(['Xvfb', ':2']) else: xvfb_proc = None os.environ['DISPLAY'] = ':2' user_data_dir = path.join(utils.tmp_dir, 'webrtc-%s' % uuid.uuid4()) cmd = ['chromium-browser', '--app=http://%s:%s/receiver' % (args.ip, args.port), '--user-data-dir=%s' % user_data_dir] check_call(cmd) if xvfb_proc: xvfb_proc.kill() return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'autocc') send_src = path.join(cc_repo, 'run_sender.py') recv_src = path.join(cc_repo, 'gym_pantheon', 'envs', 'run_receiver.py') if args.option == 'sender': cmd = [send_src, args.port] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-v1') send_src = path.join(cc_repo, 'environment', 'learner.py') recv_src = path.join(cc_repo, 'environment', 'run_receiver.py') dependencies = path.join(cc_repo, 'dependencies.sh') if args.option == 'setup': check_call(dependencies, shell = True) return if args.option == 'sender': cmd = ['python3', '-O', send_src,'action_space1', args.port, '--test'] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'mvfst-rl') src = path.join(cc_repo, '_build/build/traffic_gen/traffic_gen') if args.option == 'deps': dependencies_mvfst() return if args.option == 'setup': setup_mvfst(cc_repo) return if args.option == 'sender': # If --extra_args is set, then we are in train mode. # Otherwise, load flags from pkl file. if args.extra_args: cc_env_args = args.extra_args.split() else: cc_env_args = get_test_cc_env_args(cc_repo) cmd = [ src, '--mode=server', '--host=0.0.0.0', # Server listens on 0.0.0.0 '--port=%s' % args.port, '--cc_algo=rl', ] + cc_env_args check_call(cmd) return # We use cubic for the client side to keep things simple. It doesn't matter # here as we are simulating server-to-client flow, and the client simply # sends a hello message to kick things off. if args.option == 'receiver': cmd = [ src, '--mode=client', '--host=%s' % args.ip, '--port=%s' % args.port, '--cc_algo=cubic', ] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-v3') send_src = '/home/zi/PycharmProjects/gold-IRL/sender-receiver/sender-receiver/sender_receiver/DeepRL/deep_rl_2/ml_algos/run.py' recv_src = path.join(cc_repo, 'sender-receiver/sender_receiver/envs', 'run_receiver.py') if args.option == 'setup': return if args.option == 'sender': cmd = ['python3', send_src, args.port, "ppo", "Gradient", "0.6", "ppo-0.6-70iter-rw252.pt"] subprocess.check_output(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] subprocess.check_output(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'proto-quic') send_src = path.join(cc_repo, 'src', 'out', 'Default', 'quic_server') recv_src = path.join(cc_repo, 'src', 'out', 'Default', 'quic_client') cert_dir = path.join(context.src_dir, 'wrappers', 'quic-certs') html_dir = path.join(cc_repo, 'www.example.org') utils.make_sure_dir_exists(html_dir) if args.option == 'deps': print('libnss3-tools libgconf-2-4') return if args.option == 'setup': setup_quic(cc_repo, cert_dir, html_dir) return if args.option == 'sender': cmd = [ send_src, '--port=%s' % args.port, '--quic_response_cache_dir=%s' % html_dir, '--certificate_file=%s' % path.join(cert_dir, 'leaf_cert.pem'), '--key_file=%s' % path.join(cert_dir, 'leaf_cert.pkcs8') ] check_call(cmd) return if args.option == 'receiver': cmd = [ recv_src, '--host=%s' % args.ip, '--port=%s' % args.port, 'https://www.example.org/' ] for _ in range(5): # suppress stdout as it prints the huge web page received with open(os.devnull, 'w') as devnull: if call(cmd, stdout=devnull) == 0: return time.sleep(1)
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'goldLSTM175xtra') send_src = path.join(cc_repo, 'sender-receiver/sender_receiver/envs', 'example_a2c.py') recv_src = path.join(cc_repo, 'sender-receiver/sender_receiver/envs', 'run_receiver.py') #dependencies = path.join(cc_repo, 'dependencies.sh') if args.option == 'setup': #check_call(dependencies, shell = True) return if args.option == 'sender': cmd = ['python3' , send_src, args.port] subprocess.check_output(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] subprocess.check_output(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'mvfst-rl') src = path.join(cc_repo, '_build/build/traffic_gen/traffic_gen') if args.option == 'deps': dependencies_mvfst() return if args.option == 'setup': setup_mvfst(cc_repo) return if args.option == 'sender': cmd = [ src, '--mode=server', '--host=0.0.0.0', # Server listens on 0.0.0.0 '--port=%s' % args.port, '--cc_algo=rl', ] + args.extra_args.split() + [ # extra_args might have --cc_env_mode already, so we set this # at the end to override. '--cc_env_mode=random', ] check_call(cmd) return # We use cubic for the client side to keep things simple. It doesn't matter # here as we are simulating server-to-client flow, and the client simply # sends a hello message to kick things off. if args.option == 'receiver': cmd = [ src, '--mode=client', '--host=%s' % args.ip, '--port=%s' % args.port, '--cc_algo=cubic', ] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'indigo') send_src = path.join(cc_repo, 'dagger', 'run_sender.py') recv_src = path.join(cc_repo, 'env', 'run_receiver.py') if args.option == 'setup': check_call(['sudo pip install tensorflow'], shell=True) return if args.option == 'sender': cmd = [send_src, args.port] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-plus') send_src = path.join(cc_repo, 'net-em/net-em/net_em/envs', 'testing-td3.py') conn_src = path.join(cc_repo, 'net-em/net-em/net_em/envs/connect-Eagle') cmake_src = path.join(conn_src, 'build.sh') recv_src = path.join(conn_src, 'connect') # designate a trained model here (default path: cc_repo/net-em/.../envs/models/) model_src = '/../TD3_Network_Emulation-v1itr1530_rw182-better-advancing' #ensemble_src = 'training_models/model-xentropy-ensemble-190iter-rw148.pt' if args.option == 'setup': # build C++ connection program cmd = ['bash', cmake_src] check_call(cmd, cwd=conn_src) return if args.option == 'sender': #flow_no_src = path.join(context.src_dir, 'flow_no.txt') # designate a trained model here (default path: cc_repo/net-em/.../envs/models/) #with open(flow_no_src, 'r') as f: # flow = int(f.readline()) #flow_model = {'0':'/0/TD3-online-Network_Emulation-v1itr3510_rw225_23-00-39', '1': '/1/TD3-online-Network_Emulation-v1itr3360_rw298_22-36-50', '2': '/2/TD3-online-Network_Emulation-v1itr3285_rw156_22-49-03'} #with open(flow_no_src, 'w') as f: # f.write("%s" % str((flow + 1) % 3)) #model_src = flow_model[str(flow)] cmd = ['python3', send_src, args.port, '--model', model_src] out = subprocess.check_output(cmd) text_file = open("shoof-sender.txt", 'w') text_file.write(out.decode("utf-8")) text_file.close() return if args.option == 'receiver': cmd = [recv_src, 'receive', args.ip, args.port] out = subprocess.check_output(cmd) text_file = open("shoof-receiver.txt", 'w') text_file.write(out.decode("utf-8")) text_file.close() return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-pcc') send_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'example_xentropy.py') recv_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'run_receiver.py') if args.option == 'setup': return if args.option == 'sender': cmd = ['python3', send_src, args.port, '--expert', 'pcc'] check_call(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'autocc') send_src = path.join(cc_repo, 'run_sender.py') recv_src = path.join(cc_repo, 'gym_pantheon', 'envs', 'run_receiver.py') if args.option == 'setup': check_call(['sudo pip install gym'], shell=True) check_call(['sudo pip install torch'], shell=True) return if args.option == 'sender': cmd = [send_src, args.port, "--preference=0.001"] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, args.ip, args.port] print(cmd) check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'proto-quic') send_src = path.join(cc_repo, 'src', 'out', 'Default', 'quic_server') recv_src = path.join(cc_repo, 'src', 'out', 'Default', 'quic_client') cert_dir = path.join(context.src_dir, 'wrappers', 'quic-certs') html_dir = path.join(cc_repo, 'www.example.org') utils.make_sure_dir_exists(html_dir) if args.option == 'deps': print 'libnss3-tools libgconf-2-4' return if args.option == 'setup': setup_quic(cc_repo, cert_dir, html_dir) return if args.option == 'sender': cmd = [send_src, '--port=%s' % args.port, '--quic_response_cache_dir=%s' % html_dir, '--certificate_file=%s' % path.join(cert_dir, 'leaf_cert.pem'), '--key_file=%s' % path.join(cert_dir, 'leaf_cert.pkcs8')] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, '--host=%s' % args.ip, '--port=%s' % args.port, 'https://www.example.org/'] for _ in range(5): # suppress stdout as it prints the huge web page received with open(os.devnull, 'w') as devnull: if call(cmd, stdout=devnull) == 0: return time.sleep(1)
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-plus') send_src = path.join(cc_repo, 'net-em/net-em/net_em/envs', 'offline_training.py') conn_src = path.join(cc_repo, 'net-em/net-em/net_em/envs/connect-Eagle') cmake_src = path.join(conn_src, 'build.sh') recv_src = path.join(conn_src, 'connect') if args.option == 'setup': cmd = ['bash', cmake_src] check_call(cmd, cwd=conn_src) return if args.option == 'sender': cmd = ['python3', send_src, args.port, '--expert=pythonBBR'] check_call(cmd) return if args.option == 'receiver': cmd = [recv_src, 'receive', args.ip, args.port] check_call(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-v3') send_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'example_xentropy.py') recv_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'run_receiver.py') #dependencies = path.join(cc_repo, 'dependencies.sh') if args.option == 'setup': #check_call(dependencies, shell = True) return if args.option == 'sender': cmd = ['python3', send_src, args.port, '--expert', 'synthesizedBBR'] subprocess.check_output(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] subprocess.check_output(cmd) return
def main(): args = arg_parser.sender_first() cc_repo = path.join(context.third_party_dir, 'eagle-v3') send_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'example_xentropy.py') recv_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs', 'run_receiver.py') model_src = path.join( cc_repo, 'sender-receiver/sender-receiver/sender_receiver/envs/model', 'model-xentropy-0.03decay10iter-240iter.pt') if args.option == 'setup': return if args.option == 'sender': cmd = ['python3', send_src, args.port, '--model', model_src] subprocess.check_output(cmd) return if args.option == 'receiver': cmd = ['python3', recv_src, args.ip, args.port] subprocess.check_output(cmd) return