merrymercy commented on a change in pull request #7197:
URL: https://github.com/apache/tvm/pull/7197#discussion_r551763767



##########
File path: python/tvm/auto_scheduler/cost_model/xgb_model.py
##########
@@ -116,12 +117,17 @@ def __init__(self, verbose_eval=25, 
num_warmup_sample=100, seed=None):
         self.plan_size = 32
         self.num_warmup_sample = num_warmup_sample
         self.verbose_eval = verbose_eval
+        self.model_file = model_file
+        if model_file:
+            logger.info("XGBModel: Load pretrained model from %s...", 
model_file)
+            self.load(model_file)

Review comment:
       Remove this. No python/sklearn model has api or behavior like this.
   Calling `model.load(model_file)` explicitly is cleaner than adding 
`model_file` to the constructor.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to