Skip to content

Commit 68af035

Browse files
authored
fix: add missing self parameter to instance methods in DSProposalV2ExpGen (#1213)
1 parent 68b6985 commit 68af035

File tree

1 file changed

+2
-2
lines changed
  • rdagent/scenarios/data_science/proposal/exp_gen

1 file changed

+2
-2
lines changed

rdagent/scenarios/data_science/proposal/exp_gen/proposal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)