offlinetask

package
v2.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	*sudoclient.SudoClient
	Project
}

func NewFactory

func NewFactory(
	client *sudoclient.SudoClient,
	project Project) (*Factory, error)

func (*Factory) GetStageOutputVtable

func (f *Factory) GetStageOutputVtable(
	ctx context.Context,
	stageID uint64,
	partyID string,
	innerID uint64,
	vtable string,
) (*basicvtable.Vtable, error)

func (*Factory) GetTaskModelOutputs

func (f *Factory) GetTaskModelOutputs(ctx context.Context, taskID uint64) (*OperatorInput, error)

GetTaskModelOutputs 获取任务各算子每个参与方的 .model类型vtable输出

func (*Factory) ReplaceParty

func (f *Factory) ReplaceParty(taskModel *task.Task, partyMap map[string]string) (*task.Task, error)

setTaskOutputDataSrc 设置各个参与方所有算子输出数据源。

func (*Factory) SetTaskInput

func (f *Factory) SetTaskInput(taskModel *task.Task, modelInput, dataInput *OperatorInput) (*task.Task, error)

SetPredictTaskModelInputFromOutput 给任务配置 模型和数据 vtable数据输入。

func (*Factory) SetTaskOperatorParams

func (f *Factory) SetTaskOperatorParams(taskModel *task.Task, params OperatorParams) (*task.Task, error)

func (*Factory) SetTaskOutputDataSrc

func (f *Factory) SetTaskOutputDataSrc(taskModel *task.Task, outputDataSrc map[string]uint64) (*task.Task, error)

setTaskOutputDataSrc 设置各个参与方所有算子输出数据源。

type OperatorInput

type OperatorInput struct {
	Stages map[string]StageInput
}

OperatorInput 配置Dag中多个算子的输入

func (*OperatorInput) GetInputVtable

func (input *OperatorInput) GetInputVtable(stage string, innerID uint64, party, vtable string) (VTableInput, error)

type OperatorParams

type OperatorParams struct {
	Stages map[string]StageParams
}

func (*OperatorParams) GetPartyParams

func (params *OperatorParams) GetPartyParams(stage string, innerID uint64, party, param string) interface{}

func (*OperatorParams) GetShareParams

func (params *OperatorParams) GetShareParams(stage, param string) interface{}

type PartyInput

type PartyInput struct {
	PartyID string
	Vtables map[string]VTableInput
}

PartyInput 配置一个算子中的一个参与方的一种输入

type Project

type Project struct {
	ProjectID uint64
	TusitaID  string
	// 本方partyID
	PartyID string
}

func (Project) Valid

func (project Project) Valid() error

type StageInput

type StageInput struct {
	Client  PartyInput
	Servers []PartyInput
}

StageInput 配置单个算子中多个参与方的输入

type StageParams

type StageParams struct {
	Client       StagePartyParams
	Servers      []StagePartyParams
	SharedParams map[string]interface{}
}

type StagePartyParams

type StagePartyParams struct {
	PartyID string
	Params  map[string]interface{}
}

type VTableInput

type VTableInput struct {
	VtableID uint64
	// 索引列
	KeyColumn          string
	SelectedVtableCols []string
}

VTableInput 配置Vtable输入

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL