Beispiel #1
0
 def __init__(self, session_uuid: str, open_browser):
     api_caller = ApiCaller(computer_singleton().web_api.url,
                            {'computer_uuid': computer_singleton().uuid, 'session_uuid': session_uuid},
                            timeout_seconds=120,
                            daemon=True)
     self.writer = Writer(api_caller, frequency=computer_singleton().web_api.frequency)
     self.header = Header(api_caller,
                          frequency=computer_singleton().web_api.frequency,
                          open_browser=open_browser)
     self.scanner = Scanner()
Beispiel #2
0
 def __init__(self):
     api_caller = ApiCaller(computer_singleton().web_api.url,
                            {'computer_uuid': computer_singleton().uuid},
                            15)
     self.writer = Writer(api_caller,
                          frequency=computer_singleton().web_api.frequency)
     self.header = Header(
         api_caller,
         frequency=computer_singleton().web_api.frequency,
         open_browser=computer_singleton().web_api.open_browser)
     self.data = {}
Beispiel #3
0
 def __init__(self, session_uuid: str):
     api_caller = ApiCaller(computer_singleton().web_api.url,
                            {'computer_uuid': computer_singleton().uuid, 'session_uuid': session_uuid},
                            timeout_seconds=15,
                            daemon=True)
     self.writer = Writer(api_caller, frequency=computer_singleton().web_api.frequency)
     self.header = Header(api_caller,
                          frequency=computer_singleton().web_api.frequency,
                          open_browser=computer_singleton().web_api.open_browser)
     self.data = {}
     self.cache = {}
     self.nvml = None
     self.n_gpu = 0
     try:
         from py3nvml import py3nvml as nvml
         self.nvml = nvml
     except ImportError:
         labml_notice('Install py3nvml to monitor GPUs:\n pip install py3nvml',
                      is_warn=False)