Skip to content

Commit

Permalink
updates to vector
Browse files Browse the repository at this point in the history
  • Loading branch information
amytangzheng committed Dec 18, 2024
1 parent 26befed commit 9c4663c
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 273 deletions.
8 changes: 6 additions & 2 deletions examples/featurize.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
vect_diff_length_df = pd.read_csv("../tests/vector_data/sentence/chats/test_vector_valid.csv", encoding='utf-8')
vect_null = pd.read_csv("../tests/vector_data/sentence/chats/test_vector_valid.csv", encoding='utf-8')
vect_nan = pd.read_csv("../tests/vector_data/sentence/chats/test_vector_valid.csv", encoding='utf-8')
vect_no_one_to_one = pd.read_csv("../tests/vector_data/sentence/chats/test_vector_valid.csv", encoding='utf-8')
test_convo_num_issue = pd.read_csv("../tests/vector_data/sentence/chats/test_turns_convo_num_issue.csv", encoding='utf-8')

# test number of rows mismatch
vector_row_mismatch_df = vector_row_mismatch_df.iloc[:-1]
Expand All @@ -77,6 +79,9 @@
# test nan vectors
vect_nan.loc[0, 'message_embedding'] = '[np.nan, np.nan]'

# test no 1-1 mapping
vect_no_one_to_one.loc[0, 'message_embedding'] = '[0.1, 0.2]'

test_cases = {
"Valid DataFrame": valid_df,
"Vector Row Mismatch": vector_row_mismatch_df,
Expand All @@ -87,10 +92,9 @@
"Vectors Null": vect_null,
"Vectors Nan": vect_nan,
"Custom File Equals Default Dir": valid_df,
"No 1-1 Mapping": vect_no_one_to_one,
}

# custom_vect_path = "../tests/vector_data/sentence/chats/test_vector.csv"

for name, df in test_cases.items():
custom_vect_path = "../tests/vector_data/sentence/chats/test_vector.csv"
print(name)
Expand Down
Loading

0 comments on commit 9c4663c

Please sign in to comment.