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

208 warning message #209

Merged
merged 2 commits into from
Dec 12, 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
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

* Changed the `writer_indices` and `doc_indices` arguments in `get_clusters_batch()` to be optional. The main reason for this change is so that users do not need to use a naming convention for their handwriting files in order to use `handwriterRF::calculate_slr()` and `handwriterRF::compare_documents()` which call `get_clusters_batch()`.

* Fixed bug in `get_clusters_batch()` so that the warning "closing unused connection" no longer occurs if the user runs the function in parallel.

# handwriter 3.2.1

## Minor improvements and fixes
Expand Down
5 changes: 5 additions & 0 deletions R/cluster_assignment.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ get_clusters_batch <- function(template,
proclist <- do.call(rbind, out_proclist)
}

# Close connection if running in parallel
if (num_cores > 1) {
parallel::stopCluster(my_cluster)
}

# check for missing clusters. NOTE: The foreach loop could be restructured to
# allow a warning to be given if a document without graphs is encountered and
# this message could be removed.
Expand Down
Loading