datatorch 0.6.1__tar.gz → 0.6.2__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.
- {datatorch-0.6.1 → datatorch-0.6.2}/PKG-INFO +1 -1
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/client.py +2 -6
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/resolver.py +5 -4
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/step/step.py +1 -3
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/template.py +2 -6
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch.egg-info/PKG-INFO +1 -1
- {datatorch-0.6.1 → datatorch-0.6.2}/setup.py +1 -1
- {datatorch-0.6.1 → datatorch-0.6.2}/README.md +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/agent.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/directory.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/log_handler.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/logging.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/monitoring.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/action/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/action/action.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/action/cache.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/action/config.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/job/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/job/job.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/pipeline.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/command.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/docker.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/factory.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/node.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/python.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/runner.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/runner/shell.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/pipelines/step/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/services/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/utils/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/utils/docker.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/agent/utils/process.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/api.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/client.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/annotation.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/base.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/dataset.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/file.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/label.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/project.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/settings.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/sources/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/sources/image/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/sources/image/bounding_box.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/sources/image/segmentations.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/sources/image/typings.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/sources/source.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/storage_link.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/entity/user.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/scripts/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/scripts/import_coco.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/scripts/import_pixmask.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/scripts/utils/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/scripts/utils/simplify.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/utils.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/api/where.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/action/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/action/create.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/action/pull.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/action/run.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/agent/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/agent/create.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/agent/dir.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/agent/start.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/groups.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/import_cmds/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/import_cmds/coco.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/import_cmds/pixmask.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/main/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/main/login.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/main/logout.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/main/upgrade.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/main/version.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/pipeline/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/pipeline/generate.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/pipeline/run.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/pipeline/upload.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/spinner.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/upload/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/upload/folder.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/cli/utils.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/core/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/core/env.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/core/folder.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/core/settings.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/__init__.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/converters.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/files.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/hash_table.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/objects.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/package.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/string_style.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch/utils/url.py +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch.egg-info/SOURCES.txt +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch.egg-info/dependency_links.txt +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch.egg-info/entry_points.txt +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch.egg-info/not-zip-safe +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch.egg-info/requires.txt +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/datatorch.egg-info/top_level.txt +0 -0
- {datatorch-0.6.1 → datatorch-0.6.2}/setup.cfg +0 -0
|
@@ -78,9 +78,7 @@ class AgentApiClient(object):
|
|
|
78
78
|
}
|
|
79
79
|
""" % STEP_DISPATCH_FIELDS)
|
|
80
80
|
# fmt: on
|
|
81
|
-
return cast(
|
|
82
|
-
AsyncGenerator[AgentStepRequest, None], self.session.subscribe(sub)
|
|
83
|
-
)
|
|
81
|
+
return cast(AsyncGenerator[AgentStepRequest, None], self.session.subscribe(sub))
|
|
84
82
|
|
|
85
83
|
def agent_step_cancels(self):
|
|
86
84
|
"""Subscribe to stop signals for steps this agent is running.
|
|
@@ -156,9 +154,7 @@ class AgentApiClient(object):
|
|
|
156
154
|
step_input["renderedInput"] = rendered_input
|
|
157
155
|
if error_message is not None:
|
|
158
156
|
step_input["errorMessage"] = error_message
|
|
159
|
-
result = await self.execute(
|
|
160
|
-
mutate, params={"id": step_id, "input": step_input}
|
|
161
|
-
)
|
|
157
|
+
result = await self.execute(mutate, params={"id": step_id, "input": step_input})
|
|
162
158
|
return bool(result.get("completed"))
|
|
163
159
|
|
|
164
160
|
def initial_metrics(self, metrics):
|
|
@@ -20,6 +20,7 @@ outputs are supplied and such a reference resolves as unresolvable, i.e.
|
|
|
20
20
|
raises rather than passing a literal ``${{ }}`` to the action. A yaml that
|
|
21
21
|
uses job dependencies is a server-executed workflow.
|
|
22
22
|
"""
|
|
23
|
+
|
|
23
24
|
import json
|
|
24
25
|
import re
|
|
25
26
|
from typing import Any, Dict, List, Set, Tuple
|
|
@@ -29,7 +30,9 @@ from typing import Any, Dict, List, Set, Tuple
|
|
|
29
30
|
# The name group is ``[^}]+?`` (not ``.+?``) so it can't backtrack across a
|
|
30
31
|
# ``}}`` boundary — a string that both starts and ends with a ref must not be
|
|
31
32
|
# mistaken for one spanning ref.
|
|
32
|
-
STEP_REF =
|
|
33
|
+
STEP_REF = (
|
|
34
|
+
r"\$\{\{\s*steps\.(?P<stepName>[^}]+?)\.outputs?\.(?P<stepKey>[\w.\-]+)\s*\}\}"
|
|
35
|
+
)
|
|
33
36
|
INPUT_REF = r"\$\{\{\s*inputs?\.(?P<inputKey>[\w.\-]+)\s*\}\}"
|
|
34
37
|
JOB_REF = r"\$\{\{\s*jobs\.(?P<jobName>[^}]+?)\.outputs?\.(?P<jobKey>[\w.\-]+)\s*\}\}"
|
|
35
38
|
|
|
@@ -123,9 +126,7 @@ def _resolve(
|
|
|
123
126
|
]
|
|
124
127
|
if isinstance(value, dict):
|
|
125
128
|
return {
|
|
126
|
-
k: _resolve(
|
|
127
|
-
v, outputs_by_name, trigger_input, job_outputs_by_name, misses
|
|
128
|
-
)
|
|
129
|
+
k: _resolve(v, outputs_by_name, trigger_input, job_outputs_by_name, misses)
|
|
129
130
|
for k, v in value.items()
|
|
130
131
|
}
|
|
131
132
|
return value
|
|
@@ -25,9 +25,7 @@ class Step(object):
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
@classmethod
|
|
28
|
-
def from_dispatch(
|
|
29
|
-
cls, dispatch: "AgentStepDispatch", api: "AgentApiClient" = None
|
|
30
|
-
):
|
|
28
|
+
def from_dispatch(cls, dispatch: "AgentStepDispatch", api: "AgentApiClient" = None):
|
|
31
29
|
return cls(
|
|
32
30
|
id=dispatch.get("stepId"),
|
|
33
31
|
action=dispatch.get("action", ""),
|
|
@@ -17,9 +17,7 @@ if typing.TYPE_CHECKING:
|
|
|
17
17
|
# data (trigger payloads, fetched step outputs); splicing them into a shell
|
|
18
18
|
# string is command injection, so shell/cmd runners must read them from
|
|
19
19
|
# $INPUT_<NAME> env vars instead.
|
|
20
|
-
_INPUT_REF_IN_TEMPLATE = re.compile(
|
|
21
|
-
r"\$\{[{%][^}]*?(?<![.\w])(?:input|variable)(?!\w)"
|
|
22
|
-
)
|
|
20
|
+
_INPUT_REF_IN_TEMPLATE = re.compile(r"\$\{[{%][^}]*?(?<![.\w])(?:input|variable)(?!\w)")
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
class InputInjectionError(Exception):
|
|
@@ -146,9 +144,7 @@ class Variables(object):
|
|
|
146
144
|
"policy; see docs/Pipelines.md.)"
|
|
147
145
|
)
|
|
148
146
|
context = {
|
|
149
|
-
k: v
|
|
150
|
-
for k, v in self.variables.items()
|
|
151
|
-
if k not in ("input", "variable")
|
|
147
|
+
k: v for k, v in self.variables.items() if k not in ("input", "variable")
|
|
152
148
|
}
|
|
153
149
|
return self._template(string).render({**global_variables, **context})
|
|
154
150
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|