Skip to content
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

XgboostError #134

Closed
peter-WeiZhang opened this issue Aug 5, 2020 · 5 comments
Closed

XgboostError #134

peter-WeiZhang opened this issue Aug 5, 2020 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@peter-WeiZhang
Copy link

XGBoostError: [14:36:23] C:\Users\Administrator\workspace\xgboost-win64_release_1.0.0\dmlc-core\src\io\local_filesys.cc:209: Check failed: allow_null: LocalFileSystem::Open "C:\Users\ZW\AppData\Local\Temp\tmp_mu9qwkg": Permission denied

I don't know how to solve this, I have tried to open jupyter notebook with root, but still not work, thanks!

@peter-WeiZhang
Copy link
Author

XGBoostError Traceback (most recent call last)
in
1 automl = AutoML() # total train limit = 1 hour
----> 2 automl.fit(X_train, y_train)

d:\anaconda3\envs\mljar\lib\site-packages\supervised\automl.py in fit(self, X_train, y_train, X_validation, y_validation)
1122
1123 except Exception as e:
-> 1124 raise e
1125 finally:
1126 if self._X_train_path is not None:

d:\anaconda3\envs\mljar\lib\site-packages\supervised\automl.py in fit(self, X_train, y_train, X_validation, y_validation)
1052 self._time_start[self._fit_level] = start
1053 for params in tuner.default_params(len(self._models)):
-> 1054 self.train_model(params)
1055 self._time_spend["default_algorithms"] = np.round(time.time() - start, 2)
1056

d:\anaconda3\envs\mljar\lib\site-packages\supervised\automl.py in train_model(self, params)
553 raise AutoMLException(f"Cannot create directory {model_path}")
554
--> 555 mf.train(model_path)
556
557 mf.save(model_path)

d:\anaconda3\envs\mljar\lib\site-packages\supervised\model_framework.py in train(self, model_path)
142 self.callbacks.on_iteration_start()
143
--> 144 learner.fit(X_train, y_train, X_validation, y_validation, log_to_file)
145
146 self.callbacks.on_iteration_end(

d:\anaconda3\envs\mljar\lib\site-packages\supervised\algorithms\xgboost.py in fit(self, X, y, X_validation, y_validation, log_to_file)
111 # dmlc/xgboost#5474
112 with tempfile.NamedTemporaryFile() as tmp:
--> 113 self.model.save_model(tmp.name)
114 del self.model
115 self.model = xgb.Booster()

d:\anaconda3\envs\mljar\lib\site-packages\xgboost\core.py in save_model(self, fname)
1495 if isinstance(fname, (STRING_TYPES, os_PathLike)): # assume file name
1496 _check_call(_LIB.XGBoosterSaveModel(
-> 1497 self.handle, c_str(os_fspath(fname))))
1498 else:
1499 raise TypeError("fname must be a string or os_PathLike")

d:\anaconda3\envs\mljar\lib\site-packages\xgboost\core.py in _check_call(ret)
187 """
188 if ret != 0:
--> 189 raise XGBoostError(py_str(_LIB.XGBGetLastError()))
190
191

XGBoostError: [14:36:23] C:\Users\Administrator\workspace\xgboost-win64_release_1.0.0\dmlc-core\src\io\local_filesys.cc:209: Check failed: allow_null: LocalFileSystem::Open "C:\Users\ZW\AppData\Local\Temp\tmp_mu9qwkg": Permission denied

@pplonski pplonski self-assigned this Aug 5, 2020
@pplonski pplonski added the bug Something isn't working label Aug 5, 2020
@pplonski
Copy link
Contributor

pplonski commented Aug 5, 2020

When training xgboost Im saving it to temporary file and reloading to reduce RAM consumption. Maybe there is smarter way to reduce the RAM?

The error means that your operating system doesnt allow to create temporary file because of permissions. Have you try to run it as a script?

@peter-WeiZhang
Copy link
Author

When training xgboost Im saving it to temporary file and reloading to reduce RAM consumption. Maybe there is smarter way to reduce the RAM?

The error means that your operating system doesnt allow to create temporary file because of permissions. Have you try to run it as a script?

I have tried to download as python script in jupyter and ran it with VS Code, it reports the same error.

@pplonski pplonski added this to the version 0.6.0 milestone Aug 10, 2020
@pplonski pplonski added this to In progress in mljar-supervised Aug 10, 2020
@pplonski
Copy link
Contributor

Thank you for checking! I will fix this with #127 issue.

@pplonski
Copy link
Contributor

Fixed in release 0.6.1. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
mljar-supervised
  
In progress
Development

No branches or pull requests

2 participants