Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MongoServer to connect to MongoServer = flag.String("mongo_server", "localhost", "") // MongoDatabase to use MongoDatabase = flag.String("mongo_database", "test", "") // MongoCollection with active tasks MongoCollection = flag.String("mongo_collection", "decisiontrees", "") // MongoFs with GridFS files MongoFs = flag.String("mongo_fs", "fs", "") // MongoPollTime is the interval between polling the task collection for // unclaimed tasks MongoPollTime = flag.Duration("mongo_poll_time", 30*time.Second, "") )
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource interface {
GetTrainingData() (*pb.TrainingData, error)
}
DataSource is an interface for extracting training data from an arbitrary location TODO(tulloch) - make this an iterator?
func NewDataSource ¶
func NewDataSource(c *pb.DataSourceConfig, s *mgo.Session) (DataSource, error)
NewDataSource is a factory function that returns a new DataSource given the input DataSourceConfig.
type MongoTrainer ¶
type MongoTrainer struct {
Collection *mgo.Collection
}
MongoTrainer polls a MongoDB collection for changes and spins up training jobs based on these changes
func (*MongoTrainer) Loop ¶
func (m *MongoTrainer) Loop()
Loop starts the polling thread, and selects on the channel of potential tasks
Click to show internal directories.
Click to hide internal directories.