Skip to content

Commit

Permalink
[ApiServer] add comments to decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
ohad123 committed Jan 25, 2024
1 parent 799ea7b commit eb08392
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src_py/apiServer/decoderHttpMainServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
def decode_main_server_ets_str(string_to_convert: str):
result_dict = {} # {entity_name: ets_dict,...}

# Split the input string into individual key-value pairs
entity_with_stats_list = string_to_convert.split("|")[:-1] # Remove the last |
entity_with_stats_list = string_to_convert.split("|")[:-1] # Example: [c2&bytes_sent:0:int#messages_sent:8015:int#bad_messages:0:int#batches_sent:0:int#messages_received:8015:int#batches_received:0:int#bytes_received:40022:int#batches_dropped:0:int#messages_dropped:0:int#, w4^bytes_sent$0$int@empty_batches$0$int@bad_messages$0$int@batches_dropped_predict$0$int@batches_sent_predict$0$int@nan_loss_count$0$int@batches_received_predict$1001$int@batches_dropped_train$0$int@acc_time_training$0$int@bytes_received$0$int@average_time_prediction$0$int@batches_received_train$1000$int@average_time_training$0$int@acc_time_prediction$0$int@batches_sent_train$0$int@, s1&bytes_sent:0:int#messages_sent:4:int#bad_messages:0:int#batches_sent:8004:int#messages_received:7:int#batches_received:0:int#bytes_received:0:int#batches_dropped:0:int#messages_dropped:0:int#, c1&bytes_sent:54036:int#messages_sent:8016:int#bad_messages:0:int#batches_sent:0:int#messages_received:8016:int#batches_received:0:int#bytes_received:40022:int#batches_dropped:0:int#messages_dropped:0:int#, w2^bytes_sent$0$int@empty_batches$0$int@bad_messages$0$int@batches_dropped_predict$0$int@batches_sent_predict$0$int@nan_loss_count$0$int@batches_received_predict$1001$int@batches_dropped_train$0$int@acc_time_training$0$int@bytes_received$0$int@average_time_prediction$0$int@batches_received_train$1000$int@average_time_training$0$int@acc_time_prediction$0$int@batches_sent_train$0$int@, w1^bytes_sent$0$int@empty_batches$0$int@bad_messages$0$int@batches_dropped_predict$0$int@batches_sent_predict$0$int@nan_loss..]
for entity_with_stats in entity_with_stats_list:
# Example: entity_with_stats = c2&bytes_sent:0:int#messages_sent:8015:int#bad_messages:0:int#batches_sent:0:int...
if "&" in entity_with_stats:
Expand Down

0 comments on commit eb08392

Please sign in to comment.