Skip to content

Commit

Permalink
[SHUTDOWN{}
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Mar 20, 2024
1 parent fa5bec5 commit e134ab7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "swarms-cloud"
version = "0.1.3"
version = "0.1.6"
description = "Swarms Cloud - Pytorch"
license = "MIT"
authors = ["Kye Gomez <[email protected]>"]
Expand All @@ -30,7 +30,10 @@ torch = "*"
einops = "*"
pydantic = "*"
stripe = "*"
transformers = "*"
sse-starlette = "*"
uvicorn = "*"
shortuuid = "*"

[tool.poetry.group.lint.dependencies]
ruff = ">=0.1.6,<0.4.0"
Expand Down
4 changes: 2 additions & 2 deletions servers/cogvlm/cogvlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def lifespan(app: FastAPI):


# On startup
@app.on_event("startup")
@app.on_startup()
async def load_model():
global model, tokenizer, torch_type, QUANT_ENABLED

Expand Down Expand Up @@ -431,7 +431,7 @@ def generate_stream_cogvlm(
yield ret


@app.on_event("shutdown")
@app.on_shutdown()
async def shutdown_event():
print("Application shutdown, cleaning up artifacts")
try:
Expand Down
File renamed without changes.

0 comments on commit e134ab7

Please sign in to comment.