futurehouse-client 0.3.14__tar.gz → 0.3.15__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.
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/PKG-INFO +2 -1
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/clients/rest_client.py +14 -3
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/models/app.py +29 -3
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/PKG-INFO +2 -1
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/requires.txt +1 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/pyproject.toml +7 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/LICENSE +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/README.md +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/docs/__init__.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/docs/client_notebook.ipynb +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/__init__.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/clients/__init__.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/clients/job_client.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/models/__init__.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/models/client.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/models/rest.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/utils/__init__.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/utils/module_utils.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/utils/monitoring.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/SOURCES.txt +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/dependency_links.txt +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/top_level.txt +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/setup.cfg +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/tests/test_rest.py +0 -0
- {futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/uv.lock +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: futurehouse-client
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.15
|
4
4
|
Summary: A client for interacting with endpoints of the FutureHouse service.
|
5
5
|
Author-email: FutureHouse technical staff <hello@futurehouse.org>
|
6
6
|
Classifier: Operating System :: OS Independent
|
@@ -15,6 +15,7 @@ Requires-Dist: dm-tree<0.1.9
|
|
15
15
|
Requires-Dist: fhaviary
|
16
16
|
Requires-Dist: httpx
|
17
17
|
Requires-Dist: ldp>=0.22.0
|
18
|
+
Requires-Dist: litellm==1.67.4.post1
|
18
19
|
Requires-Dist: pydantic
|
19
20
|
Requires-Dist: python-dotenv
|
20
21
|
Requires-Dist: tenacity
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/clients/rest_client.py
RENAMED
@@ -26,6 +26,7 @@ from httpx import (
|
|
26
26
|
ReadTimeout,
|
27
27
|
RemoteProtocolError,
|
28
28
|
)
|
29
|
+
from ldp.agent import AgentConfig
|
29
30
|
from pydantic import BaseModel, ConfigDict, model_validator
|
30
31
|
from requests.exceptions import RequestException, Timeout
|
31
32
|
from tenacity import (
|
@@ -100,6 +101,12 @@ class InvalidTaskDescriptionError(Exception):
|
|
100
101
|
"""Raised when the task description is invalid or empty."""
|
101
102
|
|
102
103
|
|
104
|
+
class SimpleOrganization(BaseModel):
|
105
|
+
id: int
|
106
|
+
name: str
|
107
|
+
display_name: str
|
108
|
+
|
109
|
+
|
103
110
|
# 5 minute default for JWTs
|
104
111
|
JWT_TOKEN_CACHE_EXPIRY: int = 300 # seconds
|
105
112
|
|
@@ -115,7 +122,7 @@ class TaskResponse(BaseModel):
|
|
115
122
|
created_at: datetime
|
116
123
|
job_name: str
|
117
124
|
public: bool
|
118
|
-
shared_with: list[
|
125
|
+
shared_with: list[SimpleOrganization] | None = None
|
119
126
|
build_owner: str | None = None
|
120
127
|
environment_name: str | None = None
|
121
128
|
agent_name: str | None = None
|
@@ -190,7 +197,7 @@ class TaskResponseVerbose(TaskResponse):
|
|
190
197
|
agent_state: list[dict[str, Any]] | None = None
|
191
198
|
environment_frame: dict[str, Any] | None = None
|
192
199
|
metadata: dict[str, Any] | None = None
|
193
|
-
shared_with: list[
|
200
|
+
shared_with: list[SimpleOrganization] | None = None
|
194
201
|
|
195
202
|
|
196
203
|
class RestClient:
|
@@ -575,7 +582,11 @@ class RestClient:
|
|
575
582
|
)
|
576
583
|
logger.debug(f"Sending files: {[f[1][0] for f in files]}")
|
577
584
|
data = {
|
578
|
-
"agent":
|
585
|
+
"agent": (
|
586
|
+
config.agent.model_dump_json()
|
587
|
+
if isinstance(config.agent, AgentConfig)
|
588
|
+
else config.agent
|
589
|
+
),
|
579
590
|
"job_name": config.job_name,
|
580
591
|
"organization": selected_org,
|
581
592
|
"environment": config.environment,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import json
|
1
2
|
import os
|
2
3
|
import re
|
3
4
|
from enum import StrEnum, auto
|
@@ -401,10 +402,10 @@ class JobDeploymentConfig(BaseModel):
|
|
401
402
|
description="The python version your docker image should build with.",
|
402
403
|
)
|
403
404
|
|
404
|
-
agent: Agent | str = Field(
|
405
|
+
agent: Agent | AgentConfig | str = Field(
|
405
406
|
default="ldp.agent.SimpleAgent",
|
406
407
|
description="Your desired agent path, should be a module reference and a fully qualified name. "
|
407
|
-
"example: ldp.agent.SimpleAgent",
|
408
|
+
"example: ldp.agent.SimpleAgent or by instantiating AgentConfig to further customize the agent.",
|
408
409
|
)
|
409
410
|
|
410
411
|
requires_aviary_internal: bool = Field(
|
@@ -531,7 +532,12 @@ class JobDeploymentConfig(BaseModel):
|
|
531
532
|
|
532
533
|
@field_validator("agent")
|
533
534
|
@classmethod
|
534
|
-
def
|
535
|
+
def validate_agent(
|
536
|
+
cls, value: str | Agent | AgentConfig
|
537
|
+
) -> str | Agent | AgentConfig:
|
538
|
+
if isinstance(value, AgentConfig):
|
539
|
+
return value
|
540
|
+
|
535
541
|
if isinstance(value, Agent):
|
536
542
|
return value
|
537
543
|
|
@@ -584,6 +590,13 @@ class RuntimeConfig(BaseModel):
|
|
584
590
|
"agent selected during Crow deployment in the JobDeploymentConfig object."
|
585
591
|
),
|
586
592
|
)
|
593
|
+
environment_config: dict[str, Any] | None = Field(
|
594
|
+
default=None,
|
595
|
+
description=(
|
596
|
+
"Kwargs to be passed to the environment constructor at runtime. "
|
597
|
+
"Not all environments support this functionality."
|
598
|
+
),
|
599
|
+
)
|
587
600
|
continued_job_id: UUID | None = Field(
|
588
601
|
default=None,
|
589
602
|
description="Optional job identifier for a continued job",
|
@@ -606,6 +619,19 @@ class RuntimeConfig(BaseModel):
|
|
606
619
|
raise ValueError(f"Invalid agent path format: {value}")
|
607
620
|
return value
|
608
621
|
|
622
|
+
@field_validator("environment_config")
|
623
|
+
@classmethod
|
624
|
+
def validate_environment_config(
|
625
|
+
cls, value: dict[str, Any] | None
|
626
|
+
) -> dict[str, Any] | None:
|
627
|
+
if value is None:
|
628
|
+
return None
|
629
|
+
try:
|
630
|
+
json.dumps(value)
|
631
|
+
except (TypeError, OverflowError) as err:
|
632
|
+
raise ValueError("Environment config must be JSON serializable") from err
|
633
|
+
return value
|
634
|
+
|
609
635
|
|
610
636
|
class TaskRequest(BaseModel):
|
611
637
|
task_id: UUID | None = Field(
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: futurehouse-client
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.15
|
4
4
|
Summary: A client for interacting with endpoints of the FutureHouse service.
|
5
5
|
Author-email: FutureHouse technical staff <hello@futurehouse.org>
|
6
6
|
Classifier: Operating System :: OS Independent
|
@@ -15,6 +15,7 @@ Requires-Dist: dm-tree<0.1.9
|
|
15
15
|
Requires-Dist: fhaviary
|
16
16
|
Requires-Dist: httpx
|
17
17
|
Requires-Dist: ldp>=0.22.0
|
18
|
+
Requires-Dist: litellm==1.67.4.post1
|
18
19
|
Requires-Dist: pydantic
|
19
20
|
Requires-Dist: python-dotenv
|
20
21
|
Requires-Dist: tenacity
|
@@ -19,6 +19,7 @@ dependencies = [
|
|
19
19
|
"fhaviary",
|
20
20
|
"httpx",
|
21
21
|
"ldp>=0.22.0",
|
22
|
+
"litellm==1.67.4.post1", # TODO: remove after: https://github.com/BerriAI/litellm/issues/10349
|
22
23
|
"pydantic",
|
23
24
|
"python-dotenv",
|
24
25
|
"tenacity",
|
@@ -63,3 +64,9 @@ include = ["futurehouse_client*"]
|
|
63
64
|
local_scheme = "no-local-version"
|
64
65
|
root = "../.."
|
65
66
|
version_file = "version.py"
|
67
|
+
|
68
|
+
[[tool.uv.index]]
|
69
|
+
explicit = true
|
70
|
+
name = "testpypi"
|
71
|
+
publish-url = "https://test.pypi.org/legacy/"
|
72
|
+
url = "https://test.pypi.org/"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/clients/__init__.py
RENAMED
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/clients/job_client.py
RENAMED
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/models/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/utils/__init__.py
RENAMED
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/utils/module_utils.py
RENAMED
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client/utils/monitoring.py
RENAMED
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{futurehouse_client-0.3.14 → futurehouse_client-0.3.15}/futurehouse_client.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|