mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-21 03:59:42 +00:00
Updates to notebook; use direct requests to NeMo where needed
This commit is contained in:
parent
c04ab0133d
commit
57813f5606
6 changed files with 659 additions and 155 deletions
34
docs/_static/llama-stack-spec.html
vendored
34
docs/_static/llama-stack-spec.html
vendored
|
@ -6347,7 +6347,36 @@
|
||||||
"default": "model"
|
"default": "model"
|
||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"type": "string",
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"description": "The model ID to evaluate."
|
"description": "The model ID to evaluate."
|
||||||
},
|
},
|
||||||
"sampling_params": {
|
"sampling_params": {
|
||||||
|
@ -6362,8 +6391,7 @@
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": [
|
||||||
"type",
|
"type",
|
||||||
"model",
|
"model"
|
||||||
"sampling_params"
|
|
||||||
],
|
],
|
||||||
"title": "ModelCandidate",
|
"title": "ModelCandidate",
|
||||||
"description": "A model candidate for evaluation."
|
"description": "A model candidate for evaluation."
|
||||||
|
|
13
docs/_static/llama-stack-spec.yaml
vendored
13
docs/_static/llama-stack-spec.yaml
vendored
|
@ -4468,7 +4468,17 @@ components:
|
||||||
const: model
|
const: model
|
||||||
default: model
|
default: model
|
||||||
model:
|
model:
|
||||||
type: string
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
- type: object
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
description: The model ID to evaluate.
|
description: The model ID to evaluate.
|
||||||
sampling_params:
|
sampling_params:
|
||||||
$ref: '#/components/schemas/SamplingParams'
|
$ref: '#/components/schemas/SamplingParams'
|
||||||
|
@ -4482,7 +4492,6 @@ components:
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- model
|
- model
|
||||||
- sampling_params
|
|
||||||
title: ModelCandidate
|
title: ModelCandidate
|
||||||
description: A model candidate for evaluation.
|
description: A model candidate for evaluation.
|
||||||
RegexParserScoringFnParams:
|
RegexParserScoringFnParams:
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -27,8 +27,8 @@ class ModelCandidate(BaseModel):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
type: Literal["model"] = "model"
|
type: Literal["model"] = "model"
|
||||||
model: str
|
model: Union[str, Dict[str, Any]]
|
||||||
sampling_params: SamplingParams
|
sampling_params: Optional[SamplingParams] = Field(default_factory=SamplingParams)
|
||||||
system_message: Optional[SystemMessage] = None
|
system_message: Optional[SystemMessage] = None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -48,13 +48,13 @@ class NVIDIAEvalImpl(
|
||||||
|
|
||||||
async def _evaluator_get(self, path):
|
async def _evaluator_get(self, path):
|
||||||
"""Helper for making GET requests to the evaluator service."""
|
"""Helper for making GET requests to the evaluator service."""
|
||||||
response = requests.get(url=f"{self.config.evaluator_service_url}/{path}")
|
response = requests.get(url=f"{self.config.evaluator_service_url}{path}")
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
async def _evaluator_post(self, path, data):
|
async def _evaluator_post(self, path, data):
|
||||||
"""Helper for making POST requests to the evaluator service."""
|
"""Helper for making POST requests to the evaluator service."""
|
||||||
response = requests.post(url=f"{self.config.evaluator_service_url}/{path}", json=data)
|
response = requests.post(url=f"{self.config.evaluator_service_url}{path}", json=data)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
|
|
|
@ -408,7 +408,7 @@ class NvidiaPostTrainingAdapter(ModelRegistryHelper):
|
||||||
if v is not None
|
if v is not None
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError(f"JASH was here Unsupported algorithm config: {algorithm_config}")
|
raise NotImplementedError(f"Unsupported algorithm config: {algorithm_config}")
|
||||||
|
|
||||||
# Create the customization job
|
# Create the customization job
|
||||||
response = await self._make_request(
|
response = await self._make_request(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue