tangle-cli 0.1.4__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/PKG-INFO +1 -1
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/__init__.py +1 -1
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/component_from_func.py +22 -22
- tangle_cli-0.1.5/packages/tangle-cli/src/tangle_cli/pipeline_compiler.py +2263 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_run_manager.py +28 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_runner.py +8 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipelines.py +47 -1
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipelines_cli.py +73 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/__init__.py +2 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/cfg.py +2 -2
- tangle_cli-0.1.5/packages/tangle-cli/src/tangle_cli/python_pipeline/dynamic_data.py +44 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/emit.py +17 -9
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/ref.py +6 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/registered.py +4 -2
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/task.py +26 -4
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/task_env.py +7 -7
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/trace.py +1 -1
- tangle_cli-0.1.5/packages/tangle-cli/src/tangle_cli/schema_validation.py +458 -0
- tangle_cli-0.1.5/packages/tangle-cli/src/tangle_cli/schemas/dehydrated_pipeline_schema.json +282 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/pyproject.toml +1 -1
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/README.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/api_cli.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/api_schema.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/api_transport.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/args_container.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/artifacts.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/artifacts_cli.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/cli.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/cli_helpers.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/cli_options.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/client.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/component_generator.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/component_inspector.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/component_publisher.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/components_cli.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/dynamic_discovery_client.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/generated_model_extensions.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/handler.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/hydration_trust.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/logger.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/models.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/module_bundler.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/openapi/__init__.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/openapi/codegen.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/openapi/parser.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_dehydrator.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_hydrator.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_run_annotations.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_run_details.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_run_search.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_runs_cli.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_spec_utils.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/pipeline_validation.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/published_components_cli.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/py.typed +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/compiler_context.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/errors.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/graph.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/ids.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/pipeline.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/placeholders.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/raw.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/subpipeline.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/python_pipeline/types.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/quickstart.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/schemas/__init__.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/schemas/pipeline_schema.json +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/secrets.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/secrets_cli.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/utils.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/version_manager.py +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/OSS-CONVENTIONS.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/PORT-README.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/SKILL.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/agents/auth-wizard.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/agents/builder.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/agents/debugger.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/agents/reporter.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/agents/researcher.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/agents/reviewer.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/agents/scenario-builder.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/data-sources.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/event-log.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/example-scenarios/01-mslr-ranking.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/example-scenarios/02-text-classification.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/example-scenarios/INDEX.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/iterating-on-runs.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/knowledge-corpus.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/secrets.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/setup.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-0-initialize.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-1-analyze.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-2-hypothesize.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-3-submit.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-4-monitor.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-5-evaluate.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-6-synthesize.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/step-7-decide.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/tangle-tools.md +0 -0
- {tangle_cli-0.1.4 → tangle_cli-0.1.5}/skills/tangent/references/uploading-artifacts.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: tangle-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: CLI for Tangle, the open-source ML pipeline orchestration platform
|
|
5
5
|
Author: Alexey Volkov, Tangle authors, Volv Grebennikov
|
|
6
6
|
Author-email: Alexey Volkov <alexey.volkov@ark-kun.com>, Volv Grebennikov <volv.grebennikov@shopify.com>
|
|
@@ -14,6 +14,6 @@ from tangle_cli.dynamic_discovery_client import TangleDynamicDiscoveryClient
|
|
|
14
14
|
try:
|
|
15
15
|
__version__ = metadata_version("tangle-cli")
|
|
16
16
|
except PackageNotFoundError:
|
|
17
|
-
__version__ = "0.1.
|
|
17
|
+
__version__ = "0.1.5"
|
|
18
18
|
|
|
19
19
|
__all__ = ["TangleDynamicDiscoveryClient", "__version__"]
|
{tangle_cli-0.1.4 → tangle_cli-0.1.5}/packages/tangle-cli/src/tangle_cli/component_from_func.py
RENAMED
|
@@ -785,11 +785,11 @@ class AuthoringStripError(ValueError):
|
|
|
785
785
|
authoring alias must be stripped, but line-deletion would take ``os`` with
|
|
786
786
|
it); or
|
|
787
787
|
- a ``@task(env=...)`` env binding entangled with runtime code — e.g. a
|
|
788
|
-
mixed ``from _envs import
|
|
788
|
+
mixed ``from _envs import TRAINING, helper`` import whose ``helper`` is used at
|
|
789
789
|
runtime, or a collected env name referenced by the kept task body.
|
|
790
790
|
|
|
791
791
|
Failing fast here is intentional: silently baking a broken ``import os`` /
|
|
792
|
-
``from _envs import
|
|
792
|
+
``from _envs import TRAINING`` / ``TRAINING = TaskEnv(...)`` would only surface as a
|
|
793
793
|
``NameError`` / ``ImportError`` at container start. The message tells the
|
|
794
794
|
author how to split the import or keep TaskEnv values authoring-only.
|
|
795
795
|
"""
|
|
@@ -889,9 +889,9 @@ def _env_keyword_binding_name(call: ast.Call) -> str | None:
|
|
|
889
889
|
returns the name of the module-level binding that must also be stripped so
|
|
890
890
|
the baked runtime program does not crash referencing an authoring-only name:
|
|
891
891
|
|
|
892
|
-
- ``env=
|
|
893
|
-
``
|
|
894
|
-
- ``env=_envs.
|
|
892
|
+
- ``env=TRAINING`` -> ``"TRAINING"`` (a module-level env *binding* to strip, either an
|
|
893
|
+
``TRAINING = TaskEnv(...)`` assignment or a ``from _envs import TRAINING`` import);
|
|
894
|
+
- ``env=_envs.TRAINING`` -> ``"_envs"`` (the module-alias root, so the
|
|
895
895
|
``import _envs`` line can be stripped);
|
|
896
896
|
- ``env=TaskEnv(...)`` / ``env=tp.TaskEnv(...)`` (inline) -> ``None``: the
|
|
897
897
|
whole decorator line range is already deleted, so there is no residual
|
|
@@ -917,8 +917,8 @@ def _is_task_env_construction(value: ast.expr | None) -> bool:
|
|
|
917
917
|
|
|
918
918
|
Matched by trailing call name (mirroring ``_decorator_called_name``), so
|
|
919
919
|
both ``TaskEnv(image=...)`` and ``tp.TaskEnv(image=...)`` qualify. Used to
|
|
920
|
-
detect module-level env declarations like ``
|
|
921
|
-
of whether a ``@task(env=
|
|
920
|
+
detect module-level env declarations like ``TRAINING = TaskEnv(...)`` regardless
|
|
921
|
+
of whether a ``@task(env=TRAINING)`` references them.
|
|
922
922
|
"""
|
|
923
923
|
return isinstance(value, ast.Call) and _decorator_called_name(value) == _AUTHORING_ENV_CLASS_NAME
|
|
924
924
|
|
|
@@ -926,8 +926,8 @@ def _is_task_env_construction(value: ast.expr | None) -> bool:
|
|
|
926
926
|
def _import_bound_names(node: ast.Import | ast.ImportFrom) -> dict[str, ast.alias]:
|
|
927
927
|
"""Map each name a top-level import binds into the namespace to its alias.
|
|
928
928
|
|
|
929
|
-
- ``from m import
|
|
930
|
-
- ``from m import
|
|
929
|
+
- ``from m import TRAINING`` -> ``{"TRAINING": alias}``
|
|
930
|
+
- ``from m import TRAINING as U`` -> ``{"U": alias}``
|
|
931
931
|
- ``import _envs`` -> ``{"_envs": alias}`` (root of a dotted module path)
|
|
932
932
|
- ``import a.b.c`` -> ``{"a": alias}``
|
|
933
933
|
- ``import envs as task_envs`` -> ``{"task_envs": alias}``
|
|
@@ -951,7 +951,7 @@ def _annotation_name_node_ids(tree: ast.AST) -> set[int]:
|
|
|
951
951
|
(which runs AFTER ``_strip_authoring_constructs``), so a name that appears
|
|
952
952
|
ONLY in an annotation is NOT a live runtime reference. Excluding these from
|
|
953
953
|
the fail-fast reference scan prevents a false positive where an env name
|
|
954
|
-
used only as a parameter/return type annotation (``def f(x:
|
|
954
|
+
used only as a parameter/return type annotation (``def f(x: TRAINING) -> TRAINING:``)
|
|
955
955
|
is mistaken for a kept runtime reference (FIX N1, §3.5).
|
|
956
956
|
|
|
957
957
|
Annotation slots covered (matching ``_strip_type_hints_ast``):
|
|
@@ -1029,17 +1029,17 @@ def _strip_authoring_constructs(source_code: str) -> str:
|
|
|
1029
1029
|
TaskEnv authoring-strip hardening (``@task(env=...)``): an env
|
|
1030
1030
|
declaration that exists ONLY to feed a stripped ``@task(env=...)`` decorator
|
|
1031
1031
|
would otherwise crash the baked program (``NameError: TaskEnv`` for a
|
|
1032
|
-
co-located ``
|
|
1033
|
-
``ImportError`` for a ``from _envs import
|
|
1032
|
+
co-located ``TRAINING = TaskEnv(...)`` whose import was stripped, or
|
|
1033
|
+
``ImportError`` for a ``from _envs import TRAINING`` whose module is not in the
|
|
1034
1034
|
runtime image). On top of the import/decorator strip this also removes, by
|
|
1035
1035
|
line range:
|
|
1036
1036
|
|
|
1037
1037
|
- every module-level ``X = TaskEnv(...)`` / ``X: TaskEnv = TaskEnv(...)``
|
|
1038
1038
|
declaration (direct ``TaskEnv(...)`` construction), and
|
|
1039
1039
|
- module-level bindings (assignment OR import) of any name a stripped
|
|
1040
|
-
``@task(env=...)`` referenced — ``env=
|
|
1041
|
-
(``
|
|
1042
|
-
|
|
1040
|
+
``@task(env=...)`` referenced — ``env=TRAINING`` collects ``TRAINING``
|
|
1041
|
+
(``TRAINING = TaskEnv(...)`` / ``TRAINING = make_task_env(...)`` / ``from _envs import
|
|
1042
|
+
TRAINING``); ``env=_envs.TRAINING`` collects the module alias ``_envs``
|
|
1043
1043
|
(``import _envs``).
|
|
1044
1044
|
|
|
1045
1045
|
It is deliberately narrow: only names PROVEN to participate in a stripped
|
|
@@ -1047,7 +1047,7 @@ def _strip_authoring_constructs(source_code: str) -> str:
|
|
|
1047
1047
|
are removed. It is NOT a general unused-import cleaner. It raises
|
|
1048
1048
|
:class:`AuthoringStripError` (fail-fast) rather than bake a broken program
|
|
1049
1049
|
when an env binding is entangled with runtime code: a mixed
|
|
1050
|
-
``from _envs import
|
|
1050
|
+
``from _envs import TRAINING, helper`` whose ``helper`` is used at runtime, or a
|
|
1051
1051
|
collected env name still referenced by the kept task body.
|
|
1052
1052
|
|
|
1053
1053
|
This intentionally operates on ``module_source_stripped`` ONLY. It must never
|
|
@@ -1148,10 +1148,10 @@ def _strip_authoring_constructs(source_code: str) -> str:
|
|
|
1148
1148
|
# Restricted to module-level statements (``tree.body``) so nested code is
|
|
1149
1149
|
# never touched. Two kinds of statement are stripped:
|
|
1150
1150
|
# 1. assignments that construct a TaskEnv directly (``X = TaskEnv(...)``)
|
|
1151
|
-
# or whose target is a collected env name (``
|
|
1152
|
-
# when ``@task(env=
|
|
1151
|
+
# or whose target is a collected env name (``TRAINING = make_task_env(...)``
|
|
1152
|
+
# when ``@task(env=TRAINING)`` was seen), and
|
|
1153
1153
|
# 2. imports that bind a collected env name/module (``from _envs import
|
|
1154
|
-
#
|
|
1154
|
+
# TRAINING`` / ``import _envs``) when that name is env-only.
|
|
1155
1155
|
#
|
|
1156
1156
|
# We record each candidate's bound name(s) + line range, then verify (after
|
|
1157
1157
|
# a reference scan) that removing it cannot break kept runtime code.
|
|
@@ -1184,12 +1184,12 @@ def _strip_authoring_constructs(source_code: str) -> str:
|
|
|
1184
1184
|
|
|
1185
1185
|
# Reference scan: every ``Name`` used in a ``Load`` context, mapped to the
|
|
1186
1186
|
# 1-indexed lines it appears on. Attribute roots (``_envs`` in
|
|
1187
|
-
# ``_envs.
|
|
1187
|
+
# ``_envs.TRAINING``) are plain ``Name`` Load nodes too, so this covers them.
|
|
1188
1188
|
#
|
|
1189
1189
|
# FIX N1 (§3.5): exclude ``Name`` nodes that live in a type-annotation slot
|
|
1190
1190
|
# (param/return/AnnAssign). Annotations are stripped from the baked output by
|
|
1191
1191
|
# ``_strip_type_hints`` (which runs later), so an env name used ONLY as a
|
|
1192
|
-
# type annotation (``def f(x:
|
|
1192
|
+
# type annotation (``def f(x: TRAINING) -> TRAINING:``) is NOT a live runtime
|
|
1193
1193
|
# reference and must not trip the body-ref fail-fast. A real body reference
|
|
1194
1194
|
# (outside annotations) still records a Load and still fails fast.
|
|
1195
1195
|
if env_assign_bindings or env_import_candidates:
|
|
@@ -1234,7 +1234,7 @@ def _strip_authoring_constructs(source_code: str) -> str:
|
|
|
1234
1234
|
"statement with runtime name(s) "
|
|
1235
1235
|
+ ", ".join(used_others)
|
|
1236
1236
|
+ ". Split the import so TaskEnv env names are imported on "
|
|
1237
|
-
"their own line (e.g. `from _envs import
|
|
1237
|
+
"their own line (e.g. `from _envs import TRAINING` separate from "
|
|
1238
1238
|
"`from _envs import helper`); env imports are authoring-only "
|
|
1239
1239
|
"and stripped from the baked runtime program."
|
|
1240
1240
|
)
|