Skip to content

Commit 37aa44b

Browse files
authored
Merge pull request #23 from transformerlab/fix/lattice-machine-workspace
Add a variable to return the correct workspace directory when the env var is set
2 parents 8f24111 + 7891bf4 commit 37aa44b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "transformerlab"
7-
version = "0.0.16"
7+
version = "0.0.17"
88
description = "Python SDK for Transformer Lab"
99
readme = "README.md"
1010
requires-python = ">=3.10"

src/lab/dirs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ def set_organization_id(organization_id: str | None) -> None:
2727

2828

2929
def get_workspace_dir() -> str:
30+
# Remote SkyPilot workspace override (highest precedence)
31+
# Only return container workspace path when value is exactly "true"
32+
if os.getenv("_TFL_REMOTE_SKYPILOT_WORKSPACE") == "true":
33+
return "/workspace"
34+
3035
# Explicit override wins
3136
if "TFL_WORKSPACE_DIR" in os.environ:
3237
value = os.environ["TFL_WORKSPACE_DIR"]

0 commit comments

Comments
 (0)