MCPcopy Create free account
hub / github.com/dmlc/parameter_server / dataCache

Method dataCache

src/learner/bcd.h:467–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465 }
466
467 bool dataCache(const string& name, bool load) {
468 return false;
469 // // load / save label
470 // auto cache = conf_.local_cache();
471 // auto y_conf = ithFile(cache, 0, name + "_label_" + myNodeID());
472 // if (load) {
473 // MatrixPtrList<double> y_list;
474 // if (!readMatrices<double>(y_conf, &y_list) || !(y_list.size()==1)) return false;
475 // y_ = y_list[0];
476 // } else {
477 // if (!y_->writeToBinFile(y_conf.file(0))) return false;
478 // }
479 // // load / save feature groups
480 // string info_file = cache.file(0) + name + "_" + myNodeID() + ".info";
481 // InstanceInfo info = y_->info().ins_info();
482 // if (load && !readFileToProto(info_file, &info)) return false;
483 // InstanceInfo new_info;
484 // for (int i = 0; i < info.fea_grp_size(); ++i) {
485 // int id = info.fea_grp(i).grp_id();
486 // string x_name = name + "_fea_grp_" + std::to_string(id) + "_" + myNodeID();
487 // auto x_conf = ithFile(cache, 0, x_name);
488 // string key_name = name + "_key_" + std::to_string(id) + "_" + myNodeID();
489 // auto key_conf = ithFile(cache, 0, key_name);
490 // if (load) {
491 // MatrixPtrList<double> x_list;
492 // if (!readMatrices<double>(x_conf, &x_list) || !(x_list.size()==1)) return false;
493 // X_[id] = x_list[0];
494 // if (!w_->key(id).readFromFile(SizeR(0, X_[id]->cols()), key_conf)) return false;
495 // } else {
496 // if (!X_[id]) continue;
497 // if (w_->key(id).empty()) LL << id << " " << X_[id]->debugString();
498 // if (!(X_[id]->writeToBinFile(x_conf.file(0))
499 // && w_->key(id).writeToFile(key_conf.file(0)))) return false;
500 // *new_info.add_fea_grp() = info.fea_grp(i);
501 // }
502 // }
503 // if (!load && !writeProtoToASCIIFile(new_info, info_file)) return false;
504 // return true;
505 }
506
507 SlotReader slot_reader_;
508

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected