Changeset 2057
- Timestamp:
- 06/18/09 12:45:47 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
r2053 r2057 69 69 protected abstract void StartJobs(); 70 70 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 71 83 protected void StoreResults(IAlgorithm finishedAlgorithm) { 72 84 Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid()); 85 IModel model = finishedAlgorithm.Model; 73 86 List<Statement> statements = new List<Statement>(); 74 87 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))); 76 89 statements.Add(new Statement(modelEntity, Ontology.Name, new Literal(finishedAlgorithm.Description))); 77 90 78 IModel model = finishedAlgorithm.Model;79 91 statements.Add(new Statement(modelEntity, Ontology.TrainingMeanSquaredError, new Literal(model.TrainingMeanSquaredError))); 80 92 statements.Add(new Statement(modelEntity, Ontology.ValidationMeanSquaredError, new Literal(model.ValidationMeanSquaredError))); -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
r2055 r2057 107 107 } 108 108 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 121 109 public override string[] GetJobs() { 122 110 lock (activeAlgorithms) { -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj
r1922 r2057 156 156 <Name>HeuristicLab.PluginInfrastructure</Name> 157 157 </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> 158 162 </ItemGroup> 159 163 <ItemGroup> -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs
r1857 r2057 35 35 [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")] 36 36 [Dependency(Dependency = "HeuristicLab.Modeling-3.2")] 37 [Dependency(Dependency = "HeuristicLab.Tracing-3.2")] 37 38 public class HeuristicLabCedmaServerPlugin : PluginBase { 38 39 } -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/HiveExecuter.cs
r2012 r2057 95 95 activeAlgorithms.Remove(readyHandle); 96 96 } 97 SetResults(finishedEngine.GlobalScope, finishedAlgorithm.Engine.GlobalScope); 97 98 StoreResults(finishedAlgorithm); 98 99 readyHandle.Close(); … … 100 101 } 101 102 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); 103 104 } 104 105 } -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs
r2051 r2057 416 416 417 417 protected internal virtual Model CreateGPModel(IScope bestModelScope) { 418 Engine.GlobalScope.AddSubScope(bestModelScope); 418 419 Model model = new Model(); 419 420 Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true); … … 442 443 model.SetVariableQualityImpact(variableName, impact); 443 444 } 445 Engine.GlobalScope.RemoveSubScope(bestModelScope); 444 446 return model; 445 447 }
Note: See TracChangeset
for help on using the changeset viewer.