static Program()
        {
            // Initialize app configuration
            var appConfig = new Startup();

            appConfig.ConfigureServices();

            // Initialize MLFlow service
            _mlFlowService = appConfig.Services.GetService <IMLFlowService>();
        }
Exemple #2
0
        public async Task <RunResponse> _createRun(int experiementId, IMLFlowService flowService)
        {
            var experimentId = experiementId;
            var userId       = "azadeh khojandi";
            var runName      = "this is a run name";
            var sourceType   = SourceType.NOTEBOOK;
            var sourceName   = "String descriptor for the run’s source";

            var entryPointName = "Name of the project entry point associated with the current run, if any.";
            var startTime      = ((DateTimeOffset)DateTime.UtcNow).ToUnixTimeSeconds(); //unix timestamp


            var path          = Directory.GetCurrentDirectory();
            var repopath      = path.Substring(0, path.IndexOf("src", StringComparison.Ordinal));
            var repo          = new Repository(repopath);
            var lastcommit    = repo.Commits.Last();
            var sourceVersion = lastcommit.Sha;


            RunTag[] tags = { new RunTag()
                              {
                                  Key = "testkey", Value = "testvalue"
                              } };

            //todo [az] run name is empty - check mlflow source code
            //todo [az] unix startTime not showing correct time on the UI

            var createRunRequest = new CreateRunRequest()
            {
                ExperimentId   = experimentId,
                UserId         = userId,
                Runname        = runName,
                SourceType     = sourceType,
                SourceName     = sourceName,
                EntryPointName = entryPointName,
                StartTime      = startTime,
                SourceVersion  = sourceVersion,
                Tags           = tags
            };

            var runResult = await flowService.CreateRun(
                createRunRequest);

            return(runResult);
        }
Exemple #3
0
        public async Task <CreateResponse> _createExperiment(string id, IMLFlowService flowService)
        {
            var result = await flowService.CreateExperiment(id);

            return(result);
        }
 public MLFLowResultStore(ILogger logger, IMLFlowService mlflowService, IConfiguration configuration)
 {
     this.logger        = logger;
     this.mlflowService = mlflowService;
     this.configuration = configuration;
 }
Exemple #5
0
 public HomeController(IMLFlowService flowService)
 {
     this.flowService = flowService;
 }