Skip to content

Commit

Permalink
Fix deprecations of run_inside (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbern authored Dec 21, 2023
1 parent a444e5d commit ef7dee3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 06_gpu_and_ml/blender/blender_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# enabling the GPU device.
# To do this, we use the `stub.image.run.inside()` context manager.

with stub.image.run_inside():
with stub.image.imports():
import bpy

# NOTE: Blender segfaults if you try to do this after the other imports.
Expand Down
2 changes: 1 addition & 1 deletion 06_gpu_and_ml/stable_lm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def format_prompt(instruction: str) -> str:
return f"<|USER|>{instruction}<|ASSISTANT|>"


with stub.image.run_inside():
with stub.image.imports():
import uuid

import msgspec
Expand Down
2 changes: 1 addition & 1 deletion misc/news_summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def fetch_model(local_files_only: bool = False):
)


with scraping_image.run_inside():
with scraping_image.imports():
import requests
from bs4 import BeautifulSoup

Expand Down

0 comments on commit ef7dee3

Please sign in to comment.