mirror of https://github.com/skygpu/skynet.git
				
				
				
			Fix some import related TODOs
							parent
							
								
									5f5314cd35
								
							
						
					
					
						commit
						f0604f54fb
					
				| 
						 | 
					@ -7,17 +7,10 @@ import gc
 | 
				
			||||||
import logging
 | 
					import logging
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from hashlib import sha256
 | 
					from hashlib import sha256
 | 
				
			||||||
# import zipfile
 | 
					 | 
				
			||||||
# from PIL import Image
 | 
					 | 
				
			||||||
# from diffusers import DiffusionPipeline
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import trio
 | 
					import trio
 | 
				
			||||||
import torch
 | 
					import torch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# from skynet.constants import (
 | 
					 | 
				
			||||||
#     DEFAULT_INITAL_MODEL,
 | 
					 | 
				
			||||||
#     MODELS,
 | 
					 | 
				
			||||||
# )
 | 
					 | 
				
			||||||
from skynet.dgpu.errors import (
 | 
					from skynet.dgpu.errors import (
 | 
				
			||||||
    DGPUComputeError,
 | 
					    DGPUComputeError,
 | 
				
			||||||
    DGPUInferenceCancelled,
 | 
					    DGPUInferenceCancelled,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,10 @@
 | 
				
			||||||
from datetime import datetime
 | 
					 | 
				
			||||||
from functools import partial
 | 
					 | 
				
			||||||
from hashlib import sha256
 | 
					 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
import logging
 | 
					import logging
 | 
				
			||||||
import random
 | 
					import random
 | 
				
			||||||
# import traceback
 | 
					 | 
				
			||||||
import time
 | 
					import time
 | 
				
			||||||
 | 
					from datetime import datetime
 | 
				
			||||||
 | 
					from functools import partial
 | 
				
			||||||
 | 
					from hashlib import sha256
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import trio
 | 
					import trio
 | 
				
			||||||
from quart import jsonify
 | 
					from quart import jsonify
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,6 @@ import io
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
import time
 | 
					import time
 | 
				
			||||||
import logging
 | 
					import logging
 | 
				
			||||||
 | 
					 | 
				
			||||||
from pathlib import Path
 | 
					from pathlib import Path
 | 
				
			||||||
from functools import partial
 | 
					from functools import partial
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,12 +10,7 @@ import leap
 | 
				
			||||||
import anyio
 | 
					import anyio
 | 
				
			||||||
import httpx
 | 
					import httpx
 | 
				
			||||||
import outcome
 | 
					import outcome
 | 
				
			||||||
 | 
					from PIL import Image
 | 
				
			||||||
from PIL import (
 | 
					 | 
				
			||||||
    Image,
 | 
					 | 
				
			||||||
    # UnidentifiedImageError,  # TODO, remove?
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
from leap.cleos import CLEOS
 | 
					from leap.cleos import CLEOS
 | 
				
			||||||
from leap.protocol import Asset
 | 
					from leap.protocol import Asset
 | 
				
			||||||
from skynet.constants import (
 | 
					from skynet.constants import (
 | 
				
			||||||
| 
						 | 
					@ -28,8 +22,6 @@ from skynet.ipfs import (
 | 
				
			||||||
    AsyncIPFSHTTP,
 | 
					    AsyncIPFSHTTP,
 | 
				
			||||||
    get_ipfs_file,
 | 
					    get_ipfs_file,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
# TODO, remove?
 | 
					 | 
				
			||||||
# from skynet.dgpu.errors import DGPUComputeError
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
REQUEST_UPDATE_TIME: int = 3
 | 
					REQUEST_UPDATE_TIME: int = 3
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue