private void Initialize() { DiagnosticsSessionFactory.SetDefaults(Guid.Parse("ebfb4d9d-d5ed-45e5-9f75-e3389bece6fa"), "Inference Classification Agent", "Inference Diagnostics Logs", Path.Combine(ExchangeSetupContext.InstallPath, "Logging\\InferenceClassification"), "Inference_", "InferenceClassificationLogs"); this.diagnosticsSession = DiagnosticsSession.CreateComponentDiagnosticsSession("InferenceClassificationAgentFactory", null, (long)this.GetHashCode()); this.CreateClassificationAgentLogger(); this.CreateClassificationComparisonLogger(); if (this.isPipelineEnabled) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); PipelineDefinition definition = PipelineDefinition.LoadFromFile(Path.Combine(InferenceClassificationAgentFactory.ExecutingAssemblyLocation, "InferenceClassificationPipelineDefinition.xml")); string text = "ClassificationPipeline"; InferenceModel.GetInstance(text).Reset(); PipelineContext pipelineContext = new PipelineContext(); pipelineContext.SetProperty <string>(DocumentSchema.PipelineInstanceName, text); this.pipeline = new Pipeline(definition, text, pipelineContext, null); IAsyncResult asyncResult = this.pipeline.BeginPrepareToStart(null, null); this.pipeline.EndPrepareToStart(asyncResult); asyncResult = this.pipeline.BeginStart(null, null); this.pipeline.EndStart(asyncResult); stopwatch.Stop(); this.diagnosticsSession.LogDiagnosticsInfo(DiagnosticsLoggingTag.Informational, "Pipeline creation timespan: {0} ms", new object[] { stopwatch.ElapsedMilliseconds }); } }
// Token: 0x0600118B RID: 4491 RVA: 0x00066790 File Offset: 0x00064990 public void OnWorkCycleCheckpoint() { if (this.trainingPipeline == null) { this.trainingPipeline = InferencePipelineUtil.CreateAndStartTrainingPipeline(base.DatabaseInfo.Guid.ToString(), this.DiagnosticsSession, "InferenceTrainingPipelineDefinition.xml", "Training", InferenceTrainingAssistant.InferencePipelineVersion, out this.trainingPipelineContext); InferenceModel.GetInstance(this.trainingPipelineContext.GetProperty <string>(DocumentSchema.PipelineInstanceName)).Reset(); } this.DiagnosticsSession.Assert(this.trainingPipeline != null, "Training Pipeline is null", new object[0]); this.DiagnosticsSession.Assert(this.trainingPipelineContext != null, "Training Pipeline Context is null", new object[0]); if (this.trainingFeeder == null) { this.trainingFeeder = new InferenceTrainingFeeder(this.trainingPipeline, this.trainingPipelineContext, "InferenceTrainingAssistant", this.trainingStatusLogger, this.truthLabelsStatusLogger); } }