Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Core::Training::ParameterSearcher::SearchClient (  )  [inline, private]

Definition at line 252 of file ParameterSearcher.h.

References Impala::Util::PropertySet::Add(), CallEvaluator(), Impala::Util::PropertySet::GetDescription(), Impala::Util::PropertySet::GetInt(), Impala::Util::PropertySet::GetString(), Impala::Util::RangeIterator::GetTotalIterations(), ILOG_INFO, mEvaluator, mIterator, mProperties, Impala::Util::PropertySet::Parse(), Impala::Core::Training::ParameterEvaluator::SetFold(), and Impala::Core::Training::ParameterEvaluator::SetRepetition().

Referenced by SearchParallel().

00253     {
00254         ILOG_DEBUG_NODE("I am a client");
00255         int id = Link::Mpi::MyId(); 
00256         int lastRepetition = -1;
00257         int lastFold = -1;
00258         Util::PropertySet job;
00259         job.Add("JobManager::job-id", "-1");
00260         while(true)
00261         {
00262             ILOG_DEBUG_NODE("client sends request for work");
00263             //send request for work
00264             Link::Mpi::SendString(job.GetDescription(),0);
00265             //receive assignment
00266             int source;
00267             std::string message = Link::Mpi::ReceiveString(source);
00268             job.Parse(message);
00269             int repetition = job.GetInt("repetition", -1);
00270             int fold = job.GetInt("fold", -1);
00271             int iteration = job.GetInt("JobManager::job-id", -1);
00272 
00273             ILOG_DEBUG_NODE("got assignment " << iteration << " from group " <<
00274                             job.GetString("JobManager::group-id"));
00275             if(iteration == -1)
00276                 break;
00277             if(repetition != lastRepetition)
00278             {
00279                 lastFold = -1; // need to reinitialise the folds
00280                 mEvaluator->SetRepetition(repetition,
00281                                           mProperties.GetInt("repetitions"));
00282                 lastRepetition = repetition;
00283             }
00284             if(fold != lastFold)
00285             {
00286                 mEvaluator->SetFold(fold, mProperties.GetInt("folds"));
00287                 lastFold = fold;
00288             }
00289             int iters = mIterator.GetTotalIterations();
00290             int folds = mProperties.GetInt("folds");
00291             int index = (((repetition * folds) + fold) * iters) + iteration;
00292             double score = CallEvaluator(iteration, index);
00293             ILOG_INFO("r" << repetition << " f" << fold << " i" << iteration <<
00294                       ", " <<  mProperties.GetDescription() << " -> " << score);
00295         }
00296     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:16 2011 for ImpalaSrc by  doxygen 1.5.1