junrushao1994 commented on a change in pull request #8817:
URL: https://github.com/apache/tvm/pull/8817#discussion_r694527614
##########
File path: python/tvm/tir/schedule/schedule.py
##########
@@ -268,6 +296,32 @@ def remove_rv(self, rand_var: RAND_VAR_TYPE) -> None:
########## Schedule: Sampling ##########
+ def sample_categorical(
+ self,
+ candidates: List[int],
+ probs: List[float],
+ decision: Optional[int] = None,
+ ) -> ExprRV:
+ """Sample an integer given the probability distribution
+
+ Parameters
+ ----------
+ candidates : The candidates to be sampled from
+ probs : The probability of each candidate
+ decision : The sampling decision, if any
Review comment:
let's follow the doc format of other methods
--
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]