Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2057


Ignore:
Timestamp:
06/18/09 12:45:47 (15 years ago)
Author:
gkronber
Message:

Improved stability of hive backend for CEDMA. #642 (Hive backend for CEDMA)

Location:
trunk/sources
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs

    r2053 r2057  
    6969    protected abstract void StartJobs();
    7070
     71    protected void SetResults(IScope src, IScope target) {
     72      foreach (IVariable v in src.Variables) {
     73        target.AddVariable(v);
     74      }
     75      foreach (IScope subScope in src.SubScopes) {
     76        target.AddSubScope(subScope);
     77      }
     78      foreach (KeyValuePair<string, string> alias in src.Aliases) {
     79        target.AddAlias(alias.Key, alias.Value);
     80      }
     81    }
     82
    7183    protected void StoreResults(IAlgorithm finishedAlgorithm) {
    7284      Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
     85      IModel model = finishedAlgorithm.Model;
    7386      List<Statement> statements = new List<Statement>();
    7487      statements.Add(new Statement(modelEntity, Ontology.InstanceOf, Ontology.TypeModel));
    75       statements.Add(new Statement(modelEntity, Ontology.TargetVariable, new Literal(finishedAlgorithm.Model.TargetVariable)));
     88      statements.Add(new Statement(modelEntity, Ontology.TargetVariable, new Literal(model.TargetVariable)));
    7689      statements.Add(new Statement(modelEntity, Ontology.Name, new Literal(finishedAlgorithm.Description)));
    7790     
    78       IModel model = finishedAlgorithm.Model;
    7991      statements.Add(new Statement(modelEntity, Ontology.TrainingMeanSquaredError, new Literal(model.TrainingMeanSquaredError)));
    8092      statements.Add(new Statement(modelEntity, Ontology.ValidationMeanSquaredError, new Literal(model.ValidationMeanSquaredError)));
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs

    r2055 r2057  
    107107    }
    108108
    109     private void SetResults(IScope src, IScope target) {
    110       foreach (IVariable v in src.Variables) {
    111         target.AddVariable(v);
    112       }
    113       foreach (IScope subScope in src.SubScopes) {
    114         target.AddSubScope(subScope);
    115       }
    116       foreach (KeyValuePair<string, string> alias in src.Aliases) {
    117         target.AddAlias(alias.Key, alias.Value);
    118       }
    119     }
    120 
    121109    public override string[] GetJobs() {
    122110      lock (activeAlgorithms) {
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj

    r1922 r2057  
    156156      <Name>HeuristicLab.PluginInfrastructure</Name>
    157157    </ProjectReference>
     158    <ProjectReference Include="..\..\HeuristicLab.Tracing\3.2\HeuristicLab.Tracing-3.2.csproj">
     159      <Project>{EE2034D9-6E27-48A1-B855-42D45F69A4FC}</Project>
     160      <Name>HeuristicLab.Tracing-3.2</Name>
     161    </ProjectReference>
    158162  </ItemGroup>
    159163  <ItemGroup>
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs

    r1857 r2057  
    3535  [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
    3636  [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
     37  [Dependency(Dependency = "HeuristicLab.Tracing-3.2")]
    3738  public class HeuristicLabCedmaServerPlugin : PluginBase {
    3839  }
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/HiveExecuter.cs

    r2012 r2057  
    9595              activeAlgorithms.Remove(readyHandle);
    9696            }
     97            SetResults(finishedEngine.GlobalScope, finishedAlgorithm.Engine.GlobalScope);
    9798            StoreResults(finishedAlgorithm);
    9899            readyHandle.Close();
     
    100101        }
    101102        catch (Exception ex) {
    102           Trace.WriteLine("CEDMA Executer: Exception in job-management thread. " + ex.Message);
     103          HeuristicLab.Tracing.HiveLogger.Debug("CEDMA Executer: Exception in job-management thread. " + ex.Message + "\n" + ex.StackTrace);
    103104        }
    104105      }
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs

    r2051 r2057  
    416416
    417417    protected internal virtual Model CreateGPModel(IScope bestModelScope) {
     418      Engine.GlobalScope.AddSubScope(bestModelScope);
    418419      Model model = new Model();
    419420      Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true);
     
    442443        model.SetVariableQualityImpact(variableName, impact);
    443444      }
     445      Engine.GlobalScope.RemoveSubScope(bestModelScope);
    444446      return model;
    445447    }
Note: See TracChangeset for help on using the changeset viewer.