mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 09:06:35 +00:00
fixes, hash fix
This commit is contained in:
+1
-1
@@ -88,7 +88,7 @@ class ApiClient:
|
|||||||
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
|
if response.status_code == HTTPStatus.INTERNAL_SERVER_ERROR:
|
||||||
print('500!')
|
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)
|
key = Security.get_api_encryption_key(self.credentials, hw_hash)
|
||||||
|
|
||||||
resp_bytes = response.raw.read()
|
resp_bytes = response.raw.read()
|
||||||
|
|||||||
+5
-5
@@ -13,12 +13,12 @@ from security import Security
|
|||||||
|
|
||||||
# resume_training('/azaion/dev/ai-training/runs/detect/train12/weights/last.pt')
|
# resume_training('/azaion/dev/ai-training/runs/detect/train12/weights/last.pt')
|
||||||
|
|
||||||
result_dir = '/azaion/dev/ai-training/runs/detect/train12'
|
# result_dir = '/azaion/dev/ai-training/runs/detect/train12'
|
||||||
model_dir = path.join(models_dir, f'{prefix}2025-05-18')
|
# model_dir = path.join(models_dir, f'{prefix}2025-05-18')
|
||||||
shutil.copytree(result_dir, model_dir, dirs_exist_ok=True)
|
# shutil.copytree(result_dir, model_dir, dirs_exist_ok=True)
|
||||||
|
#
|
||||||
model_path = path.join(models_dir, f'{prefix[:-1]}.pt')
|
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()
|
api_client = ApiClient()
|
||||||
onnx_path = export_onnx(model_path)
|
onnx_path = export_onnx(model_path)
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ class Security:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_hw_hash(hardware):
|
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)
|
return Security.calc_hash(key)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user