Merge branch 'main' into dbgpt_doc

This commit is contained in:
csunny 2023-05-24 09:42:57 +08:00
commit a9f8560b48
2 changed files with 21 additions and 1 deletions

20
.readthedocs.yaml Normal file
View File

@ -0,0 +1,20 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
mkdocs:
configuration: mkdocs.yml
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt

View File

@ -33,7 +33,7 @@ def get_gpu_memory(max_gpus=None):
allocated_memory = torch.cuda.memory_allocated() / (1024 ** 3)
available_memory = total_memory - allocated_memory
gpu_memory.append(available_memory)
return gpu_memory
return gpu_memory