mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-23 03:46:35 +00:00
safe model saving
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import io
|
||||
import json
|
||||
import os
|
||||
from http import HTTPStatus
|
||||
from os import path
|
||||
|
||||
@@ -120,6 +121,8 @@ class ApiClient:
|
||||
part_big = resource_encrypted[part_small_size:]
|
||||
|
||||
self.cdn_manager.upload(constants.MODELS_FOLDER, big_part_name, part_big)
|
||||
|
||||
os.makedirs(folder, exist_ok=True)
|
||||
with open(path.join(folder, big_part_name), 'wb') as f:
|
||||
f.write(part_big)
|
||||
self.upload_file(small_part_name, part_small, constants.MODELS_FOLDER)
|
||||
Reference in New Issue
Block a user