Skip to content

Automation foundation model for tiny devices: 2-bit, 8-29 MB, tool calls, ASR, structured extraction and embeddings on phones, wearables, smart homes, robots, cars and microcontrollers.

updates

HenryNdubuaku8ced1001afa1
diff --git a/src/tpu.py b/src/tpu.py
index 6ec3691..25b1986 100644
--- a/src/tpu.py
+++ b/src/tpu.py
@@ -193,8 +193,19 @@ def tpu_create(args):
tpu_connect(args)
return
stderr = result.stderr.strip()
- last_line = stderr.splitlines()[-1] if stderr else "unknown error"
- print(f"[tpu] {zone}: {last_line}")
+ if not stderr:
+ stderr = result.stdout.strip()
+
+ if stderr and any(phrase in stderr.lower() for phrase in [
+ "active account selected",
+ "gcloud auth login",
+ "could not load the default credentials",
+ "reauth",
+ ]):
+ print(f"[tpu] AUTH ERROR:\n{stderr}", file=sys.stderr)
+ sys.exit(1)
+ first_line = stderr.splitlines()[0] if stderr else "unknown error"
+ print(f"[tpu] {zone}: {first_line}")
print(
f"[tpu] ERROR: could not create '{args.name}' in any zone.",
file=sys.stderr,