Exemple #1
0
        /// <summary>
        /// Configures the builder to use a repository
        /// </summary>
        /// <returns>The current builder for chaining</returns>
        public MLOpsBuilder UseMetaDataRepositories(IDbContextFactory contextFactory)
        {
            this.experimentRepository      = new ExperimentRepository(contextFactory);
            this.runRepository             = new RunRepository(contextFactory, new Clock());
            this.dataRepository            = new DataRepository(contextFactory);
            this.metricRepository          = new MetricRepository(contextFactory);
            this.confusionMatrixRepository = new ConfusionMatrixRepository(contextFactory);
            this.hyperParameterRepository  = new HyperParameterRepository(contextFactory);

            return(this);
        }
Exemple #2
0
        internal MLOpsContext(IModelRepository modelRepository,
                              IExperimentRepository experimentRepository,
                              IRunRepository runRepository,
                              IDataRepository dataRepository,
                              IMetricRepository metricRepository,
                              IConfusionMatrixRepository confusionMatrixRepository,
                              IHyperParameterRepository hyperParameterRepository,
                              IDeploymentRepository deploymentRepository)
        {
            if (modelRepository == null)
            {
                throw new ArgumentNullException(nameof(modelRepository));
            }
            if (experimentRepository == null)
            {
                throw new ArgumentNullException(nameof(experimentRepository));
            }
            if (runRepository == null)
            {
                throw new ArgumentNullException(nameof(runRepository));
            }
            if (dataRepository == null)
            {
                throw new ArgumentNullException(nameof(dataRepository));
            }
            if (metricRepository == null)
            {
                throw new ArgumentNullException(nameof(metricRepository));
            }
            if (confusionMatrixRepository == null)
            {
                throw new ArgumentNullException(nameof(confusionMatrixRepository));
            }
            if (hyperParameterRepository == null)
            {
                throw new ArgumentNullException(nameof(hyperParameterRepository));
            }
            if (deploymentRepository == null)
            {
                throw new ArgumentNullException(nameof(deploymentRepository));
            }

            this.LifeCycle  = new LifeCycleCatalog(experimentRepository, runRepository, new Clock());
            this.Data       = new DataCatalog(dataRepository);
            this.Evaluation = new EvaluationCatalog(metricRepository, confusionMatrixRepository);
            this.Model      = new ModelCatalog(modelRepository, runRepository);
            this.Training   = new TrainingCatalog(hyperParameterRepository);
            this.Deployment = new DeploymentCatalog(deploymentRepository, modelRepository, experimentRepository);
        }
Exemple #3
0
        /// <summary>
        /// Configures the builder to use a repository
        /// </summary>
        /// <returns>The current builder for chaining</returns>
        public MLOpsBuilder UseMetaDataRepositories(IDbContextFactory contextFactory)
        {
            var runResolver        = new RunResolver();
            var experimentResolver = new ExperimentResolver(runResolver);

            this.experimentRepository      = new ExperimentRepository(contextFactory, experimentResolver);
            this.runRepository             = new RunRepository(contextFactory, new Clock(), runResolver, new RegisteredModelResolver());
            this.dataRepository            = new DataRepository(contextFactory, new DataResolver(), new DataCalculator());
            this.metricRepository          = new MetricRepository(contextFactory);
            this.confusionMatrixRepository = new ConfusionMatrixRepository(contextFactory);
            this.hyperParameterRepository  = new HyperParameterRepository(contextFactory);
            this.deploymentRepository      = new DeploymentRepository(contextFactory, new Clock(), new DeploymentTargetResolver());

            return(this);
        }
 /// <summary>
 /// ctor
 /// </summary>
 /// <param name="metricRepository"></param>
 /// <param name="confusionMatrixRepository"></param>
 public EvaluationCatalog(IMetricRepository metricRepository, IConfusionMatrixRepository confusionMatrixRepository)
 {
     this.metricRepository          = metricRepository;
     this.confusionMatrixRepository = confusionMatrixRepository;
 }