MCPcopy Create free account
hub / github.com/dmlc/xgboost / Fetch

Method Fetch

src/data/sparse_page_source.h:449–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447 bst_idx_t n_batches_{0};
448
449 void Fetch() final {
450 page_ = std::make_shared<SparsePage>();
451 // The first round of reading, this is responsible for initialization.
452 if (!this->ReadCache()) {
453 bool type_error{false};
454 CHECK(proxy_);
455 cpu_impl::DispatchAny(
456 proxy_,
457 [&](auto const& adapter_batch) {
458 page_->Push(adapter_batch, this->missing_, this->nthreads_);
459 },
460 &type_error);
461 if (type_error) {
462 DevicePush(proxy_, missing_, page_.get());
463 }
464
465 page_->SetBaseRowId(base_row_id_);
466 base_row_id_ += page_->Size();
467 this->n_batches_++;
468 this->WriteCache();
469 }
470 }
471
472 public:
473 SparsePageSource(DataIterProxy<DataIterResetCallback, XGDMatrixCallbackNext> iter,

Callers 2

SparsePageSourceMethod · 0.95
SparsePageSourceClass · 0.95

Calls 8

DispatchAnyFunction · 0.85
DevicePushFunction · 0.85
ReadCacheMethod · 0.80
WriteCacheMethod · 0.80
PushMethod · 0.45
getMethod · 0.45
SetBaseRowIdMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected