icmd-python 3.3.4__py3-none-any.whl → 3.10.0__py3-none-any.whl
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.
- icmd/__init__.py +12 -0
- icmd/_vendor/assembler.py +16 -8
- icmd/apps/agent.py +12 -1
- icmd/apps/base.py +1 -1
- icmd/apps/jobs.py +844 -121
- icmd/apps/results.py +352 -105
- icmd/apps/results_store.py +309 -0
- icmd/apps/suite.py +26 -1
- icmd/apps/transfer.py +895 -0
- icmd/cli/__init__.py +16 -6
- icmd/cli/account.py +4 -1
- icmd/cli/commands.py +227 -21
- icmd/cli/registry.py +6 -1
- icmd/client.py +23 -17
- icmd/compose.py +12 -9
- icmd/core/advisory.py +80 -28
- icmd/core/contracts.py +33 -18
- icmd/core/credentials.py +41 -28
- icmd/core/exceptions.py +143 -0
- icmd/core/model_classes.py +14 -8
- icmd/core/session.py +35 -23
- icmd/types.py +66 -40
- icmd/version.py +1 -1
- {icmd_python-3.3.4.dist-info → icmd_python-3.10.0.dist-info}/METADATA +11 -2
- icmd_python-3.10.0.dist-info/RECORD +52 -0
- icmd_python-3.3.4.dist-info/RECORD +0 -50
- {icmd_python-3.3.4.dist-info → icmd_python-3.10.0.dist-info}/WHEEL +0 -0
- {icmd_python-3.3.4.dist-info → icmd_python-3.10.0.dist-info}/entry_points.txt +0 -0
- {icmd_python-3.3.4.dist-info → icmd_python-3.10.0.dist-info}/licenses/LICENSE +0 -0
- {icmd_python-3.3.4.dist-info → icmd_python-3.10.0.dist-info}/top_level.txt +0 -0
icmd/__init__.py
CHANGED
|
@@ -6,14 +6,20 @@ from .core.advisory import AdvisoryFinding, ContractProvider, check_input_dict
|
|
|
6
6
|
from .core.contracts import ContractClient, ContractTransport
|
|
7
7
|
from .core.exceptions import (
|
|
8
8
|
ICMDAuthenticationError,
|
|
9
|
+
ICMDChecksumMismatchError,
|
|
9
10
|
ICMDConnectionError,
|
|
10
11
|
ICMDContractUnavailableError,
|
|
12
|
+
ICMDMissingDependencyError,
|
|
13
|
+
ICMDModelMigrationError,
|
|
11
14
|
ICMDRefreshNetworkError,
|
|
12
15
|
ICMDRefreshRateLimitedError,
|
|
13
16
|
ICMDRefreshResponseError,
|
|
14
17
|
ICMDRefreshTokenInvalidError,
|
|
15
18
|
ICMDRefreshUnavailableError,
|
|
19
|
+
ICMDReleaseRefusedError,
|
|
16
20
|
ICMDRequestError,
|
|
21
|
+
ICMDResultsChangedError,
|
|
22
|
+
ICMDResultsRefusedError,
|
|
17
23
|
ICMDTokenRefreshError,
|
|
18
24
|
ICMDValidationError,
|
|
19
25
|
)
|
|
@@ -83,14 +89,20 @@ __all__ = [
|
|
|
83
89
|
"GridSampling",
|
|
84
90
|
"GridVariable",
|
|
85
91
|
"ICMDAuthenticationError",
|
|
92
|
+
"ICMDChecksumMismatchError",
|
|
86
93
|
"ICMDConnectionError",
|
|
87
94
|
"ICMDContractUnavailableError",
|
|
95
|
+
"ICMDMissingDependencyError",
|
|
96
|
+
"ICMDModelMigrationError",
|
|
88
97
|
"ICMDRefreshNetworkError",
|
|
89
98
|
"ICMDRefreshRateLimitedError",
|
|
90
99
|
"ICMDRefreshResponseError",
|
|
91
100
|
"ICMDRefreshTokenInvalidError",
|
|
92
101
|
"ICMDRefreshUnavailableError",
|
|
102
|
+
"ICMDReleaseRefusedError",
|
|
93
103
|
"ICMDRequestError",
|
|
104
|
+
"ICMDResultsChangedError",
|
|
105
|
+
"ICMDResultsRefusedError",
|
|
94
106
|
"ICMDTokenRefreshError",
|
|
95
107
|
"ICMDValidationError",
|
|
96
108
|
"LatinHypercubeSampling",
|
icmd/_vendor/assembler.py
CHANGED
|
@@ -23,7 +23,9 @@ __all__ = [
|
|
|
23
23
|
"build_design_document",
|
|
24
24
|
]
|
|
25
25
|
|
|
26
|
-
#: The scenario discriminator
|
|
26
|
+
#: The scenario discriminator inside ``qt_model_inputs``. A catalog node
|
|
27
|
+
#: carries ``qt_model.scenario_key`` instead and the backend derives this from
|
|
28
|
+
#: it; a trained-model node, whose scenarios have no key, still carries it.
|
|
27
29
|
#: Exported so consumers that must recognize it -- notably the advisory check,
|
|
28
30
|
#: which excludes it from contract validation -- bind to this module rather than
|
|
29
31
|
#: re-spelling the literal. Renaming it here must not leave a stale copy behind.
|
|
@@ -83,23 +85,29 @@ def assemble_model_inputs(inputs: Mapping[str, Any]) -> list[dict[str, Any]]:
|
|
|
83
85
|
|
|
84
86
|
|
|
85
87
|
def assemble_model_node(
|
|
86
|
-
|
|
88
|
+
key: str,
|
|
87
89
|
model_uuid: str,
|
|
88
90
|
inputs: Mapping[str, Any],
|
|
89
|
-
|
|
91
|
+
scenario_key: str | None = None,
|
|
90
92
|
node_id: str | None = None,
|
|
91
93
|
) -> dict[str, Any]:
|
|
92
94
|
"""Build one model workflow node without model lookup or validation.
|
|
93
95
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
The node is identified by ``qt_model.key`` and ``qt_model.scenario_key``.
|
|
97
|
+
The backend derives the ``__meta_scenario`` title from the scenario key, so
|
|
98
|
+
a discriminator in *inputs* is dropped when one is given rather than sent
|
|
99
|
+
as a second, possibly stale, answer. ``node_id`` identifies this workflow
|
|
100
|
+
instance. The catalog ``model_uuid`` remains in ``qt_model.uuid`` and is
|
|
101
|
+
used only as the default node id.
|
|
96
102
|
"""
|
|
97
103
|
model_inputs = deepcopy(dict(inputs))
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
qt_model = {"key": key, "uuid": model_uuid}
|
|
105
|
+
if scenario_key is not None:
|
|
106
|
+
qt_model["scenario_key"] = scenario_key
|
|
107
|
+
model_inputs.pop(SCENARIO_KEY, None)
|
|
100
108
|
return {
|
|
101
109
|
"id": model_uuid if node_id is None else node_id,
|
|
102
|
-
"qt_model":
|
|
110
|
+
"qt_model": qt_model,
|
|
103
111
|
"qt_model_inputs": assemble_model_inputs(model_inputs),
|
|
104
112
|
}
|
|
105
113
|
|
icmd/apps/agent.py
CHANGED
|
@@ -212,5 +212,16 @@ class AgentApp:
|
|
|
212
212
|
return self._client.request_json("get", "agent/providers")
|
|
213
213
|
|
|
214
214
|
def usage(self) -> dict | list[dict]:
|
|
215
|
-
"""Get the group's
|
|
215
|
+
"""Get the group's Assist credit balance (``GET agent/assist/usage``).
|
|
216
|
+
|
|
217
|
+
Group admins only.
|
|
218
|
+
|
|
219
|
+
Returns
|
|
220
|
+
-------
|
|
221
|
+
dict
|
|
222
|
+
``granted``, ``used``, ``balance`` and ``month_used`` in credits,
|
|
223
|
+
and ``status`` (``"ok"`` / ``"low"`` / ``"out"``). ``balance``
|
|
224
|
+
can be negative. An unmetered group returns ``None`` for all five
|
|
225
|
+
keys, ``status`` included.
|
|
226
|
+
"""
|
|
216
227
|
return self._client.request_json("get", "agent/assist/usage")
|
icmd/apps/base.py
CHANGED
|
@@ -274,7 +274,7 @@ class ReadOnlyResource:
|
|
|
274
274
|
Parameters
|
|
275
275
|
----------
|
|
276
276
|
name : str
|
|
277
|
-
The action's ``url_path`` (e.g. ``"
|
|
277
|
+
The action's ``url_path`` (e.g. ``"submit-draft"``,
|
|
278
278
|
``"queue-position"``, ``"save-calibration"``).
|
|
279
279
|
uuid : str | None
|
|
280
280
|
When given, the action is detail-scoped to this resource UUID.
|