NUStreaming / BoB

12 stars 8 forks source link

Question regarding heuristic and learning BWs in packet reading and logging #3

Open HoustonHuff opened 1 year ago

HoustonHuff commented 1 year ago

Hello, I hope you're doing well,

I have been attempting to replicate BoB's publication results, and although at surface level I appear to be getting some of that, after digging deeper and doing my own data reporting I've noticed something unusual in the packet logging and not sure what to make of it. Namely, I see that at least in the packet logging it appears that the predictions that I am seeing are flagged to be almost strictly heuristic, and that the learning BWs are defaulting to an oscillation about a static value.

Are these logging values legacy (where the action selection in practice is switching to RL in the system but it's not being logged properly), or is there something actually wrong with my clone of the system or a misunderstanding of it on my part?

These results came from running the FCCamazone profile (not x0.25) with the BoB BWE and using Big Buck Bunny 720p as the input video.

FCCamazone_actual FCCamazone_predicted

makcay commented 1 year ago

have you seen run_with_tc.sh and ran it? it overrides BandwidthEstimator.py for each model. I am not sure actually which model you have used. with BoB you should see a complex log like that which covers your question already I think.

logging.debug("time:"+str(self.last_arrival_time - self.first_arrival_time)+" actual_bw:"+str(receiving_rate)+" predicted_bw:"+str(self.bandwidth_prediction)+ " isHeuristicUsed:"+str(isHeuristicUsed)+ " heuristic_overuse_flag:"+str(heuristic_overuse_flag)+ " HeuristicBW:" +str(heuristic_prediction) + " learningBW:" + str(learningBasedBWE)+" Actions:"+str(action)+" SelectedActionIdx:"+str(actionSelected)+" SeletedAction:"+str(action[0][actionSelected])+" Percentage:"+str(percentage)+" FactorH:"+str(FactorH))

it should look like this

DEBUG:root:Using model=./model/bob_2022_02_23.pth
DEBUG:root:time:0 actual_bw:70600.0 predicted_bw:300000 isHeuristicUsed:True HeuristicBW:300000
DEBUG:root:time:10 actual_bw:847200.0 predicted_bw:300000 isHeuristicUsed:True HeuristicBW:300000
DEBUG:root:Using model=./model/bob_2022_02_23.pth
DEBUG:root:time:724 actual_bw:1360000.0 predicted_bw:300000 isHeuristicUsed:True HeuristicBW:300000
DEBUG:root:time:1040 actual_bw:52187.5 predicted_bw:300000 isHeuristicUsed:True HeuristicBW:300000
DEBUG:root:time:1250 actual_bw:181658.53658536586 predicted_bw:300000 isHeuristicUsed:True HeuristicBW:300000
DEBUG:root:time:1496 actual_bw:78060.60606060606 predicted_bw:300000 isHeuristicUsed:True HeuristicBW:300000
DEBUG:root:time:1711 actual_bw:208516.1290322581 predicted_bw:300000 isHeuristicUsed:True HeuristicBW:300000
HoustonHuff commented 1 year ago

run_with_tc.sh is what I am running, and the above results are from a run using the BandwidthEstimator_bob.py that came in the repo. The plots I shared above are made with a script that I wrote that plots the data from the log files, as well as the traffic control profile which is labeled "Ground Truth"; originally I was just trying to add the traffic control so that I could see a visualization similar to the published paper, but that's when I discovered the behavior of the learning BW that seemed odd to me; I was expecting to see a poor initial prediction improve over time as the RL model learns and conforms to the TC pattern, but it just continues to oscillate in the constant range independent of the TC.