MCPcopy Create free account
hub / github.com/activeloopai/deeplake / commit_dataset

Function commit_dataset

cpp/deeplake_pg/table_data_impl.hpp:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32inline void commit_dataset(std::shared_ptr<deeplake_api::dataset> dataset, bool show_progress)
33{
34 constexpr auto high_num_rows = 50000;
35 const bool print_progress =
36 (show_progress && dataset->num_rows() > high_num_rows && dataset->has_uncommitted_changes());
37 auto promise = async::run_on_main([ds = std::move(dataset)]() {
38 return ds->commit();
39 });
40 if (print_progress) {
41 const std::string message = fmt::format("Committing dataset (samples: {})", dataset->num_rows());
42 pg::utils::print_progress_and_wait(std::move(promise), message);
43 } else {
44 promise.get_future().get();
45 }
46}
47
48} // namespace impl
49

Callers 1

commitMethod · 0.85

Calls 6

run_on_mainFunction · 0.85
print_progress_and_waitFunction · 0.85
get_futureMethod · 0.80
num_rowsMethod · 0.45
commitMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected