-
Notifications
You must be signed in to change notification settings - Fork 1
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
Failure to build vignette #69
Comments
SummaryWhen trying to generate the vignette, R creates an R script containing the code chunks up until an error is found. This might provide some insight on where the problem is. MREI've slightly modified the script to achieve minimal reproducibility. Here it is: set.seed(1234)
library(ggplot2)
library(dplyr)
library(cellmigRation)
library(kableExtra)
data(ThreeConditions)
print(ThreeConditions[[1]])
x1 <- OptimizeParams(
ThreeConditions$ctrl01, threads = 2, lnoise_range = c(5, 12),
diameter_range = c(16, 22), threshold_range = c(5, 15, 30),
verbose = FALSE, plot = TRUE
)
print(x1)
print(getOptimizedParams(x1)) Obtained output ~~~ An S4 trackedCells object ~~~
+ Num of images: 7
+ Optimized Params: No
+ Run w/ Custom Params: No
+ Cells Tracked: No
+ Stats Computed: No
$auto_params
NULL
$results
NULL Expected outputIf I understand the problem correctly, the problem is that |
Adding myself as an assignee because this could also be a local problem I'll try to debug while @dami82 works on his end. |
Actually, I double-checked on my laptop, and I cannot reproduce the issue. It looks like the I decided to have a closer look into this by using a virgin environment, so I deployed a small Ubuntu 20.04 instance (a t2.xlarge) on AWS. The OS comes with no R, so here I am installing everything from scratch. In the end, there were NO issues with installation or vignette building.
On AWS/EC2, I used the following code:
I downloaded the html, it looks exactly as expected. |
Thank you for taking another look at it, Damiano. I think we're quite close to solving this. I've reran Testing 9 combination(s) of params.
This may take some time.
Processing starting worker pid=168842 on localhost:11107 at 14:39:24.782
starting worker pid=168841 on localhost:11107 at 14:39:24.784
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> -> workLoop -> makeSOCKmaster
Execution halted
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> -> workLoop -> makeSOCKmaster
Execution halted When I set I've searched for this "Error in unserialize(node$con) : error reading from connection" error; couldn't find any solution that didn't involve changing the function code itself, which is something we shouldn't be meddling with at this point in time (especially for a non-reproducible issue) unless we're confident in what we're changing. I've changed all instances of Would you consider reviewing a PR from me proposing this |
Nice! Sure, will do.
This still puzzles me, though. I may send you a list of short tests that you may run on your laptop to identify where the issue is!
Best regards,
Damiano
——
Damiano Fantini
Sent from my iPhone
… On Feb 18, 2021, at 08:55, Waldir Leoncio ***@***.***> wrote:
Thank you for taking another look at it, Damiano. I think we're quite close to solving this.
I've reran OptimizeParams() with verbose=TRUE to aid debugging (as I should have done long ago 🤦🏽♂️) and this is the output from the function:
Testing 9 combination(s) of params.
This may take some time.
Processing starting worker pid=168842 on localhost:11107 at 14:39:24.782
starting worker pid=168841 on localhost:11107 at 14:39:24.784
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> -> workLoop -> makeSOCKmaster
Execution halted
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> -> workLoop -> makeSOCKmaster
Execution halted
When I set threads=1, the output is clean and x1 is populated as expected. I've run update.packages() and found no packages to update, so version differences shouldn't be to blame. I've also tried as many as 10 threads, no dice. RAM doesn't seem to be a problem, as it doesn't even budge (and is way below capacity on my 16 GB desktop).
I've searched for this "Error in unserialize(node$con) : error reading from connection" error; couldn't find any solution that didn't involve changing the function code itself, which is something we shouldn't be meddling with at this point in time (especially for a non-reproducible issue).
I've changed all instances of threads in the vignette to 1 and now the whole thing runs (🎉). There are a few warnings (see this gist) which I don't see in your post above, but at least the HTML produced looks OK. A devtools::check() also finishes with no errors, warnings or notes.
Would you consider merging a PR proposing this threads=1 change on the vignette? This could be a problem that pops up on some other testing environments setup like mine, and the toy dataset seems small enough to be handled by 1 thread on consumer-grade CPUs. I could add a short comment suggesting the user to increase that number if they wish.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sure thing, send away! |
Vignette building seems to work consistently now. Closing the issue... |
MRE
Expected output
A clean vignette build.
Obtained output
System info
The text was updated successfully, but these errors were encountered: