fixes, hash fix

This commit is contained in:
Alex Bezdieniezhnykh
2025-05-31 18:06:14 +03:00
parent 8f3059be0c
commit c0a671a60b
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ class ApiClient:
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
print('500!')
hw_hash = Security.get_hw_hash(hardware)
hw_hash = Security.get_hw_hash(hardware_str)
key = Security.get_api_encryption_key(self.credentials, hw_hash)
resp_bytes = response.raw.read()
+5 -5
View File
@@ -13,12 +13,12 @@ from security import Security
# resume_training('/azaion/dev/ai-training/runs/detect/train12/weights/last.pt')
result_dir = '/azaion/dev/ai-training/runs/detect/train12'
model_dir = path.join(models_dir, f'{prefix}2025-05-18')
shutil.copytree(result_dir, model_dir, dirs_exist_ok=True)
# result_dir = '/azaion/dev/ai-training/runs/detect/train12'
# model_dir = path.join(models_dir, f'{prefix}2025-05-18')
# shutil.copytree(result_dir, model_dir, dirs_exist_ok=True)
#
model_path = path.join(models_dir, f'{prefix[:-1]}.pt')
shutil.copy(path.join(model_dir, 'weights', 'best.pt'), model_path)
# shutil.copy(path.join(model_dir, 'weights', 'best.pt'), model_path)
api_client = ApiClient()
onnx_path = export_onnx(model_path)
+1 -1
View File
@@ -54,7 +54,7 @@ class Security:
@staticmethod
def get_hw_hash(hardware):
key = f'Azaion_{hardware.mac_address}_{hardware.cpu}_{hardware.gpu}'
key = f'Azaion_{hardware}_%$$$)0_'
return Security.calc_hash(key)
@staticmethod