You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/08/23 21:30:53 UTC
[GitHub] [tvm] vinx13 commented on a change in pull request #8820: [AutoTVM] Use PopenPool in XgBoostCostModel
vinx13 commented on a change in pull request #8820:
URL: https://github.com/apache/tvm/pull/8820#discussion_r694322843
##########
File path: python/tvm/autotvm/tuner/xgboost_cost_model.py
##########
@@ -327,14 +329,9 @@ def _get_feature(self, indexes):
if need_extract:
pool = self._get_pool()
- # If we are forking, we can pass arguments in globals for better performance
- if multiprocessing.get_start_method(False) == "fork":
- feas = pool.map(self.feature_extract_func, need_extract)
- else:
- args = [(self.space.get(x), self.target, self.task) for x in need_extract]
- feas = pool.map(self.feature_extract_func, args)
+ feas = pool.map_with_error_catching(self.feature_extract_func, need_extract)
for i, fea in zip(need_extract, feas):
- fea_cache[i] = fea
+ fea_cache[i] = fea.value
Review comment:
```suggestion
fea_cache[i] = fea.value if fea.status == StatusKind.COMPLETE else None
```
let's be cautious with potential failure in rare cases
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org