Closed NoonanM closed 6 years ago
With socket cluster in windows, the error message in the parallel workers are in different R process and you cannot see them. In contrast the linux/mac mode it's still possible to collect the error message.
The simplest method to deal with error in parallel is to run the same operation with parallel disabled again. That should show the proper error message for this case, and rule out all the subtle, system dependent errors in parallel mode.
As for data cleaning, the real difficulties are all the possibilities. As long as the problem is well defined we can deal with it, just we may need to define many cases.
Wait, I think the error message in as.telemetry
should not be suppressed as that happened in the import step. Did they see the message in console when importing?
If they are using the web app where is no console, I built a button to show the error message specifically for this purpose, first check Capture Error Message
before the operation, then click the Error Message
button after error occurred.
Yes, the user disabled parallel, and was still getting errors.
I called as.telemetry
on their data in RStudio and got the following warning messages:
Warning messages:
1: In telemetry.clean(telist[[i]], id = id[i]) :
Times might be out of order or duplicated in CE_04_TITI. Make sure that timeformat and timezone are correctly specified.
2: In telemetry.clean(telist[[i]], id = id[i]) :
Duplicate times in CE_04_TITI. Data cannot be fit without an error model.
3: In telemetry.clean(telist[[i]], id = id[i]) :
Duplicate times in CE_19_SILVIO. Data cannot be fit without an error model.
4: In telemetry.clean(telist[[i]], id = id[i]) :
Duplicate times in CE_31_ANNA. Data cannot be fit without an error model.
So from the ctmm()
warning messages it was clear why those models were failing, but I couldn't diagnose the problem in the app.
No warning messages were displayed when the data were loaded in.
Did they use hosted app or local app? There is a menu in right top corner to tell the installation date
, what was the date?
Ok, the warnings are stored upon loading. You can see them if you click on the Error Messages
button, but it's not obvious that that was needed.
Is there any way to make the warning messages from as.telemetry()
pop up automatically after loading in the data?
For hosted web app, there is no R console. I have to make quite some effort to capture the console messages.
It's possible to write one time code to pop up message for message in one place, but any other places have similar need will need another treatment. The best option is to keep an area to show console message live, just like R console. Unfortunately that was quite difficult. Several people attempted but failed to get a good solution.
I'll check this after I finished my current task.
Ok, sounds good. At the very least, the import warning messages should be kept because they're designed to help users with common data quality issues.
Just to note, the duplicate times is a message and not an error, because duplicate times can work fine with an error model (if they obey the error model). Its okay for users to have the option of discarding duplicate times. However, there is no one best way to discard duplicate times, because it depends on their characteristics/cause.
For duplicate times that are outliers (bugs), users should be able to fix this during the outlier detection step. An automated option to drop the duplicate times with the highest associated speed could also work.
For duplicate times that are informative (i.e., approximately represent ordinary telemetry error), the duplicate times' associated locations & HDOPs can be consolidated.
I will write a function and/or as.telemetry()
option to handle the duplicate times with options to (1) do nothing, (2) drop higher speed duplicates, (3) consolidate duplicates.
It's quite challenging to manipulate with error output, file connection, error handling. And the app have two modes for error messages
I used to make this an option, now I think the hosted mode need to use capture mode anyway, and the console when available is always better (there are more context), so I'll fix the mode depend on app running mode.
For now, if there is warning in as.telemetry
import
There will be more context in console so I think this is better than the captured window.
All other warning messages are also in console in this mode.
For warnings/errors other than the as.telemetry
import, the message will be available by clicking a button in side bar (when app is running in hosted mode).
The messages also included app installation date and session info.
I updated the hosted web app and tested, the warnings are working as expected
I made the error message to console/app as an option and leave the default to be message to app. I also took a lot of effort to maintain and clean up the connections and sink properly.
The error message will be saved to save progress
zip if errors are captured in app.
A user ran the model fitting on some of there data and got the following error message:
I looked into it, and the issue was with their data. They had duplicate time stamps in their data. When you use
as.telemetry()
in the command line, it returns warning messages when this occurs so users can diagnose the problem. In the app, the warning messages are suppressed and there is no way for the user to see any potential issues with their data prior to the model fitting step.Related to this, it might be useful to have a feature that allows users to clean out duplicate timestamps along with the outlier filtering step.