trainer

package
v0.0.0-...-12a9a0b Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// --------------- task config ------------------------------------------------------
	// task id for trainer
	TaskId string
	// index of client
	Cindex string
	// Aggregator
	Aggregator []byte
	// trainer number
	TrainerNum int
	// task genesis block
	GenesisBlock *proto.Block
	// python server api base
	ApiBaseUrl string

	// --------------- crypto config ----------------------------------------------------
	// private key for trainer
	Sk bccsp.Key
	// option for key import
	KeyImportOpts bccsp.KeyImportOpts
	// option for hash
	HashOpts bccsp.HashOpts
	// option for sign
	SignerOpts bccsp.SignerOpts

	// --------------- discovery config -------------------------------------------------
	// peer for trainer
	Self *proto.RemotePeer
	// the bootstrap peers for the task
	BootstrapPeers []*proto.RemotePeer

	// --------------- notary config ----------------------------------------------------
	Notaries []*proto.RemotePeer

	// --------------- rpc config -------------------------------------------------------
	// timeout for rpc
	TimeoutRPC time.Duration

	// --------------- chain config -----------------------------------------------------
	// block number can be resident in memory
	MaxBlockNumInMemory int
}

type Trainer

type Trainer struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Trainer

Directories

Path Synopsis
model

Jump to

Keyboard shortcuts

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