File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
rdagent/scenarios/data_science/proposal/exp_gen Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -921,13 +921,13 @@ def select_hypothesis(
921921 return index_to_pick_pool_list [reproducible_int ]
922922
923923 # BEGIN: for support llm-based hypothesis selection -----
924- def _cosine_similarity_matrix_numpy (A , B ):
924+ def _cosine_similarity_matrix_numpy (self , A , B ):
925925 dot_products = np .matmul (A , B .T )
926926 A_norms = np .linalg .norm (A , axis = 1 , keepdims = True )
927927 B_norms = np .linalg .norm (B , axis = 1 , keepdims = True ).T
928928 return dot_products / (A_norms * B_norms )
929929
930- def _gumbel_softmax_hard_sample (logits , tau = 1.0 , n_samples = 1 ):
930+ def _gumbel_softmax_hard_sample (self , logits , tau = 1.0 , n_samples = 1 ):
931931
932932 gumbel_noise = - np .log (- np .log (np .random .uniform (size = logits .shape ) + 1e-20 ) + 1e-20 )
933933 y = (logits + gumbel_noise ) / tau
You can’t perform that action at this time.
0 commit comments