diff --git a/AutoDL/autodl_scheduling/entity/running_pool.py b/AutoDL/autodl_scheduling/entity/running_pool.py index c70fc83..a81cd7d 100644 --- a/AutoDL/autodl_scheduling/entity/running_pool.py +++ b/AutoDL/autodl_scheduling/entity/running_pool.py @@ -1,7 +1,5 @@ import time import traceback -import uuid -from concurrent.futures.thread import ThreadPoolExecutor from typing import Union import loguru @@ -58,7 +56,7 @@ class RunningPool: "video_file": video_file, "audio_file": audio_file } - resp = requests.post(base_url, data, headers=self._headers, allow_redirects=True, stream=True) + resp = requests.post(base_url, data, headers=self._headers, allow_redirects=True, stream=True, timeout=60) loguru.logger.info("Submit Response: %s" % resp.text) if resp.status_code == 200: if resp.json()["status"] == "success": diff --git a/AutoDL/autodl_scheduling/util/audodl_sdk.py b/AutoDL/autodl_scheduling/util/audodl_sdk.py index 18a2ea1..ecf7d1f 100644 --- a/AutoDL/autodl_scheduling/util/audodl_sdk.py +++ b/AutoDL/autodl_scheduling/util/audodl_sdk.py @@ -13,6 +13,29 @@ instances = {} LIM = 200 # 等待状态时间LIM*5s START_LIM = 20 #Heygem脚本启动等待超时时间-10 DEBUG = False +gpu_list = ["V100-SXM2-32GB", + "vGPU-32GB", + "RTX 4090", + "RTX 4090D", + "RTX 3090", + "RTX 3080", + "RTX 3080x2", + "RTX 3080 Ti", + "RTX 3060", + "RTX A4000", + "RTX 2080 Ti", + "RTX 2080 Ti x2", + "GTX 1080 Ti"] +area_list = ["nm-B1", + "nm-B2", + "west-B", + "west-C", + "west-X", + "bj-B1", + "beijing-A", + "beijing-B", + "beijing-D", + "beijing-E"] def ssh_try(host,port,pwd,uid): # 建立连接 @@ -53,7 +76,7 @@ def get_autodl_machines() -> Union[list, None]: payload = { "charge_type":"payg", "region_sign":"", - "gpu_type_name":["V100-SXM2-32GB", "vGPU-32GB", "RTX 4090", "RTX 4090D", "RTX 3090", "RTX 3080", "RTX 3080x2", "RTX 3080 Ti", "RTX 3060", "RTX A4000", "RTX 2080 Ti", "RTX 2080 Ti x2", "GTX 1080 Ti"], + "gpu_type_name": gpu_list, "machine_tag_name":[], "gpu_idle_num":1, "mount_net_disk":False, @@ -66,7 +89,7 @@ def get_autodl_machines() -> Union[list, None]: "pay_price_order":"", "gpu_idle_type":"", "default_order":False, - "region_sign_list":["nm-B1","nm-B2", "west-B", "west-C", "west-X", "bj-B1", "beijing-A", "beijing-B", "beijing-D", "beijing-E"], + "region_sign_list": area_list, "cpu_arch":["x86"], "chip_corp":["nvidia"], "machine_id":""