UncountablePythonSDK 0.0.68__py3-none-any.whl → 0.0.70__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.
- {UncountablePythonSDK-0.0.68.dist-info → UncountablePythonSDK-0.0.70.dist-info}/METADATA +3 -1
- {UncountablePythonSDK-0.0.68.dist-info → UncountablePythonSDK-0.0.70.dist-info}/RECORD +47 -19
- docs/requirements.txt +1 -1
- examples/integration-server/jobs/materials_auto/example_cron.py +18 -0
- examples/integration-server/jobs/materials_auto/profile.yaml +19 -0
- examples/integration-server/pyproject.toml +224 -0
- examples/set_recipe_metadata_file.py +40 -0
- examples/set_recipe_output_file_sdk.py +26 -0
- uncountable/core/environment.py +5 -1
- uncountable/integration/cli.py +1 -0
- uncountable/integration/cron.py +12 -28
- uncountable/integration/db/connect.py +12 -2
- uncountable/integration/db/session.py +25 -0
- uncountable/integration/entrypoint.py +6 -6
- uncountable/integration/executors/generic_upload_executor.py +5 -1
- uncountable/integration/job.py +44 -17
- uncountable/integration/queue_runner/__init__.py +0 -0
- uncountable/integration/queue_runner/command_server/__init__.py +24 -0
- uncountable/integration/queue_runner/command_server/command_client.py +68 -0
- uncountable/integration/queue_runner/command_server/command_server.py +64 -0
- uncountable/integration/queue_runner/command_server/protocol/__init__.py +0 -0
- uncountable/integration/queue_runner/command_server/protocol/command_server.proto +22 -0
- uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.py +40 -0
- uncountable/integration/queue_runner/command_server/protocol/command_server_pb2.pyi +38 -0
- uncountable/integration/queue_runner/command_server/protocol/command_server_pb2_grpc.py +129 -0
- uncountable/integration/queue_runner/command_server/types.py +52 -0
- uncountable/integration/queue_runner/datastore/__init__.py +3 -0
- uncountable/integration/queue_runner/datastore/datastore_sqlite.py +93 -0
- uncountable/integration/queue_runner/datastore/interface.py +19 -0
- uncountable/integration/queue_runner/datastore/model.py +17 -0
- uncountable/integration/queue_runner/job_scheduler.py +119 -0
- uncountable/integration/queue_runner/queue_runner.py +26 -0
- uncountable/integration/queue_runner/types.py +7 -0
- uncountable/integration/queue_runner/worker.py +109 -0
- uncountable/integration/scan_profiles.py +2 -0
- uncountable/integration/scheduler.py +144 -0
- uncountable/integration/webhook_server/entrypoint.py +45 -45
- uncountable/types/__init__.py +4 -0
- uncountable/types/api/recipes/get_recipes_data.py +1 -0
- uncountable/types/api/recipes/set_recipe_output_file.py +46 -0
- uncountable/types/client_base.py +20 -0
- uncountable/types/entity_t.py +2 -0
- uncountable/types/queued_job.py +16 -0
- uncountable/types/queued_job_t.py +107 -0
- uncountable/types/recipe_metadata_t.py +1 -0
- {UncountablePythonSDK-0.0.68.dist-info → UncountablePythonSDK-0.0.70.dist-info}/WHEEL +0 -0
- {UncountablePythonSDK-0.0.68.dist-info → UncountablePythonSDK-0.0.70.dist-info}/top_level.txt +0 -0
uncountable/types/client_base.py
CHANGED
|
@@ -74,6 +74,7 @@ import uncountable.types.api.inputs.set_intermediate_type as set_intermediate_ty
|
|
|
74
74
|
import uncountable.types.api.recipes.set_recipe_inputs as set_recipe_inputs_t
|
|
75
75
|
import uncountable.types.api.recipes.set_recipe_metadata as set_recipe_metadata_t
|
|
76
76
|
import uncountable.types.api.recipes.set_recipe_output_annotations as set_recipe_output_annotations_t
|
|
77
|
+
import uncountable.types.api.recipes.set_recipe_output_file as set_recipe_output_file_t
|
|
77
78
|
import uncountable.types.api.recipes.set_recipe_outputs as set_recipe_outputs_t
|
|
78
79
|
import uncountable.types.api.recipes.set_recipe_tags as set_recipe_tags_t
|
|
79
80
|
import uncountable.types.api.entity.set_values as set_values_t
|
|
@@ -1321,6 +1322,25 @@ class ClientMethods(ABC):
|
|
|
1321
1322
|
)
|
|
1322
1323
|
return self.do_request(api_request=api_request, return_type=set_recipe_output_annotations_t.Data)
|
|
1323
1324
|
|
|
1325
|
+
def set_recipe_output_file(
|
|
1326
|
+
self,
|
|
1327
|
+
*,
|
|
1328
|
+
output_file_data: set_recipe_output_file_t.RecipeOutputFileValue,
|
|
1329
|
+
) -> set_recipe_output_file_t.Data:
|
|
1330
|
+
"""Sets output file value for an experiment. Include a single file as part of the FormData of the request with the filename as the key
|
|
1331
|
+
|
|
1332
|
+
:param output_file_data: The output file to set
|
|
1333
|
+
"""
|
|
1334
|
+
args = set_recipe_output_file_t.Arguments(
|
|
1335
|
+
output_file_data=output_file_data,
|
|
1336
|
+
)
|
|
1337
|
+
api_request = APIRequest(
|
|
1338
|
+
method=set_recipe_output_file_t.ENDPOINT_METHOD,
|
|
1339
|
+
endpoint=set_recipe_output_file_t.ENDPOINT_PATH,
|
|
1340
|
+
args=args,
|
|
1341
|
+
)
|
|
1342
|
+
return self.do_request(api_request=api_request, return_type=set_recipe_output_file_t.Data)
|
|
1343
|
+
|
|
1324
1344
|
def set_recipe_outputs(
|
|
1325
1345
|
self,
|
|
1326
1346
|
*,
|
uncountable/types/entity_t.py
CHANGED
|
@@ -119,6 +119,7 @@ __all__: list[str] = [
|
|
|
119
119
|
"recipe_permission_view": "Recipe Permission View",
|
|
120
120
|
"recipe_project": "Recipe Project",
|
|
121
121
|
"recipe_step": "Recipe Step",
|
|
122
|
+
"recipe_workflow_step": "Recipe Workflow Step",
|
|
122
123
|
"recipe_tag": "Recipe Tag",
|
|
123
124
|
"recipe_metadata": "Experiment Metadata",
|
|
124
125
|
"metadata_value": "Metadata Value",
|
|
@@ -271,6 +272,7 @@ class EntityType(StrEnum):
|
|
|
271
272
|
RECIPE_PERMISSION_VIEW = "recipe_permission_view"
|
|
272
273
|
RECIPE_PROJECT = "recipe_project"
|
|
273
274
|
RECIPE_STEP = "recipe_step"
|
|
275
|
+
RECIPE_WORKFLOW_STEP = "recipe_workflow_step"
|
|
274
276
|
RECIPE_TAG = "recipe_tag"
|
|
275
277
|
RECIPE_METADATA = "recipe_metadata"
|
|
276
278
|
METADATA_VALUE = "metadata_value"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# flake8: noqa: F821
|
|
2
|
+
# ruff: noqa: E402 Q003
|
|
3
|
+
# fmt: off
|
|
4
|
+
# isort: skip_file
|
|
5
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
6
|
+
# Kept only for SDK backwards compatibility
|
|
7
|
+
from .queued_job_t import InvocationContextType as InvocationContextType
|
|
8
|
+
from .queued_job_t import InvocationContextBase as InvocationContextBase
|
|
9
|
+
from .queued_job_t import InvocationContextCron as InvocationContextCron
|
|
10
|
+
from .queued_job_t import InvocationContextManual as InvocationContextManual
|
|
11
|
+
from .queued_job_t import InvocationContextWebhook as InvocationContextWebhook
|
|
12
|
+
from .queued_job_t import InvocationContext as InvocationContext
|
|
13
|
+
from .queued_job_t import QueuedJobPayload as QueuedJobPayload
|
|
14
|
+
from .queued_job_t import QueuedJobResult as QueuedJobResult
|
|
15
|
+
from .queued_job_t import QueuedJob as QueuedJob
|
|
16
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
2
|
+
# flake8: noqa: F821
|
|
3
|
+
# ruff: noqa: E402 Q003
|
|
4
|
+
# fmt: off
|
|
5
|
+
# isort: skip_file
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
import typing # noqa: F401
|
|
8
|
+
import datetime # noqa: F401
|
|
9
|
+
from decimal import Decimal # noqa: F401
|
|
10
|
+
from pkgs.strenum_compat import StrEnum
|
|
11
|
+
import dataclasses
|
|
12
|
+
from pkgs.serialization import serial_class
|
|
13
|
+
from pkgs.serialization import serial_union_annotation
|
|
14
|
+
from . import base_t
|
|
15
|
+
from . import job_definition_t
|
|
16
|
+
|
|
17
|
+
__all__: list[str] = [
|
|
18
|
+
"InvocationContext",
|
|
19
|
+
"InvocationContextBase",
|
|
20
|
+
"InvocationContextCron",
|
|
21
|
+
"InvocationContextManual",
|
|
22
|
+
"InvocationContextType",
|
|
23
|
+
"InvocationContextWebhook",
|
|
24
|
+
"QueuedJob",
|
|
25
|
+
"QueuedJobPayload",
|
|
26
|
+
"QueuedJobResult",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
31
|
+
class InvocationContextType(StrEnum):
|
|
32
|
+
CRON = "cron"
|
|
33
|
+
MANUAL = "manual"
|
|
34
|
+
WEBHOOK = "webhook"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
38
|
+
@dataclasses.dataclass(kw_only=True)
|
|
39
|
+
class InvocationContextBase:
|
|
40
|
+
type: InvocationContextType
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
44
|
+
@serial_class(
|
|
45
|
+
parse_require={"type"},
|
|
46
|
+
)
|
|
47
|
+
@dataclasses.dataclass(kw_only=True)
|
|
48
|
+
class InvocationContextCron(InvocationContextBase):
|
|
49
|
+
type: typing.Literal[InvocationContextType.CRON] = InvocationContextType.CRON
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
53
|
+
@serial_class(
|
|
54
|
+
parse_require={"type"},
|
|
55
|
+
)
|
|
56
|
+
@dataclasses.dataclass(kw_only=True)
|
|
57
|
+
class InvocationContextManual(InvocationContextBase):
|
|
58
|
+
type: typing.Literal[InvocationContextType.MANUAL] = InvocationContextType.MANUAL
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
62
|
+
@serial_class(
|
|
63
|
+
unconverted_values={"webhook_payload"},
|
|
64
|
+
parse_require={"type"},
|
|
65
|
+
)
|
|
66
|
+
@dataclasses.dataclass(kw_only=True)
|
|
67
|
+
class InvocationContextWebhook(InvocationContextBase):
|
|
68
|
+
type: typing.Literal[InvocationContextType.WEBHOOK] = InvocationContextType.WEBHOOK
|
|
69
|
+
webhook_payload: base_t.JsonValue
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
73
|
+
InvocationContext = typing.Annotated[
|
|
74
|
+
typing.Union[InvocationContextCron, InvocationContextManual, InvocationContextWebhook],
|
|
75
|
+
serial_union_annotation(
|
|
76
|
+
discriminator="type",
|
|
77
|
+
discriminator_map={
|
|
78
|
+
"cron": InvocationContextCron,
|
|
79
|
+
"manual": InvocationContextManual,
|
|
80
|
+
"webhook": InvocationContextWebhook,
|
|
81
|
+
},
|
|
82
|
+
),
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
87
|
+
@dataclasses.dataclass(kw_only=True)
|
|
88
|
+
class QueuedJobPayload:
|
|
89
|
+
invocation_context: InvocationContext
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
93
|
+
@dataclasses.dataclass(kw_only=True)
|
|
94
|
+
class QueuedJobResult:
|
|
95
|
+
queued_job_uuid: str
|
|
96
|
+
job_result: job_definition_t.JobResult
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
100
|
+
@dataclasses.dataclass(kw_only=True)
|
|
101
|
+
class QueuedJob:
|
|
102
|
+
queued_job_uuid: str
|
|
103
|
+
job_ref_name: str
|
|
104
|
+
num_attempts: int
|
|
105
|
+
submitted_at: datetime.datetime
|
|
106
|
+
payload: QueuedJobPayload
|
|
107
|
+
# DO NOT MODIFY -- This file is generated by type_spec
|
|
@@ -29,6 +29,7 @@ class MetadataValue:
|
|
|
29
29
|
value_numeric: typing.Optional[Decimal] = None
|
|
30
30
|
value_str: typing.Optional[str] = None
|
|
31
31
|
value_json: typing.Optional[base_t.JsonValue] = None
|
|
32
|
+
value_file_ids: typing.Optional[list[base_t.ObjectId]] = None
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
# DO NOT MODIFY -- This file is generated by type_spec
|
|
File without changes
|
{UncountablePythonSDK-0.0.68.dist-info → UncountablePythonSDK-0.0.70.dist-info}/top_level.txt
RENAMED
|
File without changes
|