zxybazh commented on PR #12936: URL: https://github.com/apache/tvm/pull/12936#issuecomment-1262581930
Hi @leandron, thanks for looking into this PR! Let me explain more context of what's going on in this PR. We've recently introduced a XGBoost Model upgrade to support new xgboost version of callback class in #12141. However, in this PR it uses a function called `optional_xgboost_callback` that works to avoid compatibility issue (xgboost 1.5.2 v.s. 1.6.0). In this specific function, it tries to import the newly introduced xgboost callback class and create a new class using it as base class. This actually imported xgboost when meta_schedule is imported, which is not ideal because xgboost is not a dependency of tvm and meta_schedule, it should only be required when xgboost cost model is employed. This PR fixes the problem by moving the class and the function mentioened above under a function that returns this class when needed. In this way we avoided unwanted import of xgboost in meta_schedule. In this case, it's a bit tricky to create a unit test for that, I've tested locally though. Would really appreciate it if you know how to create a test case for unwanted import in meta_schedule. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
