<commit_before>using System;
using Conreign.Cluster;
using Microsoft.WindowsAzure.ServiceRuntime;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.Host;

namespace Conreign.Host.Azure
{
    public class SiloRole : RoleEntryPoint
    {
        private AzureSilo _silo;

        public override void Run()
        {
            var env = RoleEnvironment.GetConfigurationSettingValue("Environment");
            if (string.IsNullOrEmpty(env))
            {
                throw new InvalidOperationException("Unable to determine environment.");
            }
            var config = ConreignSiloConfiguration.Load(Environment.CurrentDirectory, env);
            var orleansConfiguration = new ClusterConfiguration();
            orleansConfiguration.Globals.DeploymentId = RoleEnvironment.DeploymentId;
            var conreignSilo = ConreignSilo.Configure(orleansConfiguration, config);
            _silo = new AzureSilo();
            var started = _silo.Start(conreignSilo.OrleansConfiguration, conreignSilo.Configuration.SystemStorageConnectionString);
            if (!started)
            {
                throw new InvalidOperationException("Silo was not started.");
            }
            conreignSilo.Initialize();
            _silo.Run();
        }

        public override void OnStop()
        {<commit_msg>Fix Azure host silo startup<commit_after>using System;
using Conreign.Cluster;
using Microsoft.WindowsAzure.ServiceRuntime;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.Host;

namespace Conreign.Host.Azure
{
    public class SiloRole : RoleEntryPoint
    {
        private AzureSilo _silo;

        public override void Run()
        {
            var env = RoleEnvironment.GetConfigurationSettingValue("Environment");
            if (string.IsNullOrEmpty(env))
            {
                throw new InvalidOperationException("Unable to determine environment.");
            }
            var config = ConreignSiloConfiguration.Load(Environment.CurrentDirectory, env);
            var orleansConfiguration = new ClusterConfiguration();
            orleansConfiguration.Globals.DeploymentId = RoleEnvironment.DeploymentId;
            var conreignSilo = ConreignSilo.Configure(orleansConfiguration, config);
            _silo = new AzureSilo();
            var started = _silo.Start(conreignSilo.OrleansConfiguration, conreignSilo.Configuration.SystemStorageConnectionString);
            if (!started)
            {
                throw new InvalidOperationException("Silo was not started.");
            }
            _silo.Run();
        }

        public override void OnStop()
        {
{'fraction_non_alphanumeric': 0.07578628268283441, 'fraction_numerical': 0.0, 'mean_word_length': 2.50597609561753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '347917', 'n_tokens_mistral': 642, 'n_tokens_neox': 617, 'n_words': 141}