
    &`i                         d dl Z d dlmZ d dlZd dlmZ d dlmZ d dl	m
Z
 e	 d
dee         dee         ddfd	            ZdS )    N)Optional)DeveloperAPI)try_import_tf)set_torch_seed	frameworkseedreturnc                 F   |dS t          j        |           t          j                             |           | dk    rt          |           dS | dk    rKt	                      \  }}}|dk    r|j                             |           dS |                    |           dS dS )a   Seed global modules such as random, numpy, torch, or tf.

    This is useful for debugging and testing.

    Args:
        framework: The framework specifier (may be None).
        seed: An optional int seed. If None, will not do
            anything.
    Ntorch)r   tf2   )randomr   npr   r   set_seedset_random_seed)r   r   tf1tftfvs        w/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/rllib/utils/debug/deterministic.pyupdate_global_seed_if_necessaryr      s     | KINN4 GD!!!!!!	e		$R!88It$$$$$ %%%%% 
	    )NN)r   typingr   numpyr   ray.rllib.utils.annotationsr   ray.rllib.utils.frameworkr   ray.rllib.utils.torch_utilsr   strintr    r   r   <module>r       s               4 4 4 4 4 4 3 3 3 3 3 3 6 6 6 6 6 6 ;?& &}&+3C=&	& & & & & &r   