Documentation
¶
Overview ¶
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved. Portions Copyright 2025 The OpenAgent Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved. Portions Copyright 2025 The OpenAgent Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved. Portions Copyright 2025 The OpenAgent Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved. Portions Copyright 2025 The OpenAgent Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved. Portions Copyright 2025 The OpenAgent Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2025 Hanzo AI Inc. All Rights Reserved. Portions Copyright 2025 The OpenAgent Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func DeleteTrainJob(job *object.FinetuneJob, lang string) error
- func Deploy(application *object.Application, lang string) (bool, error)
- func DeploySync(application *object.Application, lang string) (bool, error)
- func Describe(apps []*object.Application, lang string)
- func FailureReason(namespace string, lang string) (string, error)
- func FinetuneNamespace(owner string) string
- func Manifest(application *object.Application, lang string) (string, error)
- func Phase(owner, name, namespace string, lang string) (string, error)
- func Status(lang string) (string, error)
- func SubmitTrainJob(job *object.FinetuneJob, hp object.Hyperparams, token, lang string) error
- func URL(namespace string, lang string) (string, error)
- func Undeploy(owner, name, namespace string, lang string) (bool, error)
- func UndeployFinetune(job *object.FinetuneJob, lang string) error
- func UndeploySync(owner, name, namespace string, lang string) (bool, error)
- func View(namespace string, lang string) (*object.ApplicationView, error)
- type Client
- type Serving
- type TrainJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteTrainJob ¶
func DeleteTrainJob(job *object.FinetuneJob, lang string) error
DeleteTrainJob deletes the TrainJob CR (used for cancel). NotFound is not an error — the desired end state (gone) is already met.
func DeploySync ¶
func DeploySync(application *object.Application, lang string) (bool, error)
func Describe ¶
func Describe(apps []*object.Application, lang string)
func FailureReason ¶
FailureReason returns the failure reason for an application deployment
func FinetuneNamespace ¶
FinetuneNamespace is the per-org namespace TrainJobs (and their HF-token Secret) live in, isolating one tenant's runs from another's.
func Manifest ¶
func Manifest(application *object.Application, lang string) (string, error)
Manifest renders an application's deployment manifest from its template and parameters. Callers set it on the record before saving; nothing here touches a cluster. This is the only kustomize caller in the tree.
func SubmitTrainJob ¶
func SubmitTrainJob(job *object.FinetuneJob, hp object.Hyperparams, token, lang string) error
SubmitTrainJob provisions the namespace + HF-token Secret and applies the TrainJob CR. token may be "" (public repos only). Returns the namespace + CR name it used (already set on job before the call).
func UndeployFinetune ¶
func UndeployFinetune(job *object.FinetuneJob, lang string) error
UndeployFinetune deletes the InferenceService and the model registration.
func UndeploySync ¶
UndeploySync undeploys application and waits for it to be completely removed
Types ¶
type Serving ¶
type Serving struct {
ModelId string `json:"modelId"` // public model id (use in /v1/chat/completions)
Provider string `json:"provider"` // the registered provider name
Service string `json:"service"` // InferenceService name
Namespace string `json:"namespace"` // its namespace
Url string `json:"url"` // status.url, when already available
}
Serving is what a deploy returns to the controller.
func DeployFinetune ¶
func DeployFinetune(job *object.FinetuneJob, lang string) (*Serving, error)
DeployFinetune serves a completed job's checkpoints and registers the result as a routable model. Requires a succeeded job with an OutputUri. Idempotent: re-deploying updates the InferenceService + model records in place.
type TrainJob ¶
type TrainJob struct {
Status string // pending|queued|running|succeeded|failed|cancelled
Progress int // 0..100 (best-effort)
Message string
Started string // RFC3339, when the run entered Running (best-effort)
Finished string // RFC3339, when it reached a terminal state (best-effort)
Found bool // false when the CR no longer exists in the cluster
}
TrainJob is the live status read back from a TrainJob CR.
func TrainJobStatus ¶
func TrainJobStatus(job *object.FinetuneJob, lang string) (*TrainJob, error)
TrainJobStatus reads the TrainJob CR and maps its conditions to a object.FinetuneJob status. Found=false (no error) when the CR is gone.