Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

test(compose): require the documented ${VAR:-} form so a dtype is never pinned or made required

Aashishb4a06f0d988a
diff --git a/tests/test_compose_env.py b/tests/test_compose_env.py
index 06e8b2e9..d29d11d6 100644
--- a/tests/test_compose_env.py
+++ b/tests/test_compose_env.py
@@ -151,12 +151,14 @@ for rel in COMPOSE_FILES:
"%s is read by the runtime but the rendered container would not get it"
% name)
if value is not None:
- # A passthrough, not a decision made for every deployment: `${NAME:-...}` or
- # `${NAME}`, so the host (or `.env`) still chooses the dtype.
+ # A passthrough *with a default*, not a bare `${NAME}`: without the `:-` a
+ # deployment that never mentions the variable is treated as asking for it, and
+ # the default here has a meaning the core implements (empty = the checkpoint's
+ # own amp_dtype).
check_true("compose/%s/%s/%s is a host passthrough" % (rel, service, name),
- re.match(r'^"\$\{%s(:-[^"}]*)?\}"$' % name, value) is not None,
- "%s: %r -- hardcoding a dtype here would pin it for every user"
- % (name, value))
+ re.match(r'^"\$\{%s:-[^"}]*\}"$' % name, value) is not None,
+ "%s: %r -- hardcoding or requiring a dtype here would pin it for "
+ "every user" % (name, value))
# 3. an empty default has to mean "the checkpoint's own dtype", which is what these images shipped
# before this change. Parsed out of the core so the claim is checked, not assumed.