driazati commented on code in PR #13207:
URL: https://github.com/apache/tvm/pull/13207#discussion_r1006225498


##########
python/tvm/contrib/hexagon/pytest_plugin.py:
##########
@@ -84,10 +84,13 @@ def android_serial_number() -> Optional[str]:
 def get_free_port() -> int:
     """Return the next port that is available to listen on"""
     global PREVIOUS_PORT
+    random.seed(0)

Review Comment:
   this should only run once otherwise it resets the rng state and you get the 
same value every time (not sure if that's okay here or not), maybe guard this 
behind a global flag `RNG_SEEDED` or something
   
   ```
   >>> import random
   >>> random.seed(0)
   >>> random.random()
   0.8444218515250481
   >>> random.seed(0)
   >>> random.random()
   0.8444218515250481
   ```



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

Reply via email to