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

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

Definition at line 250 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().

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

Here is the call graph for this function:


Generated on Fri Mar 19 11:23:51 2010 for ImpalaSrc by  doxygen 1.5.1