-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,153 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
Copyright 2024 KubeAGI. | ||
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. | ||
*/ | ||
package v1alpha1 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
type ConditionType string | ||
|
||
// These are built-in conditions of a RAG's job. | ||
const ( | ||
// JobComplete means the job has completed its execution. | ||
Complete ConditionType = "Complete" | ||
// JobFailed means the job has failed its execution. | ||
Failed ConditionType = "Failed" | ||
) | ||
|
||
// JobCondition describes current state of a job. | ||
type Condition struct { | ||
// Type of job condition, Complete or Failed. | ||
Type ConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"` | ||
// Status of the condition, one of True, False, Unknown. | ||
Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` | ||
// Last time the condition was checked. | ||
// +optional | ||
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` | ||
// Last time the condition transit from one status to another. | ||
// +optional | ||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` | ||
// (brief) reason for the condition's last transition. | ||
// +optional | ||
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` | ||
// Human readable message indicating details about last transition. | ||
// +optional | ||
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` | ||
} | ||
|
||
type RAGPhase string | ||
|
||
const ( | ||
InitPvcPhase RAGPhase = "init" | ||
DownloadFilesPhase RAGPhase = "download" | ||
GenerateTestFilesPhase RAGPhase = "generate" | ||
JudgeLLMPhase RAGPhase = "judge" | ||
UploadFilesPhase RAGPhase = "upload" | ||
CompletePhase RAGPhase = "complte" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.