-
Notifications
You must be signed in to change notification settings - Fork 2k
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
PUBDEV-4639: Added requirement for data.table. #4265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably change the default value fo use arg
Thanks for the review. I don't understand what that means. Please help? W |
2f46e16
to
fe16bb5
Compare
Honza: I have added the change in h2o-3-DESCRIPTION.template. Let me know if that is the right place. If not, please point me to the right file. |
@wendycwong no, I think we want to keep data.table in suggest since its not required, the data.table support should only enable itself when data.table is installed |
@honzasterba Can you tell me exactly what I need to change then. Thanks. W |
fe16bb5
to
7b72d37
Compare
I change to DESCRIPTION should be reverted as I see you did. |
Honza: Thanks for the help. Do you think this PR is ready to go? Or more changes are needed? I have been testing it continuously and it seems to work fine. Let me know. Thanks, Wendy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the tests are green I think its fine
maybe check if there is some docs that need updating @angela0xdata |
@honzasterba: There are two runits that are failing in RSmoke test. That needs to be resolved before this PR can merge. |
bfa0de1
to
5a4c85e
Compare
Needs fixing before merging:
AFAIK @ledell offered to help with that |
3ef138a
to
ec3c3e8
Compare
I have pushed a fix for the CRAN issue and also the actual change of the default value for data.table use. |
333e7d3
to
7d17920
Compare
fef748f
to
2fa26f1
Compare
@honzasterba The PR I submitted #4308 does not appear to have been merged yet @wendycwong @ledell ? |
@mattdowle I believe wendy cherry picked your commit into this PR, I am now working on fixing the rest of the tests |
@honzasterba Ah ok I see the cherry pick now.
Did you write earlier above in this PR that data.table is downgraded to suggests in DESCRIPTION? If so that will affect using data.table syntax. It seems that as.h2o.Matrix is using data.table syntax. For that to work data.table needs to know h2o is data.table-aware. There is a flag that can be set in h2o's NAMESPACE file ( Options that spring to mind are :
However, with both options 2 and 3, if a user passes a data.table to a function in h2o that is really expecting a data.frame (i.e. it is using data.frame syntax), then unexpected behaviour could occur. When a package states it is data.table-aware, it really has to be fully aware throughout all exported functions. Packages which accept data.frame from a user, but want to use data.table syntax, should have an as.data.table() call at the start of each user-visible function that use data.table syntax, and an as.data.frame() call at the start of each exported function that uses data.frame syntax. I think option 1 is by far the safest option in the case of h2o package. |
yes, I have fixed the data-table aware issue yesterday, but it seems that @wendycwong did another rebase afterwards and my commit is lost :( |
Sorry guys. I will take my hands off this PR now. |
This branch passes |
@mattdowle @ledell please review, I have decided to use |
@@ -5,7 +5,9 @@ test.pubdev_2844 <- function() { | |||
|
|||
df1 <- iris | |||
h2o.no_progress() | |||
|
|||
# enable using of data.table for as.data.frame | |||
options(h2o.fread=TRUE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this also enable it for the rest of the test suite? or is it just this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it probably does, will fix
@honzasterba looks good to me, but please change the target branch to master and lets target 3.30 for this feature |
also try to fix as.data.frame
…ly reverting; unrelated to data.table per se
… minimally reverting; unrelated to data.table per se" This reverts commit 668b7dc.
973f02f
to
559fafa
Compare
@@ -3530,6 +3530,8 @@ as.data.frame.H2OFrame <- function(x, ...) { | |||
# Versions of R prior to 3.1 should not use hex string. | |||
# Versions of R including 3.1 and later should use hex string. | |||
useHexString <- getRversion() >= "3.1" | |||
# We cannot use data.table by default since its handling of escaping inside quoted csv values is not very good | |||
# in some edge cases its simply impossible to load data in correct format without additional post processing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What specifically do you mean by "not very good"? This is unhelpful to write in this way. Tell me what's wrong and I'll fix it. Probably already known somewhere and I'll raise the priority. We're on the same team here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being so ambiguous. On second thought I should have been more to the point and link to existing issue.
This is the issue I was reffering to:
This is the issue: Rdatatable/data.table#1109
Here is the test that I was not able to make pass with data.table even with changes on the back-end: https://github.com/h2oai/h2o-3/pull/4265/files#diff-c87a495277fa01b186f5300c48973bf6R33
This PR enable data.table by default as specified by JIRA: https://0xdata.atlassian.net/browse/PUBDEV-4639.