Spaces:
Running
Running
fix: use disk-backed root-controlled smoke staging
Browse files
scripts/smoke_content_ai.py
CHANGED
|
@@ -222,8 +222,11 @@ def one(
|
|
| 222 |
operator: str,
|
| 223 |
index: int,
|
| 224 |
) -> dict[str, Any]:
|
|
|
|
|
|
|
|
|
|
| 225 |
with tempfile.TemporaryDirectory(
|
| 226 |
-
prefix="lumi-content-smoke-", dir=
|
| 227 |
) as raw:
|
| 228 |
root = Path(raw)
|
| 229 |
# Inputs stay in a root-controlled pathname so an approval can bind
|
|
|
|
| 222 |
operator: str,
|
| 223 |
index: int,
|
| 224 |
) -> dict[str, Any]:
|
| 225 |
+
# Keep the fixture below the root-controlled asset tree. The model can be
|
| 226 |
+
# hundreds of MiB, while /run is a small tmpfs on many native hosts; using
|
| 227 |
+
# the disk-backed asset parent also lets the hard-link path stay cheap.
|
| 228 |
with tempfile.TemporaryDirectory(
|
| 229 |
+
prefix="lumi-content-smoke-", dir=str(model.parent.parent)
|
| 230 |
) as raw:
|
| 231 |
root = Path(raw)
|
| 232 |
# Inputs stay in a root-controlled pathname so an approval can bind
|
scripts/smoke_safetensors_ai.py
CHANGED
|
@@ -166,8 +166,11 @@ def one(
|
|
| 166 |
operator: str,
|
| 167 |
index: int,
|
| 168 |
) -> dict[str, Any]:
|
|
|
|
|
|
|
|
|
|
| 169 |
with tempfile.TemporaryDirectory(
|
| 170 |
-
prefix="lumi-safetensors-smoke-", dir=
|
| 171 |
) as raw:
|
| 172 |
root = Path(raw)
|
| 173 |
# Approval-bound inputs live below a root-controlled directory. Only
|
|
|
|
| 166 |
operator: str,
|
| 167 |
index: int,
|
| 168 |
) -> dict[str, Any]:
|
| 169 |
+
# Keep the fixture below the root-controlled asset tree. Safetensors
|
| 170 |
+
# weights can be large, while /run is a small tmpfs on many native hosts;
|
| 171 |
+
# the disk-backed asset parent avoids a staging-space false failure.
|
| 172 |
with tempfile.TemporaryDirectory(
|
| 173 |
+
prefix="lumi-safetensors-smoke-", dir=str(model.parent.parent)
|
| 174 |
) as raw:
|
| 175 |
root = Path(raw)
|
| 176 |
# Approval-bound inputs live below a root-controlled directory. Only
|