fleet-python 0.2.55__py3-none-any.whl → 0.2.56__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.
Potentially problematic release.
This version of fleet-python might be problematic. Click here for more details.
- fleet/_async/tasks.py +36 -0
- fleet/tasks.py +34 -0
- {fleet_python-0.2.55.dist-info → fleet_python-0.2.56.dist-info}/METADATA +1 -1
- {fleet_python-0.2.55.dist-info → fleet_python-0.2.56.dist-info}/RECORD +7 -7
- {fleet_python-0.2.55.dist-info → fleet_python-0.2.56.dist-info}/WHEEL +0 -0
- {fleet_python-0.2.55.dist-info → fleet_python-0.2.56.dist-info}/licenses/LICENSE +0 -0
- {fleet_python-0.2.55.dist-info → fleet_python-0.2.56.dist-info}/top_level.txt +0 -0
fleet/_async/tasks.py
CHANGED
|
@@ -218,6 +218,42 @@ class Task(BaseModel):
|
|
|
218
218
|
|
|
219
219
|
return await AsyncFleet().make(env_key=self.env_key, region=region)
|
|
220
220
|
|
|
221
|
+
async def make(
|
|
222
|
+
self, region: Optional[str] = None, image_type: Optional[str] = None
|
|
223
|
+
):
|
|
224
|
+
"""Create an environment instance with task's configuration.
|
|
225
|
+
|
|
226
|
+
Auto-populates environment creation with:
|
|
227
|
+
- env_key (env_id + version)
|
|
228
|
+
- data_key (data_id + data_version, if present)
|
|
229
|
+
- env_variables (if present)
|
|
230
|
+
|
|
231
|
+
Args:
|
|
232
|
+
region: Optional AWS region for the environment
|
|
233
|
+
image_type: Optional image type for the environment
|
|
234
|
+
|
|
235
|
+
Returns:
|
|
236
|
+
Environment instance configured for this task
|
|
237
|
+
|
|
238
|
+
Example:
|
|
239
|
+
task = fleet.Task(key="my-task", prompt="...", env_id="my-env",
|
|
240
|
+
data_id="my-data", data_version="v1.0")
|
|
241
|
+
env = await task.make(region="us-west-2")
|
|
242
|
+
"""
|
|
243
|
+
if not self.env_id:
|
|
244
|
+
raise ValueError("Task has no env_id defined")
|
|
245
|
+
|
|
246
|
+
# Deferred import to avoid circular dependencies
|
|
247
|
+
from fleet.env import make_async
|
|
248
|
+
|
|
249
|
+
return await make_async(
|
|
250
|
+
env_key=self.env_key,
|
|
251
|
+
data_key=self.data_key,
|
|
252
|
+
region=region,
|
|
253
|
+
env_variables=self.env_variables if self.env_variables else None,
|
|
254
|
+
image_type=image_type,
|
|
255
|
+
)
|
|
256
|
+
|
|
221
257
|
|
|
222
258
|
def verifier_from_string(
|
|
223
259
|
verifier_func: str, verifier_id: str, verifier_key: str, sha256: str = ""
|
fleet/tasks.py
CHANGED
|
@@ -211,6 +211,40 @@ class Task(BaseModel):
|
|
|
211
211
|
|
|
212
212
|
return Fleet().make(env_key=self.env_key, region=region)
|
|
213
213
|
|
|
214
|
+
def make(self, region: Optional[str] = None, image_type: Optional[str] = None):
|
|
215
|
+
"""Create an environment instance with task's configuration.
|
|
216
|
+
|
|
217
|
+
Auto-populates environment creation with:
|
|
218
|
+
- env_key (env_id + version)
|
|
219
|
+
- data_key (data_id + data_version, if present)
|
|
220
|
+
- env_variables (if present)
|
|
221
|
+
|
|
222
|
+
Args:
|
|
223
|
+
region: Optional AWS region for the environment
|
|
224
|
+
image_type: Optional image type for the environment
|
|
225
|
+
|
|
226
|
+
Returns:
|
|
227
|
+
Environment instance configured for this task
|
|
228
|
+
|
|
229
|
+
Example:
|
|
230
|
+
task = fleet.Task(key="my-task", prompt="...", env_id="my-env",
|
|
231
|
+
data_id="my-data", data_version="v1.0")
|
|
232
|
+
env = task.make(region="us-west-2")
|
|
233
|
+
"""
|
|
234
|
+
if not self.env_id:
|
|
235
|
+
raise ValueError("Task has no env_id defined")
|
|
236
|
+
|
|
237
|
+
# Deferred import to avoid circular dependencies
|
|
238
|
+
from fleet.env import make
|
|
239
|
+
|
|
240
|
+
return make(
|
|
241
|
+
env_key=self.env_key,
|
|
242
|
+
data_key=self.data_key,
|
|
243
|
+
region=region,
|
|
244
|
+
env_variables=self.env_variables if self.env_variables else None,
|
|
245
|
+
image_type=image_type,
|
|
246
|
+
)
|
|
247
|
+
|
|
214
248
|
|
|
215
249
|
def verifier_from_string(
|
|
216
250
|
verifier_func: str, verifier_id: str, verifier_key: str, sha256: str = ""
|
|
@@ -28,7 +28,7 @@ fleet/config.py,sha256=uY02ZKxVoXqVDta-0IMWaYJeE1CTXF_fA9NI6QUutmU,319
|
|
|
28
28
|
fleet/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
29
29
|
fleet/global_client.py,sha256=frrDAFNM2ywN0JHLtlm9qbE1dQpnQJsavJpb7xSR_bU,1072
|
|
30
30
|
fleet/models.py,sha256=d9eish0KO3t4VCNu8h8Q_6K1Xj-crYo5Fejtle0Ur28,13056
|
|
31
|
-
fleet/tasks.py,sha256=
|
|
31
|
+
fleet/tasks.py,sha256=PqOlJBM5b-qwto_nrOXzLvfLJ7B4fGq05Eg-0kDNFv8,15681
|
|
32
32
|
fleet/types.py,sha256=L4Y82xICf1tzyCLqhLYUgEoaIIS5h9T05TyFNHSWs3s,652
|
|
33
33
|
fleet/_async/__init__.py,sha256=ruGtdMl9BRQRsJygNszPT89ZbMy6AYv1mmeYoB--r60,7557
|
|
34
34
|
fleet/_async/base.py,sha256=oisVTQsx0M_yTmyQJc3oij63uKZ97MHz-xYFsWXxQE8,9202
|
|
@@ -36,7 +36,7 @@ fleet/_async/client.py,sha256=uiYufTUAG3o_nseflp_DxW8yLe8JnprIxCwjZ4CsqoI,30751
|
|
|
36
36
|
fleet/_async/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
37
37
|
fleet/_async/global_client.py,sha256=4WskpLHbsDEgWW7hXMD09W-brkp4euy8w2ZJ88594rQ,1103
|
|
38
38
|
fleet/_async/models.py,sha256=GX-sRciZDenW2O7Qx9w_ftOkJyE4ph1-92WMq6lynHE,12856
|
|
39
|
-
fleet/_async/tasks.py,sha256=
|
|
39
|
+
fleet/_async/tasks.py,sha256=wYCSmCDs9svXWXmIKp55I2bf6-85VkTWpJo0pZmOUJ0,15679
|
|
40
40
|
fleet/_async/env/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
fleet/_async/env/client.py,sha256=C5WG5Ir_McXaFPZNdkQjj0w4V7xMIcw3QyVP5g-3kVk,1237
|
|
42
42
|
fleet/_async/instance/__init__.py,sha256=PtmJq8J8bh0SOQ2V55QURz5GJfobozwtQoqhaOk3_tI,515
|
|
@@ -69,10 +69,10 @@ fleet/verifiers/decorator.py,sha256=nAP3O8szXu7md_kpwpz91hGSUNEVLYjwZQZTkQlV1DM,
|
|
|
69
69
|
fleet/verifiers/parse.py,sha256=qz9AfJrTbjlg-LU-lE8Ciqi7Yt2a8-cs17FdpjTLhMk,8550
|
|
70
70
|
fleet/verifiers/sql_differ.py,sha256=TqTLWyK3uOyLbitT6HYzYEzuSFC39wcyhgk3rcm__k8,6525
|
|
71
71
|
fleet/verifiers/verifier.py,sha256=_lcxXVm8e0xRrK2gNJy9up7pW1zOkPRY5n5lQ85S8jg,14197
|
|
72
|
-
fleet_python-0.2.
|
|
72
|
+
fleet_python-0.2.56.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
73
73
|
scripts/fix_sync_imports.py,sha256=X9fWLTpiPGkSHsjyQUDepOJkxOqw1DPj7nd8wFlFqLQ,8368
|
|
74
74
|
scripts/unasync.py,sha256=vWVQxRWX8SRZO5cmzEhpvnG_REhCWXpidIGIpWmEcvI,696
|
|
75
|
-
fleet_python-0.2.
|
|
76
|
-
fleet_python-0.2.
|
|
77
|
-
fleet_python-0.2.
|
|
78
|
-
fleet_python-0.2.
|
|
75
|
+
fleet_python-0.2.56.dist-info/METADATA,sha256=i9F_dXu80Okx9Eic7EEMqaDVy_7L7cZNksRcC1KTCP4,3304
|
|
76
|
+
fleet_python-0.2.56.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
77
|
+
fleet_python-0.2.56.dist-info/top_level.txt,sha256=_3DSmTohvSDf3AIP_BYfGzhwO1ECFwuzg83X-wHCx3Y,23
|
|
78
|
+
fleet_python-0.2.56.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|