Something went wrong on our end
Select Git revision
latent_unet.ipynb
-
Gonzalo Martin Garcia authored
Added the description for the failed cosine noise schedule. Restructured some notebooks for clearer separations and consistency between diffusion folders.
Gonzalo Martin Garcia authoredAdded the description for the failed cosine noise schedule. Restructured some notebooks for clearer separations and consistency between diffusion folders.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Program.cs 11.68 KiB
using CommandLine;
using Coscine.ApiClient.Core.Api;
using Coscine.ApiClient.Core.Client;
using Coscine.KpiGenerator.Logging;
using Coscine.KpiGenerator.Models.ConfigurationModels;
using Coscine.KpiGenerator.Reportings.ApplicationProfile;
using Coscine.KpiGenerator.Reportings.Complete;
using Coscine.KpiGenerator.Reportings.Project;
using Coscine.KpiGenerator.Reportings.Resource;
using Coscine.KpiGenerator.Reportings.System;
using Coscine.KpiGenerator.Reportings.User;
using Coscine.KpiGenerator.Utils;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using NLog;
using NLog.Extensions.Logging;
using Winton.Extensions.Configuration.Consul;
using static KPIGenerator.Utils.CommandLineOptions;
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
namespace Coscine.KpiGenerator;
public class Program
{
private static IServiceProvider _serviceProvider = null!;
private static string? _environmentName;
public static async Task<int> Main(string[] args)
{
_environmentName = Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT");
Console.WriteLine($"Running in environment: {_environmentName ?? "environment is null"}");
InitializeServices();
var logger = _serviceProvider.GetRequiredService<ILogger<Program>>();
try
{
var parserResult = Parser.Default.ParseArguments<
CompleteReportingOptions,
ProjectReportingOptions,
ResourceReportingOptions,
UserReportingOptions,
ApplicationProfileReportingOptions,
SystemReportingOptions
>(args);
var result = await parserResult.MapResult(
(CompleteReportingOptions opts) => _serviceProvider.GetRequiredService<CompleteReporting>().RunAsync(opts),
(ProjectReportingOptions opts) => _serviceProvider.GetRequiredService<ProjectReporting>().RunAsync(opts),
(ResourceReportingOptions opts) => _serviceProvider.GetRequiredService<ResourceReporting>().RunAsync(opts),
(UserReportingOptions opts) => _serviceProvider.GetRequiredService<UserReporting>().RunAsync(opts),
(ApplicationProfileReportingOptions opts) => _serviceProvider.GetRequiredService<ApplicationProfileReporting>().RunAsync(opts),
(SystemReportingOptions opts) => _serviceProvider.GetRequiredService<SystemReporting>().RunAsync(opts),
HandleParseError
);
if (result)
{
logger.LogInformation("Finished.");
return 0; // Exit Code 0 for Success
}
else
{
logger.LogInformation("Program execution was interrupted.");
return -1; // Exit Code -1 for Failure
}
}