Skip to content

Commit

Permalink
Apply more reproducibility test infra fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Dec 30, 2024
1 parent 8cdd3f8 commit a0af802
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 145 deletions.
7 changes: 6 additions & 1 deletion reproducibility_tests/move_output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ move_data_to_save_dir(;

if buildkite_ci && in_merge_queue
folders = get_reference_dirs_to_delete(; root_dir = cluster_data_prefix)
debug_reproducibility() && @warn "Repro: deleting folders $folders"
bins = compute_bins(folders)
if !isempty(folders)
msg = prod(x -> " $x\n", folders)
@warn "Repro: deleting folders:\n$msg"
end
@warn "Deleted folder bins:\n $(string_bins(bins))"
for f in folders
rm(f; recursive = true, force = true)
end
Expand Down
5 changes: 4 additions & 1 deletion reproducibility_tests/ref_counter.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
192
193

# **README**
#
Expand All @@ -21,6 +21,9 @@

#=
193
- More reproducibility infrastructure fixes.
192
- Reproducibility infrastructure fixes.
Expand Down
15 changes: 4 additions & 11 deletions reproducibility_tests/reproducibility_tools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ function error_if_dissimilar_dicts(dicts, dict)
end
end

function all_files_in_dir(dir)
all_files = String[]
for (root, dirs, files) in walkdir(dir)
for file in files
push!(all_files, joinpath(root, file))
end
end
return all_files
end

function no_comparison_error(dirs, non_existent_files)
msg = "\n\n"
msg *= "Pull request author:\n"
Expand All @@ -59,7 +49,10 @@ function no_comparison_error(dirs, non_existent_files)
msg *= "for how to merge this PR."
msg *= "\n\n"
for dir in dirs
msg *= "Files in dirs: $(all_files_in_dir(dir))\n"
msg *= "Files in dir $dir\n"
for file in all_files_in_dir(dir)
msg *= " $file\n"
end
end
error(msg)
end
Expand Down
Loading

0 comments on commit a0af802

Please sign in to comment.