Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail workflow if input size is empty. #181

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def ededup_compute_execution_params(
sampling = data_access.sample_input_data(n_samples=n_samples)
avg_doc_size = sampling.get("average doc size KB")
number_of_docs = sampling.get("estimated number of docs")
if number_of_docs == 0:
print(f"Estimated number of documents and documents size is zero. Please verify the input path.")
sys.exit(1)
avg_table_size = sampling.get("average table size MB") / KB
# compute number of hashes
n_hashes = math.ceil(number_of_docs * 32 / GB)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def _false_negative_probability(ths: float, b: int, r: int) -> float:
avg_doc_size = sampling.get("average doc size KB")
number_of_docs = sampling.get("estimated number of docs")
avg_table_size = sampling.get("average table size MB") / KB
if number_of_docs == 0:
print(f"Estimated number of documents and documents size is zero. Please verify the input path.")
sys.exit(1)
# we are creating more buckets actors, so that we get better parallelization for bucket processing
b_actors = math.ceil(num_buckets * number_of_docs * 64 * 1.1 / GB)
d_actors = math.ceil(number_of_docs * 48 * 1.1 / GB)
Expand Down