scale-gp-beta 0.1.0a29__py3-none-any.whl → 0.1.0a30__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.
- scale_gp_beta/_base_client.py +4 -1
- scale_gp_beta/_client.py +9 -0
- scale_gp_beta/_files.py +4 -4
- scale_gp_beta/_models.py +24 -3
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/lib/CONTRIBUTING.MD +53 -0
- scale_gp_beta/lib/tracing/trace_queue_manager.py +14 -0
- scale_gp_beta/resources/__init__.py +14 -0
- scale_gp_beta/resources/chat/completions.py +4 -0
- scale_gp_beta/resources/responses.py +314 -0
- scale_gp_beta/resources/spans.py +14 -22
- scale_gp_beta/types/__init__.py +17 -0
- scale_gp_beta/types/chat/chat_completion.py +61 -6
- scale_gp_beta/types/chat/chat_completion_chunk.py +17 -1
- scale_gp_beta/types/chat/completion_models_params.py +2 -0
- scale_gp_beta/types/chat/model_definition.py +6 -0
- scale_gp_beta/types/completion.py +8 -0
- scale_gp_beta/types/container.py +0 -6
- scale_gp_beta/types/dataset.py +3 -1
- scale_gp_beta/types/dataset_item.py +3 -1
- scale_gp_beta/types/evaluation.py +3 -7
- scale_gp_beta/types/evaluation_item.py +3 -1
- scale_gp_beta/types/evaluation_task.py +31 -55
- scale_gp_beta/types/evaluation_task_param.py +28 -1
- scale_gp_beta/types/file.py +3 -1
- scale_gp_beta/types/inference_model.py +3 -0
- scale_gp_beta/types/question.py +11 -10
- scale_gp_beta/types/response.py +2852 -0
- scale_gp_beta/types/response_create_params.py +817 -0
- scale_gp_beta/types/response_create_response.py +20891 -0
- scale_gp_beta/types/shared/__init__.py +3 -0
- scale_gp_beta/types/shared/identity.py +16 -0
- scale_gp_beta/types/span.py +4 -2
- scale_gp_beta/types/span_search_params.py +4 -7
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/METADATA +2 -3
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/RECORD +38 -31
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a29.dist-info → scale_gp_beta-0.1.0a30.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,6 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
from typing_extensions import Literal
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
|
+
from .shared.identity import Identity
|
|
8
9
|
|
|
9
10
|
__all__ = ["EvaluationItem"]
|
|
10
11
|
|
|
@@ -14,7 +15,8 @@ class EvaluationItem(BaseModel):
|
|
|
14
15
|
|
|
15
16
|
created_at: datetime
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
created_by: Identity
|
|
19
|
+
"""The identity that created the entity."""
|
|
18
20
|
|
|
19
21
|
data: Dict[str, object]
|
|
20
22
|
|
|
@@ -5,8 +5,9 @@ from __future__ import annotations
|
|
|
5
5
|
from typing import TYPE_CHECKING, Dict, List, Union, Optional
|
|
6
6
|
from typing_extensions import Literal, Annotated, TypeAlias
|
|
7
7
|
|
|
8
|
+
from pydantic import Field as FieldInfo
|
|
9
|
+
|
|
8
10
|
from .._utils import PropertyInfo
|
|
9
|
-
from .._compat import PYDANTIC_V2
|
|
10
11
|
from .._models import BaseModel
|
|
11
12
|
from .item_locator import ItemLocator
|
|
12
13
|
|
|
@@ -38,6 +39,8 @@ __all__ = [
|
|
|
38
39
|
"AutoEvaluationQuestionTaskConfiguration",
|
|
39
40
|
"AutoEvaluationGuidedDecodingEvaluationTask",
|
|
40
41
|
"AutoEvaluationGuidedDecodingEvaluationTaskConfiguration",
|
|
42
|
+
"AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator",
|
|
43
|
+
"AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator",
|
|
41
44
|
"ContributorEvaluationQuestionTask",
|
|
42
45
|
"ContributorEvaluationQuestionTaskConfiguration",
|
|
43
46
|
]
|
|
@@ -98,6 +101,7 @@ class ChatCompletionEvaluationTaskConfiguration(BaseModel):
|
|
|
98
101
|
|
|
99
102
|
top_p: Union[float, ItemLocator, None] = None
|
|
100
103
|
|
|
104
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
101
105
|
if TYPE_CHECKING:
|
|
102
106
|
# Stub to indicate that arbitrary properties are accepted.
|
|
103
107
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -325,7 +329,26 @@ class AutoEvaluationQuestionTask(BaseModel):
|
|
|
325
329
|
task_type: Optional[Literal["auto_evaluation.question"]] = None
|
|
326
330
|
|
|
327
331
|
|
|
328
|
-
class
|
|
332
|
+
class AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator(
|
|
333
|
+
BaseModel
|
|
334
|
+
):
|
|
335
|
+
model: str
|
|
336
|
+
"""model specified as `model_vendor/model_name`"""
|
|
337
|
+
|
|
338
|
+
prompt: str
|
|
339
|
+
|
|
340
|
+
response_format: Dict[str, object]
|
|
341
|
+
"""JSON schema used for structuring the model response"""
|
|
342
|
+
|
|
343
|
+
inference_args: Optional[Dict[str, object]] = None
|
|
344
|
+
"""Additional arguments to pass to the inference request"""
|
|
345
|
+
|
|
346
|
+
system_prompt: Optional[str] = None
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
class AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator(
|
|
350
|
+
BaseModel
|
|
351
|
+
):
|
|
329
352
|
choices: List[str]
|
|
330
353
|
"""Choices array cannot be empty"""
|
|
331
354
|
|
|
@@ -340,6 +363,12 @@ class AutoEvaluationGuidedDecodingEvaluationTaskConfiguration(BaseModel):
|
|
|
340
363
|
system_prompt: Optional[str] = None
|
|
341
364
|
|
|
342
365
|
|
|
366
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfiguration: TypeAlias = Union[
|
|
367
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator,
|
|
368
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator,
|
|
369
|
+
]
|
|
370
|
+
|
|
371
|
+
|
|
343
372
|
class AutoEvaluationGuidedDecodingEvaluationTask(BaseModel):
|
|
344
373
|
configuration: AutoEvaluationGuidedDecodingEvaluationTaskConfiguration
|
|
345
374
|
|
|
@@ -387,56 +416,3 @@ EvaluationTask: TypeAlias = Annotated[
|
|
|
387
416
|
]
|
|
388
417
|
|
|
389
418
|
from .container import Container
|
|
390
|
-
|
|
391
|
-
if PYDANTIC_V2:
|
|
392
|
-
ChatCompletionEvaluationTask.model_rebuild()
|
|
393
|
-
ChatCompletionEvaluationTaskConfiguration.model_rebuild()
|
|
394
|
-
GenericInferenceEvaluationTask.model_rebuild()
|
|
395
|
-
GenericInferenceEvaluationTaskConfiguration.model_rebuild()
|
|
396
|
-
GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration.model_rebuild()
|
|
397
|
-
ApplicationVariantV1EvaluationTask.model_rebuild()
|
|
398
|
-
ApplicationVariantV1EvaluationTaskConfiguration.model_rebuild()
|
|
399
|
-
ApplicationVariantV1EvaluationTaskConfigurationHistoryApplicationRequestResponsePairArray.model_rebuild()
|
|
400
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides.model_rebuild()
|
|
401
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState.model_rebuild()
|
|
402
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace.model_rebuild()
|
|
403
|
-
MetricEvaluationTask.model_rebuild()
|
|
404
|
-
MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator.model_rebuild()
|
|
405
|
-
MetricEvaluationTaskConfigurationMeteorScorerConfigWithItemLocator.model_rebuild()
|
|
406
|
-
MetricEvaluationTaskConfigurationCosineSimilarityScorerConfigWithItemLocator.model_rebuild()
|
|
407
|
-
MetricEvaluationTaskConfigurationF1ScorerConfigWithItemLocator.model_rebuild()
|
|
408
|
-
MetricEvaluationTaskConfigurationRougeScorer1ConfigWithItemLocator.model_rebuild()
|
|
409
|
-
MetricEvaluationTaskConfigurationRougeScorer2ConfigWithItemLocator.model_rebuild()
|
|
410
|
-
MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator.model_rebuild()
|
|
411
|
-
AutoEvaluationQuestionTask.model_rebuild()
|
|
412
|
-
AutoEvaluationQuestionTaskConfiguration.model_rebuild()
|
|
413
|
-
AutoEvaluationGuidedDecodingEvaluationTask.model_rebuild()
|
|
414
|
-
AutoEvaluationGuidedDecodingEvaluationTaskConfiguration.model_rebuild()
|
|
415
|
-
ContributorEvaluationQuestionTask.model_rebuild()
|
|
416
|
-
ContributorEvaluationQuestionTaskConfiguration.model_rebuild()
|
|
417
|
-
else:
|
|
418
|
-
ChatCompletionEvaluationTask.update_forward_refs() # type: ignore
|
|
419
|
-
ChatCompletionEvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
420
|
-
GenericInferenceEvaluationTask.update_forward_refs() # type: ignore
|
|
421
|
-
GenericInferenceEvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
422
|
-
GenericInferenceEvaluationTaskConfigurationInferenceConfigurationLaunchInferenceConfiguration.update_forward_refs() # type: ignore
|
|
423
|
-
ApplicationVariantV1EvaluationTask.update_forward_refs() # type: ignore
|
|
424
|
-
ApplicationVariantV1EvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
425
|
-
ApplicationVariantV1EvaluationTaskConfigurationHistoryApplicationRequestResponsePairArray.update_forward_refs() # type: ignore
|
|
426
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides.update_forward_refs() # type: ignore
|
|
427
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState.update_forward_refs() # type: ignore
|
|
428
|
-
ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesPartialTrace.update_forward_refs() # type: ignore
|
|
429
|
-
MetricEvaluationTask.update_forward_refs() # type: ignore
|
|
430
|
-
MetricEvaluationTaskConfigurationBleuScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
431
|
-
MetricEvaluationTaskConfigurationMeteorScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
432
|
-
MetricEvaluationTaskConfigurationCosineSimilarityScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
433
|
-
MetricEvaluationTaskConfigurationF1ScorerConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
434
|
-
MetricEvaluationTaskConfigurationRougeScorer1ConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
435
|
-
MetricEvaluationTaskConfigurationRougeScorer2ConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
436
|
-
MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator.update_forward_refs() # type: ignore
|
|
437
|
-
AutoEvaluationQuestionTask.update_forward_refs() # type: ignore
|
|
438
|
-
AutoEvaluationQuestionTaskConfiguration.update_forward_refs() # type: ignore
|
|
439
|
-
AutoEvaluationGuidedDecodingEvaluationTask.update_forward_refs() # type: ignore
|
|
440
|
-
AutoEvaluationGuidedDecodingEvaluationTaskConfiguration.update_forward_refs() # type: ignore
|
|
441
|
-
ContributorEvaluationQuestionTask.update_forward_refs() # type: ignore
|
|
442
|
-
ContributorEvaluationQuestionTaskConfiguration.update_forward_refs() # type: ignore
|
|
@@ -35,6 +35,8 @@ __all__ = [
|
|
|
35
35
|
"AutoEvaluationQuestionTaskConfiguration",
|
|
36
36
|
"AutoEvaluationGuidedDecodingEvaluationTask",
|
|
37
37
|
"AutoEvaluationGuidedDecodingEvaluationTaskConfiguration",
|
|
38
|
+
"AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator",
|
|
39
|
+
"AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator",
|
|
38
40
|
"ContributorEvaluationQuestionTask",
|
|
39
41
|
"ContributorEvaluationQuestionTaskConfiguration",
|
|
40
42
|
]
|
|
@@ -320,7 +322,26 @@ class AutoEvaluationQuestionTask(TypedDict, total=False):
|
|
|
320
322
|
task_type: Literal["auto_evaluation.question"]
|
|
321
323
|
|
|
322
324
|
|
|
323
|
-
class
|
|
325
|
+
class AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator(
|
|
326
|
+
TypedDict, total=False
|
|
327
|
+
):
|
|
328
|
+
model: Required[str]
|
|
329
|
+
"""model specified as `model_vendor/model_name`"""
|
|
330
|
+
|
|
331
|
+
prompt: Required[str]
|
|
332
|
+
|
|
333
|
+
response_format: Required[Dict[str, object]]
|
|
334
|
+
"""JSON schema used for structuring the model response"""
|
|
335
|
+
|
|
336
|
+
inference_args: Dict[str, object]
|
|
337
|
+
"""Additional arguments to pass to the inference request"""
|
|
338
|
+
|
|
339
|
+
system_prompt: str
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
class AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator(
|
|
343
|
+
TypedDict, total=False
|
|
344
|
+
):
|
|
324
345
|
choices: Required[List[str]]
|
|
325
346
|
"""Choices array cannot be empty"""
|
|
326
347
|
|
|
@@ -335,6 +356,12 @@ class AutoEvaluationGuidedDecodingEvaluationTaskConfiguration(TypedDict, total=F
|
|
|
335
356
|
system_prompt: str
|
|
336
357
|
|
|
337
358
|
|
|
359
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfiguration: TypeAlias = Union[
|
|
360
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationStructuredOutputTaskRequestWithItemLocator,
|
|
361
|
+
AutoEvaluationGuidedDecodingEvaluationTaskConfigurationAutoEvaluationGuidedDecodingTaskRequestWithItemLocator,
|
|
362
|
+
]
|
|
363
|
+
|
|
364
|
+
|
|
338
365
|
class AutoEvaluationGuidedDecodingEvaluationTask(TypedDict, total=False):
|
|
339
366
|
configuration: Required[AutoEvaluationGuidedDecodingEvaluationTaskConfiguration]
|
|
340
367
|
|
scale_gp_beta/types/file.py
CHANGED
|
@@ -6,6 +6,7 @@ from datetime import datetime
|
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
from .._models import BaseModel
|
|
9
|
+
from .shared.identity import Identity
|
|
9
10
|
|
|
10
11
|
__all__ = ["File"]
|
|
11
12
|
|
|
@@ -15,7 +16,8 @@ class File(BaseModel):
|
|
|
15
16
|
|
|
16
17
|
created_at: datetime
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
created_by: Identity
|
|
20
|
+
"""The identity that created the entity."""
|
|
19
21
|
|
|
20
22
|
filename: str
|
|
21
23
|
|
|
@@ -131,6 +131,7 @@ class VendorConfigurationLlmEngineVendorConfiguration(BaseModel):
|
|
|
131
131
|
|
|
132
132
|
storage: Optional[str] = None
|
|
133
133
|
|
|
134
|
+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
|
|
134
135
|
if TYPE_CHECKING:
|
|
135
136
|
# Stub to indicate that arbitrary properties are accepted.
|
|
136
137
|
# To access properties that are not valid identifiers you can use `getattr`, e.g.
|
|
@@ -148,6 +149,8 @@ class InferenceModel(BaseModel):
|
|
|
148
149
|
|
|
149
150
|
created_at: datetime
|
|
150
151
|
|
|
152
|
+
created_by_identity_type: Literal["user", "service_account"]
|
|
153
|
+
|
|
151
154
|
created_by_user_id: str
|
|
152
155
|
|
|
153
156
|
type: Literal["generic", "completion", "chat_completion"] = FieldInfo(alias="model_type")
|
scale_gp_beta/types/question.py
CHANGED
|
@@ -6,6 +6,7 @@ from typing_extensions import Literal, Annotated, TypeAlias
|
|
|
6
6
|
|
|
7
7
|
from .._utils import PropertyInfo
|
|
8
8
|
from .._models import BaseModel
|
|
9
|
+
from .shared.identity import Identity
|
|
9
10
|
|
|
10
11
|
__all__ = [
|
|
11
12
|
"Question",
|
|
@@ -36,8 +37,8 @@ class CategoricalQuestion(BaseModel):
|
|
|
36
37
|
created_at: datetime
|
|
37
38
|
"""ISO-timestamp when the entity was created"""
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
"""
|
|
40
|
+
created_by: Identity
|
|
41
|
+
"""The identity that created the entity."""
|
|
41
42
|
|
|
42
43
|
name: str
|
|
43
44
|
|
|
@@ -69,8 +70,8 @@ class RatingQuestion(BaseModel):
|
|
|
69
70
|
created_at: datetime
|
|
70
71
|
"""ISO-timestamp when the entity was created"""
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
"""
|
|
73
|
+
created_by: Identity
|
|
74
|
+
"""The identity that created the entity."""
|
|
74
75
|
|
|
75
76
|
name: str
|
|
76
77
|
|
|
@@ -97,8 +98,8 @@ class NumberQuestion(BaseModel):
|
|
|
97
98
|
created_at: datetime
|
|
98
99
|
"""ISO-timestamp when the entity was created"""
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
"""
|
|
101
|
+
created_by: Identity
|
|
102
|
+
"""The identity that created the entity."""
|
|
102
103
|
|
|
103
104
|
name: str
|
|
104
105
|
|
|
@@ -127,8 +128,8 @@ class FreeTextQuestion(BaseModel):
|
|
|
127
128
|
created_at: datetime
|
|
128
129
|
"""ISO-timestamp when the entity was created"""
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
"""
|
|
131
|
+
created_by: Identity
|
|
132
|
+
"""The identity that created the entity."""
|
|
132
133
|
|
|
133
134
|
name: str
|
|
134
135
|
|
|
@@ -156,8 +157,8 @@ class FormQuestion(BaseModel):
|
|
|
156
157
|
created_at: datetime
|
|
157
158
|
"""ISO-timestamp when the entity was created"""
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
"""
|
|
160
|
+
created_by: Identity
|
|
161
|
+
"""The identity that created the entity."""
|
|
161
162
|
|
|
162
163
|
name: str
|
|
163
164
|
|