/// <summary> /// Initializes a new instance of the <see cref="MLDataLoader"/> class. /// </summary> /// <param name="userConnection">The user connection.</param> /// <param name="config">Configuration of data loading process.</param> public MLDataLoader(UserConnection userConnection, MLDataLoaderConfig config) { _userConnection = userConnection; _config = config; ConstructorArgument userConnectionArg = new ConstructorArgument("userConnection", _userConnection); _modelEventsNotifier = ClassFactory.Get <MLModelEventsNotifier>(userConnectionArg); }
private IMLDataLoader InitDataLoader() { ConstructorArgument userConnectionArg = new ConstructorArgument("userConnection", _userConnection); var config = new MLDataLoaderConfig { ChunkSize = _predictionChunkSize, MaxRecordsCount = -1 }; ConstructorArgument configArg = new ConstructorArgument("config", config); return(ClassFactory.Get <IMLDataLoader>(userConnectionArg, configArg)); }
private IMLDataUploader InitDataUploader() { Guid sessionId = _modelConfig.TrainSessionId; sessionId.CheckArgumentEmpty("MLModelConfig.TrainSessionId"); ConstructorArgument sessionIdArg = new ConstructorArgument("sessionId", _modelConfig.TrainSessionId); ConstructorArgument proxyArg = new ConstructorArgument("mlServiceProxy", _proxy); ConstructorArgument userConnectionArg = new ConstructorArgument("userConnection", _userConnection); var config = new MLDataLoaderConfig { MinRecordsCount = _modelConfig.TrainingMinimumRecordsCount }; ConstructorArgument configArg = new ConstructorArgument("config", config); IMLDataLoader loader = ClassFactory.Get <IMLDataLoader>(userConnectionArg, configArg); ConstructorArgument loaderArg = new ConstructorArgument("loader", loader); IMLDataUploader dataUploader = ClassFactory.Get <IMLDataUploader>(proxyArg, sessionIdArg, loaderArg); return(dataUploader); }