Skip to content

Commit

Permalink
add ALPS
Browse files Browse the repository at this point in the history
  • Loading branch information
fishercht1995 committed May 12, 2024
1 parent ae18e15 commit 6ced929
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,20 @@ cd http_client && ./test.sh
### Ablation Study
The frontend scheduler offer two parameter to control policy fine-tuning. By defauly, policy fine-tuning is enable
```
python3 --exp_result ../experiments/seals main.py
python3 main.py
```
And users can disable unpredictability finetuning and overload finetuning by
```
python3 main.py --exp_result ../experiments/seals --unpred --overload
python3 main.py --unpred --overload
```

### Sensitivity Analysis
Users can control policy parameters
```
python3 main.py --alpha 1 --beta 1 --theta 50 --gamma 1 --exp_result ../experiments/seals
python3 main.py --alpha 1 --beta 1 --theta 50 --gamma 1
```
Users can also change machine learning methods by
```
python3 main.py --ml avg --exp_result ../experiments/seals
python3 main.py --ml LR --exp_result ../experiments/seals
python3 main.py --ml avg
python3 main.py --ml LR
```
11 changes: 6 additions & 5 deletions frontend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,19 @@ def main():
parser.add_argument("--overload", action='store_false', help="Overload fine-tune")
args = parser.parse_args()
try:
stop_event = threading.Event()
thread = threading.Thread(target=trace_print, args=(stop_event,args.exp_cpu,))
thread.start()
if args.exp_result != "":
stop_event = threading.Event()
thread = threading.Thread(target=trace_print, args=(stop_event,args.exp_cpu,))
thread.start()
while True:
client_socket, addr = server_socket.accept()
handle_client(client_socket, args)
except KeyboardInterrupt:
print("Server is shutting down.")
finally:
stop_event.set()
thread.join()
if args.exp_result != "":
stop_event.set()
thread.join()
update_cpuT(args.exp_cpu, args.exp_result)
client_socket.close()
server_socket.close()
Expand Down

0 comments on commit 6ced929

Please sign in to comment.