payload: {"action":"created","issue":{"url":"https://api.github.com/repos/mlr-org/mlr3/issues/365","repository_url":"https://api.github.com/repos/mlr-org/mlr3","labels_url":"https://api.github.com/repos/mlr-org/mlr3/issues/365/labels{/name}","comments_url":"https://api.github.com/repos/mlr-org/mlr3/issues/365/comments","events_url":"https://api.github.com/repos/mlr-org/mlr3/issues/365/events","html_url":"https://github.com/mlr-org/mlr3/issues/365","id":498276275,"node_id":"MDU6SXNzdWU0OTgyNzYyNzU=","number":365,"title":"ordering of columns in mlr3","user":{"login":"berndbischl","id":1225974,"node_id":"MDQ6VXNlcjEyMjU5NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1225974?v=4","gravatar_id":"","url":"https://api.github.com/users/berndbischl","html_url":"https://github.com/berndbischl","followers_url":"https://api.github.com/users/berndbischl/followers","following_url":"https://api.github.com/users/berndbischl/following{/other_user}","gists_url":"https://api.github.com/users/berndbischl/gists{/gist_id}","starred_url":"https://api.github.com/users/berndbischl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berndbischl/subscriptions","organizations_url":"https://api.github.com/users/berndbischl/orgs","repos_url":"https://api.github.com/users/berndbischl/repos","events_url":"https://api.github.com/users/berndbischl/events{/privacy}","received_events_url":"https://api.github.com/users/berndbischl/received_events","type":"User","site_admin":false},"labels":[{"id":1094500089,"node_id":"MDU6TGFiZWwxMDk0NTAwMDg5","url":"https://api.github.com/repos/mlr-org/mlr3/labels/Priority:%20High","name":"Priority: High","color":"eb6420","default":false},{"id":1094500947,"node_id":"MDU6TGFiZWwxMDk0NTAwOTQ3","url":"https://api.github.com/repos/mlr-org/mlr3/labels/Type:%20Question","name":"Type: Question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-09-25T13:09:18Z","updated_at":"2019-09-25T18:48:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Does mlr3 somehow guarantee / ensure that column orders do not change?\r\nAre you @mllg aware of this constraint?\r\n\r\na) We found a problem with at least xgboost of order changes. so if xgboost is passed data during training and predict, and that data is \"legal\" in principle, but the column order has changed during training and predict, xgboost fails. and there might be other learners where this happens.\r\n\r\nb) I found this when I tested mlr3pipelines with imputation. This changes the order of cols. Then I ran into this bug.\r\n\r\nc) So this is certainly also a pipelines issue. but @mb706 told me he asked you about this, and you said \"column order does not matter / can be arbitrary\" so at least I wanted to raise this here too. \r\n\r\nAs Martin, when he changes data in preproc, often changes data by deleting the col that needs to be changed,  then \"cbinds\" the changed col to end of the dataset, we now potentially face this problem a lot. And this can completely break stuff\r\n"},"comment":{"url":"https://api.github.com/repos/mlr-org/mlr3/issues/comments/535160078","html_url":"https://github.com/mlr-org/mlr3/issues/365#issuecomment-535160078","issue_url":"https://api.github.com/repos/mlr-org/mlr3/issues/365","id":535160078,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNTE2MDA3OA==","user":{"login":"mllg","id":1260920,"node_id":"MDQ6VXNlcjEyNjA5MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1260920?v=4","gravatar_id":"","url":"https://api.github.com/users/mllg","html_url":"https://github.com/mllg","followers_url":"https://api.github.com/users/mllg/followers","following_url":"https://api.github.com/users/mllg/following{/other_user}","gists_url":"https://api.github.com/users/mllg/gists{/gist_id}","starred_url":"https://api.github.com/users/mllg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mllg/subscriptions","organizations_url":"https://api.github.com/users/mllg/orgs","repos_url":"https://api.github.com/users/mllg/repos","events_url":"https://api.github.com/users/mllg/events{/privacy}","received_events_url":"https://api.github.com/users/mllg/received_events","type":"User","site_admin":false},"created_at":"2019-09-25T18:48:28Z","updated_at":"2019-09-25T18:48:28Z","author_association":"MEMBER","body":"You misunderstood. xgboost relies on the order. Usually, you don't change the order of the columns between train and predict. But this happens automatically if you pass a test data set w/o target column (with the exception that the target is in the last column). But because xgboost has a native (tabular) data format where the target and features are separated, there usually is no reordering."}}
other: {"actor":{"display_login":"mllg"}}