Documentation
¶
Index ¶
- Variables
- func GetDatabase() *badger.DB
- func GetExecutionKey(unit *ExecutionUnit) string
- func GetExecutorForLanguageMap() map[string]string
- func GetFileExtensionsMap() map[string]string
- func GetInferenceKey(prompt string, modelName string) string
- func GetResponseKey(request *TranslationRequest) string
- func LoadConfig(filename string) error
- func RegisterInfrastructureServiceServer(s grpc.ServiceRegistrar, srv InfrastructureServiceServer)
- func RegisterTranslationServiceServer(s grpc.ServiceRegistrar, srv TranslationServiceServer)
- func SaveBatchResponseToFile(baseFileName string, baseFilePath string, response *BatchTranslationResponse)
- func SaveExecutionToCache(request *ExecutionUnit)
- func SaveInferenceResponseToCache(prompt string, modelName string, response InferenceResult)
- func SaveResponseToCache(request *TranslationRequest, response *TranslationResponse)
- func StoreDatabase(database *badger.DB)
- type AppConfig
- type BatchTranslationRequest
- func (*BatchTranslationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BatchTranslationRequest) GetFileBaseName() string
- func (x *BatchTranslationRequest) GetFileSavePath() string
- func (x *BatchTranslationRequest) GetId() string
- func (x *BatchTranslationRequest) GetTranslationRequests() []*TranslationRequest
- func (*BatchTranslationRequest) ProtoMessage()
- func (x *BatchTranslationRequest) ProtoReflect() protoreflect.Message
- func (x *BatchTranslationRequest) Reset()
- func (x *BatchTranslationRequest) String() string
- type BatchTranslationResponse
- func (*BatchTranslationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BatchTranslationResponse) GetRequestId() string
- func (x *BatchTranslationResponse) GetReturnedToDisk() bool
- func (x *BatchTranslationResponse) GetTranslationResponses() []*TranslationResponse
- func (*BatchTranslationResponse) ProtoMessage()
- func (x *BatchTranslationResponse) ProtoReflect() protoreflect.Message
- func (x *BatchTranslationResponse) Reset()
- func (x *BatchTranslationResponse) String() string
- type BatchVerificationRequest
- func (*BatchVerificationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BatchVerificationRequest) GetId() string
- func (x *BatchVerificationRequest) GetVerificationRequests() []*VerificationRequest
- func (*BatchVerificationRequest) ProtoMessage()
- func (x *BatchVerificationRequest) ProtoReflect() protoreflect.Message
- func (x *BatchVerificationRequest) Reset()
- func (x *BatchVerificationRequest) String() string
- type BatchVerificationResponse
- func (*BatchVerificationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BatchVerificationResponse) GetVerificationRequests() *VerificationRequest
- func (x *BatchVerificationResponse) GetVerificationResponses() []*VerificationResponse
- func (*BatchVerificationResponse) ProtoMessage()
- func (x *BatchVerificationResponse) ProtoReflect() protoreflect.Message
- func (x *BatchVerificationResponse) Reset()
- func (x *BatchVerificationResponse) String() string
- type Counter
- type ExecutionType
- type ExecutionUnit
- type FuzzyTest
- type FuzzyTestCase
- func (*FuzzyTestCase) Descriptor() ([]byte, []int)deprecated
- func (x *FuzzyTestCase) GetExpectedOutput() string
- func (x *FuzzyTestCase) GetStdinInput() string
- func (*FuzzyTestCase) ProtoMessage()
- func (x *FuzzyTestCase) ProtoReflect() protoreflect.Message
- func (x *FuzzyTestCase) Reset()
- func (x *FuzzyTestCase) String() string
- type InferenceResult
- type InferenceUnit
- type InfrastructureServiceClient
- type InfrastructureServiceServer
- type LaunchResponse
- type Path
- type ResponseFuzzyTestCase
- func (*ResponseFuzzyTestCase) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseFuzzyTestCase) GetActualOutput() string
- func (x *ResponseFuzzyTestCase) GetExecutedCode() string
- func (x *ResponseFuzzyTestCase) GetExpectedOutput() string
- func (x *ResponseFuzzyTestCase) GetPassed() bool
- func (x *ResponseFuzzyTestCase) GetStdinInput() string
- func (*ResponseFuzzyTestCase) ProtoMessage()
- func (x *ResponseFuzzyTestCase) ProtoReflect() protoreflect.Message
- func (x *ResponseFuzzyTestCase) Reset()
- func (x *ResponseFuzzyTestCase) String() string
- type ResponseStatus
- func (ResponseStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ResponseStatus) Enum() *ResponseStatus
- func (ResponseStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResponseStatus) Number() protoreflect.EnumNumber
- func (x ResponseStatus) String() string
- func (ResponseStatus) Type() protoreflect.EnumType
- type ResponseTranslationEdge
- func (*ResponseTranslationEdge) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseTranslationEdge) GetEdgeId() int32
- func (x *ResponseTranslationEdge) GetExecutionOutput() string
- func (x *ResponseTranslationEdge) GetExtractedSourceCode() string
- func (x *ResponseTranslationEdge) GetFuzzyTests() []*ResponseFuzzyTestCase
- func (x *ResponseTranslationEdge) GetInferenceOutput() string
- func (x *ResponseTranslationEdge) GetInputLanguage() string
- func (x *ResponseTranslationEdge) GetLevel() int32
- func (x *ResponseTranslationEdge) GetParentEdgeId() int32
- func (x *ResponseTranslationEdge) GetPrompt() string
- func (x *ResponseTranslationEdge) GetPromptTemplate() string
- func (x *ResponseTranslationEdge) GetSourceCode() string
- func (x *ResponseTranslationEdge) GetStatus() string
- func (x *ResponseTranslationEdge) GetSuccess() bool
- func (x *ResponseTranslationEdge) GetTargetLanguage() string
- func (x *ResponseTranslationEdge) GetTranslationId() string
- func (x *ResponseTranslationEdge) GetUnitTests() []*ResponseUnitTestCase
- func (x *ResponseTranslationEdge) GetUsedInferenceCache() bool
- func (x *ResponseTranslationEdge) GetUsedMemoization() bool
- func (x *ResponseTranslationEdge) GetWallTimeInference() int64
- func (x *ResponseTranslationEdge) GetWallTimeTestExecution() int64
- func (*ResponseTranslationEdge) ProtoMessage()
- func (x *ResponseTranslationEdge) ProtoReflect() protoreflect.Message
- func (x *ResponseTranslationEdge) Reset()
- func (x *ResponseTranslationEdge) String() string
- type ResponseTranslationPath
- func (*ResponseTranslationPath) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseTranslationPath) GetEdgeIndexMemoized() []bool
- func (x *ResponseTranslationPath) GetTranslationEdges() []*ResponseTranslationEdge
- func (*ResponseTranslationPath) ProtoMessage()
- func (x *ResponseTranslationPath) ProtoReflect() protoreflect.Message
- func (x *ResponseTranslationPath) Reset()
- func (x *ResponseTranslationPath) String() string
- type ResponseUnitTestCase
- func (*ResponseUnitTestCase) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseUnitTestCase) GetActualOutput() string
- func (x *ResponseUnitTestCase) GetExecutedCode() string
- func (x *ResponseUnitTestCase) GetPassed() bool
- func (x *ResponseUnitTestCase) GetSourceCode() string
- func (*ResponseUnitTestCase) ProtoMessage()
- func (x *ResponseUnitTestCase) ProtoReflect() protoreflect.Message
- func (x *ResponseUnitTestCase) Reset()
- func (x *ResponseUnitTestCase) String() string
- type StartEndpointRequest
- func (*StartEndpointRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartEndpointRequest) GetApiToken() string
- func (x *StartEndpointRequest) GetGpuId() string
- func (x *StartEndpointRequest) GetLoraPath() string
- func (x *StartEndpointRequest) GetModelName() string
- func (x *StartEndpointRequest) GetPort() string
- func (x *StartEndpointRequest) GetSeed() int64
- func (*StartEndpointRequest) ProtoMessage()
- func (x *StartEndpointRequest) ProtoReflect() protoreflect.Message
- func (x *StartEndpointRequest) Reset()
- func (x *StartEndpointRequest) String() string
- type Status
- type StopEndpointRequest
- func (*StopEndpointRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StopEndpointRequest) GetLaunchId() int64
- func (*StopEndpointRequest) ProtoMessage()
- func (x *StopEndpointRequest) ProtoReflect() protoreflect.Message
- func (x *StopEndpointRequest) Reset()
- func (x *StopEndpointRequest) String() string
- type TargetSignature
- func (*TargetSignature) Descriptor() ([]byte, []int)deprecated
- func (x *TargetSignature) GetLanguage() string
- func (x *TargetSignature) GetSignature() string
- func (*TargetSignature) ProtoMessage()
- func (x *TargetSignature) ProtoReflect() protoreflect.Message
- func (x *TargetSignature) Reset()
- func (x *TargetSignature) String() string
- type TestSuite
- func (*TestSuite) Descriptor() ([]byte, []int)deprecated
- func (x *TestSuite) GetFuzzySuite() []*FuzzyTestCase
- func (x *TestSuite) GetUnitTestSuite() []*UnitTestCase
- func (*TestSuite) ProtoMessage()
- func (x *TestSuite) ProtoReflect() protoreflect.Message
- func (x *TestSuite) Reset()
- func (x *TestSuite) String() string
- type TranslationEdge
- func (te *TranslationEdge) GetDepth() int
- func (e *TranslationEdge) GetStatus() Status
- func (te *TranslationEdge) IsDirectPathToTarget(targetLanguage string) bool
- func (e *TranslationEdge) SetStatus(newStatus Status)
- func (e TranslationEdge) String() string
- func (e *TranslationEdge) UpdatePendingStatus(newStatus Status)
- type TranslationPair
- type TranslationPaths
- type TranslationRequest
- func (*TranslationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TranslationRequest) GetExtraPromptData() string
- func (x *TranslationRequest) GetId() string
- func (x *TranslationRequest) GetModelName() string
- func (x *TranslationRequest) GetPromptTemplateName() string
- func (x *TranslationRequest) GetRegexTemplateName() string
- func (x *TranslationRequest) GetSeedCode() string
- func (x *TranslationRequest) GetSeedLanguage() string
- func (x *TranslationRequest) GetTargetLanguage() string
- func (x *TranslationRequest) GetTargetSignatures() []*TargetSignature
- func (x *TranslationRequest) GetTestSuite() *TestSuite
- func (x *TranslationRequest) GetUsedLanguages() []string
- func (*TranslationRequest) ProtoMessage()
- func (x *TranslationRequest) ProtoReflect() protoreflect.Message
- func (x *TranslationRequest) Reset()
- func (x *TranslationRequest) String() string
- type TranslationResponse
- func (*TranslationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TranslationResponse) GetPaths() []*ResponseTranslationPath
- func (x *TranslationResponse) GetTranslationRequest() *TranslationRequest
- func (*TranslationResponse) ProtoMessage()
- func (x *TranslationResponse) ProtoReflect() protoreflect.Message
- func (x *TranslationResponse) Reset()
- func (x *TranslationResponse) String() string
- type TranslationServiceClient
- type TranslationServiceServer
- type TreeBranch
- type UnimplementedInfrastructureServiceServer
- type UnimplementedTranslationServiceServer
- func (UnimplementedTranslationServiceServer) BatchPanEtAlTranslate(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
- func (UnimplementedTranslationServiceServer) BatchRunVerification(context.Context, *BatchVerificationRequest) (*BatchVerificationResponse, error)
- func (UnimplementedTranslationServiceServer) BatchTranslate(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
- func (UnimplementedTranslationServiceServer) BatchTranslateCAK(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
- type UnitTest
- type UnitTestCase
- func (*UnitTestCase) Descriptor() ([]byte, []int)deprecated
- func (x *UnitTestCase) GetImports() string
- func (x *UnitTestCase) GetLanguage() string
- func (x *UnitTestCase) GetTestCase() string
- func (*UnitTestCase) ProtoMessage()
- func (x *UnitTestCase) ProtoReflect() protoreflect.Message
- func (x *UnitTestCase) Reset()
- func (x *UnitTestCase) String() string
- type UnsafeInfrastructureServiceServer
- type UnsafeTranslationServiceServer
- type VerificationRequest
- func (*VerificationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerificationRequest) GetId() string
- func (x *VerificationRequest) GetInferenceOutput() string
- func (x *VerificationRequest) GetSourceLanguage() string
- func (x *VerificationRequest) GetTargetLanguage() string
- func (x *VerificationRequest) GetTestSuite() *TestSuite
- func (*VerificationRequest) ProtoMessage()
- func (x *VerificationRequest) ProtoReflect() protoreflect.Message
- func (x *VerificationRequest) Reset()
- func (x *VerificationRequest) String() string
- type VerificationResponse
- func (*VerificationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerificationResponse) GetFuzzyTests() []*ResponseFuzzyTestCase
- func (x *VerificationResponse) GetStatus() string
- func (x *VerificationResponse) GetUnitTests() []*ResponseUnitTestCase
- func (x *VerificationResponse) GetVerificationRequest() *VerificationRequest
- func (*VerificationResponse) ProtoMessage()
- func (x *VerificationResponse) ProtoReflect() protoreflect.Message
- func (x *VerificationResponse) Reset()
- func (x *VerificationResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ResponseStatus_name = map[int32]string{ 0: "PENDING", 1: "PROCESSING", 2: "FAILED", 3: "DONE", 4: "TRANSLATION_FOUND", 5: "SKIPPED_PARENT_FAILED", 6: "SKIPPED_TRANSLATION_FOUND", } ResponseStatus_value = map[string]int32{ "PENDING": 0, "PROCESSING": 1, "FAILED": 2, "DONE": 3, "TRANSLATION_FOUND": 4, "SKIPPED_PARENT_FAILED": 5, "SKIPPED_TRANSLATION_FOUND": 6, } )
Enum value maps for ResponseStatus.
var File_protos_proto protoreflect.FileDescriptor
var InfrastructureService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "InfrastructureService", HandlerType: (*InfrastructureServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "LaunchInferenceEndpoint", Handler: _InfrastructureService_LaunchInferenceEndpoint_Handler, }, { MethodName: "StopInferenceEndpoint", Handler: _InfrastructureService_StopInferenceEndpoint_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos.proto", }
InfrastructureService_ServiceDesc is the grpc.ServiceDesc for InfrastructureService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TranslationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "TranslationService", HandlerType: (*TranslationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "BatchTranslate", Handler: _TranslationService_BatchTranslate_Handler, }, { MethodName: "BatchTranslateCAK", Handler: _TranslationService_BatchTranslateCAK_Handler, }, { MethodName: "BatchPanEtAlTranslate", Handler: _TranslationService_BatchPanEtAlTranslate_Handler, }, { MethodName: "BatchRunVerification", Handler: _TranslationService_BatchRunVerification_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos.proto", }
TranslationService_ServiceDesc is the grpc.ServiceDesc for TranslationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func GetDatabase ¶
func GetExecutionKey ¶
func GetExecutionKey(unit *ExecutionUnit) string
func GetFileExtensionsMap ¶
func GetInferenceKey ¶
func GetResponseKey ¶
func GetResponseKey(request *TranslationRequest) string
func LoadConfig ¶
func RegisterInfrastructureServiceServer ¶
func RegisterInfrastructureServiceServer(s grpc.ServiceRegistrar, srv InfrastructureServiceServer)
func RegisterTranslationServiceServer ¶
func RegisterTranslationServiceServer(s grpc.ServiceRegistrar, srv TranslationServiceServer)
func SaveBatchResponseToFile ¶
func SaveBatchResponseToFile(baseFileName string, baseFilePath string, response *BatchTranslationResponse)
func SaveExecutionToCache ¶
func SaveExecutionToCache(request *ExecutionUnit)
func SaveInferenceResponseToCache ¶
func SaveInferenceResponseToCache(prompt string, modelName string, response InferenceResult)
func SaveResponseToCache ¶
func SaveResponseToCache(request *TranslationRequest, response *TranslationResponse)
func StoreDatabase ¶
Types ¶
type AppConfig ¶
type AppConfig struct {
NumExecutionWorkers int `yaml:"numExecutionWorkers"`
NumInferenceWorkers int `yaml:"numInferenceWorkers"`
InferenceApiBaseUrls []string `yaml:"inferenceApiBaseUrls"`
InferenceApiToken string `yaml:"inferenceApiToken"`
ServerAddress string `yaml:"serverAddress"`
ServerPort string `yaml:"serverPort"`
ExpansionDepth int `yaml:"expansionIntermediaryNodes"`
PromptTemplates map[string]string `yaml:"promptTemplates"`
RegexTemplates map[string]string `yaml:"regexTemplates"`
ExecutionContainers map[string]string `yaml:"executionContainers"`
ComputeEfficientMode bool `yaml:"useComputeEfficientMode"`
ApplyRegexInferenceOnly bool `yaml:"applyRegexInferenceOnly"`
EarlyStopOnTranslationSuccess bool `yaml:"earlyStop"`
UseTranscoderTestFormat bool `yaml:"useTranscoderTestFormat"`
VerifyIntermediateTranslations bool `yaml:"verifyIntermediateTranslations"`
StopOnDirectTranslation bool `yaml:"stopOnDirectTranslation"`
UseIntermediatesMemoization bool `yaml:"useCrossPathIntermediatesMemoization"`
UseInferenceCache bool `yaml:"useInferenceCache"`
UseResponseCache bool `yaml:"useResponseCache"`
UseExecutionCache bool `yaml:"useExecutionCache"`
MaxGeneratedTokens int `yaml:"maxGeneratedTokens"`
TopP float32 `yaml:"top-p"`
TopK int `yaml:"top-k"`
Temperature float32 `yaml:"temperature"`
Seed int `yaml:"inferenceSeed"`
DatabasePath string `yaml:"cacheDatabasePath"`
InferenceBackend string `yaml:"inferenceBackend"`
}
var ConfigStore AppConfig
type BatchTranslationRequest ¶
type BatchTranslationRequest struct {
TranslationRequests []*TranslationRequest `protobuf:"bytes,1,rep,name=translation_requests,json=translationRequests,proto3" json:"translation_requests,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
FileBaseName string `protobuf:"bytes,3,opt,name=file_base_name,json=fileBaseName,proto3" json:"file_base_name,omitempty"`
FileSavePath string `protobuf:"bytes,4,opt,name=file_save_path,json=fileSavePath,proto3" json:"file_save_path,omitempty"`
// contains filtered or unexported fields
}
func (*BatchTranslationRequest) Descriptor
deprecated
func (*BatchTranslationRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchTranslationRequest.ProtoReflect.Descriptor instead.
func (*BatchTranslationRequest) GetFileBaseName ¶
func (x *BatchTranslationRequest) GetFileBaseName() string
func (*BatchTranslationRequest) GetFileSavePath ¶
func (x *BatchTranslationRequest) GetFileSavePath() string
func (*BatchTranslationRequest) GetId ¶
func (x *BatchTranslationRequest) GetId() string
func (*BatchTranslationRequest) GetTranslationRequests ¶
func (x *BatchTranslationRequest) GetTranslationRequests() []*TranslationRequest
func (*BatchTranslationRequest) ProtoMessage ¶
func (*BatchTranslationRequest) ProtoMessage()
func (*BatchTranslationRequest) ProtoReflect ¶
func (x *BatchTranslationRequest) ProtoReflect() protoreflect.Message
func (*BatchTranslationRequest) Reset ¶
func (x *BatchTranslationRequest) Reset()
func (*BatchTranslationRequest) String ¶
func (x *BatchTranslationRequest) String() string
type BatchTranslationResponse ¶
type BatchTranslationResponse struct {
TranslationResponses []*TranslationResponse `protobuf:"bytes,1,rep,name=translation_responses,json=translationResponses,proto3" json:"translation_responses,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ReturnedToDisk bool `protobuf:"varint,3,opt,name=returnedToDisk,proto3" json:"returnedToDisk,omitempty"`
// contains filtered or unexported fields
}
func (*BatchTranslationResponse) Descriptor
deprecated
func (*BatchTranslationResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchTranslationResponse.ProtoReflect.Descriptor instead.
func (*BatchTranslationResponse) GetRequestId ¶
func (x *BatchTranslationResponse) GetRequestId() string
func (*BatchTranslationResponse) GetReturnedToDisk ¶
func (x *BatchTranslationResponse) GetReturnedToDisk() bool
func (*BatchTranslationResponse) GetTranslationResponses ¶
func (x *BatchTranslationResponse) GetTranslationResponses() []*TranslationResponse
func (*BatchTranslationResponse) ProtoMessage ¶
func (*BatchTranslationResponse) ProtoMessage()
func (*BatchTranslationResponse) ProtoReflect ¶
func (x *BatchTranslationResponse) ProtoReflect() protoreflect.Message
func (*BatchTranslationResponse) Reset ¶
func (x *BatchTranslationResponse) Reset()
func (*BatchTranslationResponse) String ¶
func (x *BatchTranslationResponse) String() string
type BatchVerificationRequest ¶
type BatchVerificationRequest struct {
VerificationRequests []*VerificationRequest `protobuf:"bytes,1,rep,name=verification_requests,json=verificationRequests,proto3" json:"verification_requests,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*BatchVerificationRequest) Descriptor
deprecated
func (*BatchVerificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use BatchVerificationRequest.ProtoReflect.Descriptor instead.
func (*BatchVerificationRequest) GetId ¶
func (x *BatchVerificationRequest) GetId() string
func (*BatchVerificationRequest) GetVerificationRequests ¶
func (x *BatchVerificationRequest) GetVerificationRequests() []*VerificationRequest
func (*BatchVerificationRequest) ProtoMessage ¶
func (*BatchVerificationRequest) ProtoMessage()
func (*BatchVerificationRequest) ProtoReflect ¶
func (x *BatchVerificationRequest) ProtoReflect() protoreflect.Message
func (*BatchVerificationRequest) Reset ¶
func (x *BatchVerificationRequest) Reset()
func (*BatchVerificationRequest) String ¶
func (x *BatchVerificationRequest) String() string
type BatchVerificationResponse ¶
type BatchVerificationResponse struct {
VerificationRequests *VerificationRequest `protobuf:"bytes,1,opt,name=verification_requests,json=verificationRequests,proto3" json:"verification_requests,omitempty"`
VerificationResponses []*VerificationResponse `protobuf:"bytes,2,rep,name=verification_responses,json=verificationResponses,proto3" json:"verification_responses,omitempty"`
// contains filtered or unexported fields
}
func (*BatchVerificationResponse) Descriptor
deprecated
func (*BatchVerificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchVerificationResponse.ProtoReflect.Descriptor instead.
func (*BatchVerificationResponse) GetVerificationRequests ¶
func (x *BatchVerificationResponse) GetVerificationRequests() *VerificationRequest
func (*BatchVerificationResponse) GetVerificationResponses ¶
func (x *BatchVerificationResponse) GetVerificationResponses() []*VerificationResponse
func (*BatchVerificationResponse) ProtoMessage ¶
func (*BatchVerificationResponse) ProtoMessage()
func (*BatchVerificationResponse) ProtoReflect ¶
func (x *BatchVerificationResponse) ProtoReflect() protoreflect.Message
func (*BatchVerificationResponse) Reset ¶
func (x *BatchVerificationResponse) Reset()
func (*BatchVerificationResponse) String ¶
func (x *BatchVerificationResponse) String() string
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter struct to hold the current count
type ExecutionType ¶
type ExecutionType int
Define enum for Status
const ( UNK ExecutionType = iota TEST RUN )
func (ExecutionType) String ¶
func (s ExecutionType) String() string
type ExecutionUnit ¶
type ExecutionUnit struct {
SourceCode string
Language string
StdinData string
ExecutionOutput string
Success bool
ExecutedCode string
OutputChannel chan ExecutionUnit
ExecutionType ExecutionType
WallTime time.Duration
UsedExecutionCache bool
}
func LoadExistingExecutionResults ¶
func LoadExistingExecutionResults(request *ExecutionUnit) (ExecutionUnit, bool)
type FuzzyTest ¶
type FuzzyTest struct {
Input string
ExpectedOutput string
ActualOutput string
Passed bool
ExecutedCode string
ExitCodeZero bool
}
func FromResponseFuzzyTest ¶
func FromResponseFuzzyTest(response *ResponseFuzzyTestCase) FuzzyTest
func (*FuzzyTest) ToResponse ¶
func (unit *FuzzyTest) ToResponse() *ResponseFuzzyTestCase
type FuzzyTestCase ¶
type FuzzyTestCase struct {
StdinInput string `protobuf:"bytes,1,opt,name=stdin_input,json=stdinInput,proto3" json:"stdin_input,omitempty"`
ExpectedOutput string `protobuf:"bytes,2,opt,name=expected_output,json=expectedOutput,proto3" json:"expected_output,omitempty"`
// contains filtered or unexported fields
}
func (*FuzzyTestCase) Descriptor
deprecated
func (*FuzzyTestCase) Descriptor() ([]byte, []int)
Deprecated: Use FuzzyTestCase.ProtoReflect.Descriptor instead.
func (*FuzzyTestCase) GetExpectedOutput ¶
func (x *FuzzyTestCase) GetExpectedOutput() string
func (*FuzzyTestCase) GetStdinInput ¶
func (x *FuzzyTestCase) GetStdinInput() string
func (*FuzzyTestCase) ProtoMessage ¶
func (*FuzzyTestCase) ProtoMessage()
func (*FuzzyTestCase) ProtoReflect ¶
func (x *FuzzyTestCase) ProtoReflect() protoreflect.Message
func (*FuzzyTestCase) Reset ¶
func (x *FuzzyTestCase) Reset()
func (*FuzzyTestCase) String ¶
func (x *FuzzyTestCase) String() string
type InferenceResult ¶
func LoadInferenceExistingResponse ¶
func LoadInferenceExistingResponse(prompt string, modelName string) (InferenceResult, bool)
type InferenceUnit ¶
type InferenceUnit struct {
Prompt string
ModelName string
OutputChannel chan InferenceResult
WallTime time.Duration
}
type InfrastructureServiceClient ¶
type InfrastructureServiceClient interface {
LaunchInferenceEndpoint(ctx context.Context, in *StartEndpointRequest, opts ...grpc.CallOption) (*LaunchResponse, error)
StopInferenceEndpoint(ctx context.Context, in *StopEndpointRequest, opts ...grpc.CallOption) (*LaunchResponse, error)
}
InfrastructureServiceClient is the client API for InfrastructureService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewInfrastructureServiceClient ¶
func NewInfrastructureServiceClient(cc grpc.ClientConnInterface) InfrastructureServiceClient
type InfrastructureServiceServer ¶
type InfrastructureServiceServer interface {
LaunchInferenceEndpoint(context.Context, *StartEndpointRequest) (*LaunchResponse, error)
StopInferenceEndpoint(context.Context, *StopEndpointRequest) (*LaunchResponse, error)
// contains filtered or unexported methods
}
InfrastructureServiceServer is the server API for InfrastructureService service. All implementations must embed UnimplementedInfrastructureServiceServer for forward compatibility
type LaunchResponse ¶
type LaunchResponse struct {
LaunchId int64 `protobuf:"varint,1,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
// contains filtered or unexported fields
}
func (*LaunchResponse) Descriptor
deprecated
func (*LaunchResponse) Descriptor() ([]byte, []int)
Deprecated: Use LaunchResponse.ProtoReflect.Descriptor instead.
func (*LaunchResponse) GetLaunchId ¶
func (x *LaunchResponse) GetLaunchId() int64
func (*LaunchResponse) ProtoMessage ¶
func (*LaunchResponse) ProtoMessage()
func (*LaunchResponse) ProtoReflect ¶
func (x *LaunchResponse) ProtoReflect() protoreflect.Message
func (*LaunchResponse) Reset ¶
func (x *LaunchResponse) Reset()
func (*LaunchResponse) String ¶
func (x *LaunchResponse) String() string
type Path ¶
type Path struct {
Edges []*TranslationEdge
FinalTarget string
PriorityPathWeight int
UsedMemoizedEdgeIndex []bool
}
Define the Path struct that behaves like a list
func (Path) AlreadyVisited ¶
func (p Path) AlreadyVisited(te *TranslationEdge) bool
func (*Path) IncreasePriorityWeight ¶
func (p *Path) IncreasePriorityWeight()
Method to add an edge to the path
type ResponseFuzzyTestCase ¶
type ResponseFuzzyTestCase struct {
StdinInput string `protobuf:"bytes,1,opt,name=stdin_input,json=stdinInput,proto3" json:"stdin_input,omitempty"`
ExpectedOutput string `protobuf:"bytes,2,opt,name=expected_output,json=expectedOutput,proto3" json:"expected_output,omitempty"`
ActualOutput string `protobuf:"bytes,3,opt,name=actual_output,json=actualOutput,proto3" json:"actual_output,omitempty"`
Passed bool `protobuf:"varint,4,opt,name=passed,proto3" json:"passed,omitempty"`
ExecutedCode string `protobuf:"bytes,5,opt,name=executed_code,json=executedCode,proto3" json:"executed_code,omitempty"`
// contains filtered or unexported fields
}
func (*ResponseFuzzyTestCase) Descriptor
deprecated
func (*ResponseFuzzyTestCase) Descriptor() ([]byte, []int)
Deprecated: Use ResponseFuzzyTestCase.ProtoReflect.Descriptor instead.
func (*ResponseFuzzyTestCase) GetActualOutput ¶
func (x *ResponseFuzzyTestCase) GetActualOutput() string
func (*ResponseFuzzyTestCase) GetExecutedCode ¶
func (x *ResponseFuzzyTestCase) GetExecutedCode() string
func (*ResponseFuzzyTestCase) GetExpectedOutput ¶
func (x *ResponseFuzzyTestCase) GetExpectedOutput() string
func (*ResponseFuzzyTestCase) GetPassed ¶
func (x *ResponseFuzzyTestCase) GetPassed() bool
func (*ResponseFuzzyTestCase) GetStdinInput ¶
func (x *ResponseFuzzyTestCase) GetStdinInput() string
func (*ResponseFuzzyTestCase) ProtoMessage ¶
func (*ResponseFuzzyTestCase) ProtoMessage()
func (*ResponseFuzzyTestCase) ProtoReflect ¶
func (x *ResponseFuzzyTestCase) ProtoReflect() protoreflect.Message
func (*ResponseFuzzyTestCase) Reset ¶
func (x *ResponseFuzzyTestCase) Reset()
func (*ResponseFuzzyTestCase) String ¶
func (x *ResponseFuzzyTestCase) String() string
type ResponseStatus ¶
type ResponseStatus int32
const ( ResponseStatus_PENDING ResponseStatus = 0 ResponseStatus_PROCESSING ResponseStatus = 1 ResponseStatus_FAILED ResponseStatus = 2 ResponseStatus_DONE ResponseStatus = 3 ResponseStatus_TRANSLATION_FOUND ResponseStatus = 4 ResponseStatus_SKIPPED_PARENT_FAILED ResponseStatus = 5 ResponseStatus_SKIPPED_TRANSLATION_FOUND ResponseStatus = 6 )
func (ResponseStatus) Descriptor ¶
func (ResponseStatus) Descriptor() protoreflect.EnumDescriptor
func (ResponseStatus) Enum ¶
func (x ResponseStatus) Enum() *ResponseStatus
func (ResponseStatus) EnumDescriptor
deprecated
func (ResponseStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResponseStatus.Descriptor instead.
func (ResponseStatus) Number ¶
func (x ResponseStatus) Number() protoreflect.EnumNumber
func (ResponseStatus) String ¶
func (x ResponseStatus) String() string
func (ResponseStatus) Type ¶
func (ResponseStatus) Type() protoreflect.EnumType
type ResponseTranslationEdge ¶
type ResponseTranslationEdge struct {
PromptTemplate string `protobuf:"bytes,1,opt,name=prompt_template,json=promptTemplate,proto3" json:"prompt_template,omitempty"`
Prompt string `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"`
TranslationId string `protobuf:"bytes,3,opt,name=translation_id,json=translationId,proto3" json:"translation_id,omitempty"`
InputLanguage string `protobuf:"bytes,4,opt,name=input_language,json=inputLanguage,proto3" json:"input_language,omitempty"`
TargetLanguage string `protobuf:"bytes,5,opt,name=target_language,json=targetLanguage,proto3" json:"target_language,omitempty"`
Level int32 `protobuf:"varint,6,opt,name=level,proto3" json:"level,omitempty"`
Success bool `protobuf:"varint,7,opt,name=success,proto3" json:"success,omitempty"`
InferenceOutput string `protobuf:"bytes,8,opt,name=inference_output,json=inferenceOutput,proto3" json:"inference_output,omitempty"`
ExecutionOutput string `protobuf:"bytes,9,opt,name=execution_output,json=executionOutput,proto3" json:"execution_output,omitempty"`
SourceCode string `protobuf:"bytes,10,opt,name=source_code,json=sourceCode,proto3" json:"source_code,omitempty"`
ExtractedSourceCode string `protobuf:"bytes,11,opt,name=extracted_source_code,json=extractedSourceCode,proto3" json:"extracted_source_code,omitempty"`
ParentEdgeId int32 `protobuf:"varint,12,opt,name=parent_edge_id,json=parentEdgeId,proto3" json:"parent_edge_id,omitempty"`
Status string `protobuf:"bytes,13,opt,name=status,proto3" json:"status,omitempty"`
FuzzyTests []*ResponseFuzzyTestCase `protobuf:"bytes,14,rep,name=fuzzy_tests,json=fuzzyTests,proto3" json:"fuzzy_tests,omitempty"`
UnitTests []*ResponseUnitTestCase `protobuf:"bytes,15,rep,name=unit_tests,json=unitTests,proto3" json:"unit_tests,omitempty"`
EdgeId int32 `protobuf:"varint,16,opt,name=edge_id,json=edgeId,proto3" json:"edge_id,omitempty"`
WallTimeInference int64 `protobuf:"varint,17,opt,name=wallTimeInference,proto3" json:"wallTimeInference,omitempty"`
WallTimeTestExecution int64 `protobuf:"varint,18,opt,name=wallTimeTestExecution,proto3" json:"wallTimeTestExecution,omitempty"`
UsedMemoization bool `protobuf:"varint,19,opt,name=usedMemoization,proto3" json:"usedMemoization,omitempty"`
UsedInferenceCache bool `protobuf:"varint,20,opt,name=usedInferenceCache,proto3" json:"usedInferenceCache,omitempty"`
// contains filtered or unexported fields
}
func (*ResponseTranslationEdge) Descriptor
deprecated
func (*ResponseTranslationEdge) Descriptor() ([]byte, []int)
Deprecated: Use ResponseTranslationEdge.ProtoReflect.Descriptor instead.
func (*ResponseTranslationEdge) GetEdgeId ¶
func (x *ResponseTranslationEdge) GetEdgeId() int32
func (*ResponseTranslationEdge) GetExecutionOutput ¶
func (x *ResponseTranslationEdge) GetExecutionOutput() string
func (*ResponseTranslationEdge) GetExtractedSourceCode ¶
func (x *ResponseTranslationEdge) GetExtractedSourceCode() string
func (*ResponseTranslationEdge) GetFuzzyTests ¶
func (x *ResponseTranslationEdge) GetFuzzyTests() []*ResponseFuzzyTestCase
func (*ResponseTranslationEdge) GetInferenceOutput ¶
func (x *ResponseTranslationEdge) GetInferenceOutput() string
func (*ResponseTranslationEdge) GetInputLanguage ¶
func (x *ResponseTranslationEdge) GetInputLanguage() string
func (*ResponseTranslationEdge) GetLevel ¶
func (x *ResponseTranslationEdge) GetLevel() int32
func (*ResponseTranslationEdge) GetParentEdgeId ¶
func (x *ResponseTranslationEdge) GetParentEdgeId() int32
func (*ResponseTranslationEdge) GetPrompt ¶
func (x *ResponseTranslationEdge) GetPrompt() string
func (*ResponseTranslationEdge) GetPromptTemplate ¶
func (x *ResponseTranslationEdge) GetPromptTemplate() string
func (*ResponseTranslationEdge) GetSourceCode ¶
func (x *ResponseTranslationEdge) GetSourceCode() string
func (*ResponseTranslationEdge) GetStatus ¶
func (x *ResponseTranslationEdge) GetStatus() string
func (*ResponseTranslationEdge) GetSuccess ¶
func (x *ResponseTranslationEdge) GetSuccess() bool
func (*ResponseTranslationEdge) GetTargetLanguage ¶
func (x *ResponseTranslationEdge) GetTargetLanguage() string
func (*ResponseTranslationEdge) GetTranslationId ¶
func (x *ResponseTranslationEdge) GetTranslationId() string
func (*ResponseTranslationEdge) GetUnitTests ¶
func (x *ResponseTranslationEdge) GetUnitTests() []*ResponseUnitTestCase
func (*ResponseTranslationEdge) GetUsedInferenceCache ¶
func (x *ResponseTranslationEdge) GetUsedInferenceCache() bool
func (*ResponseTranslationEdge) GetUsedMemoization ¶
func (x *ResponseTranslationEdge) GetUsedMemoization() bool
func (*ResponseTranslationEdge) GetWallTimeInference ¶
func (x *ResponseTranslationEdge) GetWallTimeInference() int64
func (*ResponseTranslationEdge) GetWallTimeTestExecution ¶
func (x *ResponseTranslationEdge) GetWallTimeTestExecution() int64
func (*ResponseTranslationEdge) ProtoMessage ¶
func (*ResponseTranslationEdge) ProtoMessage()
func (*ResponseTranslationEdge) ProtoReflect ¶
func (x *ResponseTranslationEdge) ProtoReflect() protoreflect.Message
func (*ResponseTranslationEdge) Reset ¶
func (x *ResponseTranslationEdge) Reset()
func (*ResponseTranslationEdge) String ¶
func (x *ResponseTranslationEdge) String() string
type ResponseTranslationPath ¶
type ResponseTranslationPath struct {
TranslationEdges []*ResponseTranslationEdge `protobuf:"bytes,1,rep,name=translation_edges,json=translationEdges,proto3" json:"translation_edges,omitempty"`
EdgeIndexMemoized []bool `protobuf:"varint,2,rep,packed,name=edge_index_memoized,json=edgeIndexMemoized,proto3" json:"edge_index_memoized,omitempty"`
// contains filtered or unexported fields
}
func (*ResponseTranslationPath) Descriptor
deprecated
func (*ResponseTranslationPath) Descriptor() ([]byte, []int)
Deprecated: Use ResponseTranslationPath.ProtoReflect.Descriptor instead.
func (*ResponseTranslationPath) GetEdgeIndexMemoized ¶
func (x *ResponseTranslationPath) GetEdgeIndexMemoized() []bool
func (*ResponseTranslationPath) GetTranslationEdges ¶
func (x *ResponseTranslationPath) GetTranslationEdges() []*ResponseTranslationEdge
func (*ResponseTranslationPath) ProtoMessage ¶
func (*ResponseTranslationPath) ProtoMessage()
func (*ResponseTranslationPath) ProtoReflect ¶
func (x *ResponseTranslationPath) ProtoReflect() protoreflect.Message
func (*ResponseTranslationPath) Reset ¶
func (x *ResponseTranslationPath) Reset()
func (*ResponseTranslationPath) String ¶
func (x *ResponseTranslationPath) String() string
type ResponseUnitTestCase ¶
type ResponseUnitTestCase struct {
SourceCode string `protobuf:"bytes,1,opt,name=source_code,json=sourceCode,proto3" json:"source_code,omitempty"`
ActualOutput string `protobuf:"bytes,2,opt,name=actual_output,json=actualOutput,proto3" json:"actual_output,omitempty"`
Passed bool `protobuf:"varint,3,opt,name=passed,proto3" json:"passed,omitempty"`
ExecutedCode string `protobuf:"bytes,4,opt,name=executed_code,json=executedCode,proto3" json:"executed_code,omitempty"`
// contains filtered or unexported fields
}
func (*ResponseUnitTestCase) Descriptor
deprecated
func (*ResponseUnitTestCase) Descriptor() ([]byte, []int)
Deprecated: Use ResponseUnitTestCase.ProtoReflect.Descriptor instead.
func (*ResponseUnitTestCase) GetActualOutput ¶
func (x *ResponseUnitTestCase) GetActualOutput() string
func (*ResponseUnitTestCase) GetExecutedCode ¶
func (x *ResponseUnitTestCase) GetExecutedCode() string
func (*ResponseUnitTestCase) GetPassed ¶
func (x *ResponseUnitTestCase) GetPassed() bool
func (*ResponseUnitTestCase) GetSourceCode ¶
func (x *ResponseUnitTestCase) GetSourceCode() string
func (*ResponseUnitTestCase) ProtoMessage ¶
func (*ResponseUnitTestCase) ProtoMessage()
func (*ResponseUnitTestCase) ProtoReflect ¶
func (x *ResponseUnitTestCase) ProtoReflect() protoreflect.Message
func (*ResponseUnitTestCase) Reset ¶
func (x *ResponseUnitTestCase) Reset()
func (*ResponseUnitTestCase) String ¶
func (x *ResponseUnitTestCase) String() string
type StartEndpointRequest ¶
type StartEndpointRequest struct {
ModelName string `protobuf:"bytes,1,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"`
GpuId string `protobuf:"bytes,2,opt,name=gpu_id,json=gpuId,proto3" json:"gpu_id,omitempty"`
Port string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"`
Seed int64 `protobuf:"varint,4,opt,name=seed,proto3" json:"seed,omitempty"`
ApiToken string `protobuf:"bytes,5,opt,name=api_token,json=apiToken,proto3" json:"api_token,omitempty"`
LoraPath string `protobuf:"bytes,6,opt,name=lora_path,json=loraPath,proto3" json:"lora_path,omitempty"`
// contains filtered or unexported fields
}
func (*StartEndpointRequest) Descriptor
deprecated
func (*StartEndpointRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartEndpointRequest.ProtoReflect.Descriptor instead.
func (*StartEndpointRequest) GetApiToken ¶
func (x *StartEndpointRequest) GetApiToken() string
func (*StartEndpointRequest) GetGpuId ¶
func (x *StartEndpointRequest) GetGpuId() string
func (*StartEndpointRequest) GetLoraPath ¶
func (x *StartEndpointRequest) GetLoraPath() string
func (*StartEndpointRequest) GetModelName ¶
func (x *StartEndpointRequest) GetModelName() string
func (*StartEndpointRequest) GetPort ¶
func (x *StartEndpointRequest) GetPort() string
func (*StartEndpointRequest) GetSeed ¶
func (x *StartEndpointRequest) GetSeed() int64
func (*StartEndpointRequest) ProtoMessage ¶
func (*StartEndpointRequest) ProtoMessage()
func (*StartEndpointRequest) ProtoReflect ¶
func (x *StartEndpointRequest) ProtoReflect() protoreflect.Message
func (*StartEndpointRequest) Reset ¶
func (x *StartEndpointRequest) Reset()
func (*StartEndpointRequest) String ¶
func (x *StartEndpointRequest) String() string
type StopEndpointRequest ¶
type StopEndpointRequest struct {
LaunchId int64 `protobuf:"varint,1,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
// contains filtered or unexported fields
}
func (*StopEndpointRequest) Descriptor
deprecated
func (*StopEndpointRequest) Descriptor() ([]byte, []int)
Deprecated: Use StopEndpointRequest.ProtoReflect.Descriptor instead.
func (*StopEndpointRequest) GetLaunchId ¶
func (x *StopEndpointRequest) GetLaunchId() int64
func (*StopEndpointRequest) ProtoMessage ¶
func (*StopEndpointRequest) ProtoMessage()
func (*StopEndpointRequest) ProtoReflect ¶
func (x *StopEndpointRequest) ProtoReflect() protoreflect.Message
func (*StopEndpointRequest) Reset ¶
func (x *StopEndpointRequest) Reset()
func (*StopEndpointRequest) String ¶
func (x *StopEndpointRequest) String() string
type TargetSignature ¶
type TargetSignature struct {
Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"`
Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
// contains filtered or unexported fields
}
func (*TargetSignature) Descriptor
deprecated
func (*TargetSignature) Descriptor() ([]byte, []int)
Deprecated: Use TargetSignature.ProtoReflect.Descriptor instead.
func (*TargetSignature) GetLanguage ¶
func (x *TargetSignature) GetLanguage() string
func (*TargetSignature) GetSignature ¶
func (x *TargetSignature) GetSignature() string
func (*TargetSignature) ProtoMessage ¶
func (*TargetSignature) ProtoMessage()
func (*TargetSignature) ProtoReflect ¶
func (x *TargetSignature) ProtoReflect() protoreflect.Message
func (*TargetSignature) Reset ¶
func (x *TargetSignature) Reset()
func (*TargetSignature) String ¶
func (x *TargetSignature) String() string
type TestSuite ¶
type TestSuite struct {
FuzzySuite []*FuzzyTestCase `protobuf:"bytes,1,rep,name=fuzzy_suite,json=fuzzySuite,proto3" json:"fuzzy_suite,omitempty"`
UnitTestSuite []*UnitTestCase `protobuf:"bytes,2,rep,name=unit_test_suite,json=unitTestSuite,proto3" json:"unit_test_suite,omitempty"`
// contains filtered or unexported fields
}
func (*TestSuite) Descriptor
deprecated
func (*TestSuite) GetFuzzySuite ¶
func (x *TestSuite) GetFuzzySuite() []*FuzzyTestCase
func (*TestSuite) GetUnitTestSuite ¶
func (x *TestSuite) GetUnitTestSuite() []*UnitTestCase
func (*TestSuite) ProtoMessage ¶
func (*TestSuite) ProtoMessage()
func (*TestSuite) ProtoReflect ¶
func (x *TestSuite) ProtoReflect() protoreflect.Message
type TranslationEdge ¶
type TranslationEdge struct {
Id int
PromptTemplate string
Prompt string
TranslationId string
InputLanguage string
TargetLanguage string
Level int
Success bool
InferenceOutput string
ExecutionOutput string
SourceCode string
ExtractedSourceCode string
SuggestedTargetSignature string
RegexTemplate string
ModelName string
ParentEdge *TranslationEdge
FuzzyTests []FuzzyTest
UnitTests []UnitTest
WallClockInferenceTime time.Duration
WallClockTestExecutionTime time.Duration
UsedMemoization bool
UsedInferenceCache bool
ExtraPromptData string
StatusMutex *sync.Mutex // Mutex for thread safety
ProcessingMutex *sync.Mutex
// contains filtered or unexported fields
}
TranslationEdge struct with thread-safe Status
func (*TranslationEdge) GetDepth ¶
func (te *TranslationEdge) GetDepth() int
func (*TranslationEdge) GetStatus ¶
func (e *TranslationEdge) GetStatus() Status
Getter method for Status
func (*TranslationEdge) IsDirectPathToTarget ¶
func (te *TranslationEdge) IsDirectPathToTarget(targetLanguage string) bool
func (*TranslationEdge) SetStatus ¶
func (e *TranslationEdge) SetStatus(newStatus Status)
Setter method for Status
func (TranslationEdge) String ¶
func (e TranslationEdge) String() string
Implement the Stringer interface for TranslationEdge
func (*TranslationEdge) UpdatePendingStatus ¶
func (e *TranslationEdge) UpdatePendingStatus(newStatus Status)
type TranslationPair ¶
type TranslationPaths ¶
type TranslationPaths struct {
Paths []Path
}
func (*TranslationPaths) Add ¶
func (p *TranslationPaths) Add(path *Path)
type TranslationRequest ¶
type TranslationRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
SeedLanguage string `protobuf:"bytes,2,opt,name=seed_language,json=seedLanguage,proto3" json:"seed_language,omitempty"`
TargetLanguage string `protobuf:"bytes,3,opt,name=target_language,json=targetLanguage,proto3" json:"target_language,omitempty"`
SeedCode string `protobuf:"bytes,4,opt,name=seed_code,json=seedCode,proto3" json:"seed_code,omitempty"`
TestSuite *TestSuite `protobuf:"bytes,5,opt,name=test_suite,json=testSuite,proto3" json:"test_suite,omitempty"`
UsedLanguages []string `protobuf:"bytes,6,rep,name=used_languages,json=usedLanguages,proto3" json:"used_languages,omitempty"`
PromptTemplateName string `protobuf:"bytes,7,opt,name=prompt_template_name,json=promptTemplateName,proto3" json:"prompt_template_name,omitempty"`
TargetSignatures []*TargetSignature `protobuf:"bytes,8,rep,name=target_signatures,json=targetSignatures,proto3" json:"target_signatures,omitempty"`
RegexTemplateName string `protobuf:"bytes,9,opt,name=regex_template_name,json=regexTemplateName,proto3" json:"regex_template_name,omitempty"`
ModelName string `protobuf:"bytes,10,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"`
ExtraPromptData string `protobuf:"bytes,11,opt,name=extra_prompt_data,json=extraPromptData,proto3" json:"extra_prompt_data,omitempty"`
// contains filtered or unexported fields
}
func (*TranslationRequest) Descriptor
deprecated
func (*TranslationRequest) Descriptor() ([]byte, []int)
Deprecated: Use TranslationRequest.ProtoReflect.Descriptor instead.
func (*TranslationRequest) GetExtraPromptData ¶
func (x *TranslationRequest) GetExtraPromptData() string
func (*TranslationRequest) GetId ¶
func (x *TranslationRequest) GetId() string
func (*TranslationRequest) GetModelName ¶
func (x *TranslationRequest) GetModelName() string
func (*TranslationRequest) GetPromptTemplateName ¶
func (x *TranslationRequest) GetPromptTemplateName() string
func (*TranslationRequest) GetRegexTemplateName ¶
func (x *TranslationRequest) GetRegexTemplateName() string
func (*TranslationRequest) GetSeedCode ¶
func (x *TranslationRequest) GetSeedCode() string
func (*TranslationRequest) GetSeedLanguage ¶
func (x *TranslationRequest) GetSeedLanguage() string
func (*TranslationRequest) GetTargetLanguage ¶
func (x *TranslationRequest) GetTargetLanguage() string
func (*TranslationRequest) GetTargetSignatures ¶
func (x *TranslationRequest) GetTargetSignatures() []*TargetSignature
func (*TranslationRequest) GetTestSuite ¶
func (x *TranslationRequest) GetTestSuite() *TestSuite
func (*TranslationRequest) GetUsedLanguages ¶
func (x *TranslationRequest) GetUsedLanguages() []string
func (*TranslationRequest) ProtoMessage ¶
func (*TranslationRequest) ProtoMessage()
func (*TranslationRequest) ProtoReflect ¶
func (x *TranslationRequest) ProtoReflect() protoreflect.Message
func (*TranslationRequest) Reset ¶
func (x *TranslationRequest) Reset()
func (*TranslationRequest) String ¶
func (x *TranslationRequest) String() string
type TranslationResponse ¶
type TranslationResponse struct {
TranslationRequest *TranslationRequest `protobuf:"bytes,1,opt,name=translation_request,json=translationRequest,proto3" json:"translation_request,omitempty"`
Paths []*ResponseTranslationPath `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
// contains filtered or unexported fields
}
func LoadExistingResponse ¶
func LoadExistingResponse(request *TranslationRequest) (TranslationResponse, bool)
func (*TranslationResponse) Descriptor
deprecated
func (*TranslationResponse) Descriptor() ([]byte, []int)
Deprecated: Use TranslationResponse.ProtoReflect.Descriptor instead.
func (*TranslationResponse) GetPaths ¶
func (x *TranslationResponse) GetPaths() []*ResponseTranslationPath
func (*TranslationResponse) GetTranslationRequest ¶
func (x *TranslationResponse) GetTranslationRequest() *TranslationRequest
func (*TranslationResponse) ProtoMessage ¶
func (*TranslationResponse) ProtoMessage()
func (*TranslationResponse) ProtoReflect ¶
func (x *TranslationResponse) ProtoReflect() protoreflect.Message
func (*TranslationResponse) Reset ¶
func (x *TranslationResponse) Reset()
func (*TranslationResponse) String ¶
func (x *TranslationResponse) String() string
type TranslationServiceClient ¶
type TranslationServiceClient interface {
BatchTranslate(ctx context.Context, in *BatchTranslationRequest, opts ...grpc.CallOption) (*BatchTranslationResponse, error)
BatchTranslateCAK(ctx context.Context, in *BatchTranslationRequest, opts ...grpc.CallOption) (*BatchTranslationResponse, error)
BatchPanEtAlTranslate(ctx context.Context, in *BatchTranslationRequest, opts ...grpc.CallOption) (*BatchTranslationResponse, error)
BatchRunVerification(ctx context.Context, in *BatchVerificationRequest, opts ...grpc.CallOption) (*BatchVerificationResponse, error)
}
TranslationServiceClient is the client API for TranslationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTranslationServiceClient ¶
func NewTranslationServiceClient(cc grpc.ClientConnInterface) TranslationServiceClient
type TranslationServiceServer ¶
type TranslationServiceServer interface {
BatchTranslate(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
BatchTranslateCAK(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
BatchPanEtAlTranslate(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
BatchRunVerification(context.Context, *BatchVerificationRequest) (*BatchVerificationResponse, error)
// contains filtered or unexported methods
}
TranslationServiceServer is the server API for TranslationService service. All implementations must embed UnimplementedTranslationServiceServer for forward compatibility
type TreeBranch ¶
type TreeBranch struct {
TranslationEdges []TranslationEdge
PriorityScheduling bool
}
type UnimplementedInfrastructureServiceServer ¶
type UnimplementedInfrastructureServiceServer struct {
}
UnimplementedInfrastructureServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedInfrastructureServiceServer) LaunchInferenceEndpoint ¶
func (UnimplementedInfrastructureServiceServer) LaunchInferenceEndpoint(context.Context, *StartEndpointRequest) (*LaunchResponse, error)
func (UnimplementedInfrastructureServiceServer) StopInferenceEndpoint ¶
func (UnimplementedInfrastructureServiceServer) StopInferenceEndpoint(context.Context, *StopEndpointRequest) (*LaunchResponse, error)
type UnimplementedTranslationServiceServer ¶
type UnimplementedTranslationServiceServer struct {
}
UnimplementedTranslationServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTranslationServiceServer) BatchPanEtAlTranslate ¶
func (UnimplementedTranslationServiceServer) BatchPanEtAlTranslate(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
func (UnimplementedTranslationServiceServer) BatchRunVerification ¶
func (UnimplementedTranslationServiceServer) BatchRunVerification(context.Context, *BatchVerificationRequest) (*BatchVerificationResponse, error)
func (UnimplementedTranslationServiceServer) BatchTranslate ¶
func (UnimplementedTranslationServiceServer) BatchTranslate(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
func (UnimplementedTranslationServiceServer) BatchTranslateCAK ¶
func (UnimplementedTranslationServiceServer) BatchTranslateCAK(context.Context, *BatchTranslationRequest) (*BatchTranslationResponse, error)
type UnitTest ¶
type UnitTest struct {
SourceCode string
ActualOutput string
ExecutedCode string
Passed bool
Imports string
ExitCodeZero bool
}
func FromResponseUnitTest ¶
func FromResponseUnitTest(response *ResponseUnitTestCase) UnitTest
func (*UnitTest) ToResponse ¶
func (unit *UnitTest) ToResponse() *ResponseUnitTestCase
type UnitTestCase ¶
type UnitTestCase struct {
Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"`
TestCase string `protobuf:"bytes,2,opt,name=test_case,json=testCase,proto3" json:"test_case,omitempty"`
Imports string `protobuf:"bytes,3,opt,name=imports,proto3" json:"imports,omitempty"`
// contains filtered or unexported fields
}
func (*UnitTestCase) Descriptor
deprecated
func (*UnitTestCase) Descriptor() ([]byte, []int)
Deprecated: Use UnitTestCase.ProtoReflect.Descriptor instead.
func (*UnitTestCase) GetImports ¶
func (x *UnitTestCase) GetImports() string
func (*UnitTestCase) GetLanguage ¶
func (x *UnitTestCase) GetLanguage() string
func (*UnitTestCase) GetTestCase ¶
func (x *UnitTestCase) GetTestCase() string
func (*UnitTestCase) ProtoMessage ¶
func (*UnitTestCase) ProtoMessage()
func (*UnitTestCase) ProtoReflect ¶
func (x *UnitTestCase) ProtoReflect() protoreflect.Message
func (*UnitTestCase) Reset ¶
func (x *UnitTestCase) Reset()
func (*UnitTestCase) String ¶
func (x *UnitTestCase) String() string
type UnsafeInfrastructureServiceServer ¶
type UnsafeInfrastructureServiceServer interface {
// contains filtered or unexported methods
}
UnsafeInfrastructureServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InfrastructureServiceServer will result in compilation errors.
type UnsafeTranslationServiceServer ¶
type UnsafeTranslationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTranslationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TranslationServiceServer will result in compilation errors.
type VerificationRequest ¶
type VerificationRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
TestSuite *TestSuite `protobuf:"bytes,2,opt,name=test_suite,json=testSuite,proto3" json:"test_suite,omitempty"`
InferenceOutput string `protobuf:"bytes,3,opt,name=inferenceOutput,proto3" json:"inferenceOutput,omitempty"`
TargetLanguage string `protobuf:"bytes,4,opt,name=targetLanguage,proto3" json:"targetLanguage,omitempty"`
SourceLanguage string `protobuf:"bytes,5,opt,name=sourceLanguage,proto3" json:"sourceLanguage,omitempty"`
// contains filtered or unexported fields
}
func (*VerificationRequest) Descriptor
deprecated
func (*VerificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerificationRequest.ProtoReflect.Descriptor instead.
func (*VerificationRequest) GetId ¶
func (x *VerificationRequest) GetId() string
func (*VerificationRequest) GetInferenceOutput ¶
func (x *VerificationRequest) GetInferenceOutput() string
func (*VerificationRequest) GetSourceLanguage ¶
func (x *VerificationRequest) GetSourceLanguage() string
func (*VerificationRequest) GetTargetLanguage ¶
func (x *VerificationRequest) GetTargetLanguage() string
func (*VerificationRequest) GetTestSuite ¶
func (x *VerificationRequest) GetTestSuite() *TestSuite
func (*VerificationRequest) ProtoMessage ¶
func (*VerificationRequest) ProtoMessage()
func (*VerificationRequest) ProtoReflect ¶
func (x *VerificationRequest) ProtoReflect() protoreflect.Message
func (*VerificationRequest) Reset ¶
func (x *VerificationRequest) Reset()
func (*VerificationRequest) String ¶
func (x *VerificationRequest) String() string
type VerificationResponse ¶
type VerificationResponse struct {
VerificationRequest *VerificationRequest `protobuf:"bytes,1,opt,name=verification_request,json=verificationRequest,proto3" json:"verification_request,omitempty"`
FuzzyTests []*ResponseFuzzyTestCase `protobuf:"bytes,2,rep,name=fuzzy_tests,json=fuzzyTests,proto3" json:"fuzzy_tests,omitempty"`
UnitTests []*ResponseUnitTestCase `protobuf:"bytes,3,rep,name=unit_tests,json=unitTests,proto3" json:"unit_tests,omitempty"`
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*VerificationResponse) Descriptor
deprecated
func (*VerificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerificationResponse.ProtoReflect.Descriptor instead.
func (*VerificationResponse) GetFuzzyTests ¶
func (x *VerificationResponse) GetFuzzyTests() []*ResponseFuzzyTestCase
func (*VerificationResponse) GetStatus ¶
func (x *VerificationResponse) GetStatus() string
func (*VerificationResponse) GetUnitTests ¶
func (x *VerificationResponse) GetUnitTests() []*ResponseUnitTestCase
func (*VerificationResponse) GetVerificationRequest ¶
func (x *VerificationResponse) GetVerificationRequest() *VerificationRequest
func (*VerificationResponse) ProtoMessage ¶
func (*VerificationResponse) ProtoMessage()
func (*VerificationResponse) ProtoReflect ¶
func (x *VerificationResponse) ProtoReflect() protoreflect.Message
func (*VerificationResponse) Reset ¶
func (x *VerificationResponse) Reset()
func (*VerificationResponse) String ¶
func (x *VerificationResponse) String() string