()
| 1112 | |
| 1113 | |
| 1114 | def set_realtime_params(): |
| 1115 | should_parse_args = False |
| 1116 | if mlops_parrot_enabled(MLOpsStore.mlops_args): |
| 1117 | return |
| 1118 | else: |
| 1119 | MLOpsStore.mlops_bind_result = True |
| 1120 | should_parse_args = True |
| 1121 | |
| 1122 | if should_parse_args: |
| 1123 | if MLOpsStore.mlops_args is not None: |
| 1124 | MLOpsStore.mlops_run_id = MLOpsStore.mlops_args.run_id |
| 1125 | if MLOpsStore.mlops_args.rank == 0: |
| 1126 | if hasattr(MLOpsStore.mlops_args, "server_id"): |
| 1127 | MLOpsStore.mlops_edge_id = MLOpsStore.mlops_args.server_id |
| 1128 | else: |
| 1129 | MLOpsStore.mlops_edge_id = 0 |
| 1130 | else: |
| 1131 | if hasattr(MLOpsStore.mlops_args, "client_id"): |
| 1132 | MLOpsStore.mlops_edge_id = MLOpsStore.mlops_args.client_id |
| 1133 | elif hasattr(MLOpsStore.mlops_args, "client_id_list"): |
| 1134 | MLOpsStore.mlops_edge_id = json.loads(MLOpsStore.mlops_args.client_id_list)[0] |
| 1135 | else: |
| 1136 | MLOpsStore.mlops_edge_id = 0 |
| 1137 | |
| 1138 | if hasattr(MLOpsStore.mlops_args, "server_agent_id"): |
| 1139 | MLOpsStore.server_agent_id = MLOpsStore.mlops_args.server_agent_id |
| 1140 | else: |
| 1141 | MLOpsStore.server_agent_id = MLOpsStore.mlops_edge_id |
| 1142 | |
| 1143 | return True |
| 1144 | |
| 1145 | |
| 1146 | def mlops_simulator_login(userid, run_id): |
no test coverage detected