# import json # import numpy as np # # # def get_llm_action(index) -> np.ndarray: # with open('data/llm_action.json', 'r') as file: # data = json.load(file) # normalized_index = index % len(data) # action = np.array(data[normalized_index]) # return action # # data = get_llm_action(2) # print(data) import numpy as np import json from data_manager import DataManager data_manager = DataManager() llm_actions = json.load(open('data/results.json', 'r')) for action in llm_actions: data_manager.add_llm_element(action) month = np.random.randint(1, 13) # choose 12 month day = np.random.randint(1, 20) llm_action = data_manager.get_llm_data(month, day, 1) print(len(data_manager.LLM)) # import torch # # # def get_available_gpus(): # if torch.cuda.is_available(): # num_gpus = torch.cuda.device_count() # print(f"Number of available GPUs: {num_gpus}") # for i in range(num_gpus): # print(f"GPU {i}: {torch.cuda.get_device_name(i)}") # else: # print("No GPUs are available.") # # # get_available_gpus()