Fix required_memory
This commit is contained in:
@@ -407,11 +407,11 @@ class TrainerUI(UIBase):
|
||||
# Check Cuda Memory
|
||||
if torch.cuda.is_available() and not self.is_debug:
|
||||
device = torch.device('cuda:0')
|
||||
required_memory_bytes = 40 * (1024**3)
|
||||
required_memory_bytes = 4 * (1024**3)
|
||||
try:
|
||||
tensor = torch.empty( # noqa
|
||||
(required_memory_bytes // 4, ), device=device
|
||||
) # create 18GB tensor to check the memory if enough
|
||||
) # create 4GB tensor to check the memory if enough
|
||||
del tensor
|
||||
except RuntimeError:
|
||||
raise gr.Error(self.component_names.training_err2)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) Alibaba, Inc. and its affiliates.
|
||||
|
||||
__version__ = '0.0.3'
|
||||
__version__ = '0.0.3.post1'
|
||||
|
||||
version_info = tuple(int(x) for x in __version__.split('.')[0:3])
|
||||
|
||||
|
||||
@@ -157,10 +157,10 @@ setuptools.setup(
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
'License :: OSI Approved :: Apache Software License',
|
||||
'Operating System :: OS Independent',
|
||||
],
|
||||
python_requires='>=3.8',
|
||||
install_requires=required,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user