Storing f32 to later avoid allocation a Vec of inputs (#137) #621
5 fail, 133 pass in 2m 27s
Annotations
Check warning on line 0 in ahnlich_client_py.tests.ai_client.test_ai_client_store_commands
github-actions / Test Results
test_aiproxy_client_sends_create_stores_succeeds (ahnlich_client_py.tests.ai_client.test_ai_client_store_commands) failed
python/python.xml [took 16s]
Raw output
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
spin_up_ahnlich_ai = 8181
def test_aiproxy_client_sends_create_stores_succeeds(spin_up_ahnlich_ai):
port = spin_up_ahnlich_ai
ai_client = AhnlichAIClient(address="127.0.0.1", port=port, connect_timeout_sec=15)
try:
response: ai_response.AIServerResult = ai_client.create_store(
**ai_store_payload_no_predicates
)
except Exception as e:
print(f"Exception: {e}")
finally:
ai_client.cleanup()
> assert response.results[0] == ai_response.Result__Ok(
ai_response.AIServerResponse__Unit()
)
E UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
ahnlich_client_py/tests/ai_client/test_ai_client_store_commands.py:30: UnboundLocalError
Check warning on line 0 in ahnlich_client_py.tests.ai_client.test_ai_client_store_commands
github-actions / Test Results
test_ai_client_get_pred (ahnlich_client_py.tests.ai_client.test_ai_client_store_commands) failed
python/python.xml [took 6s]
Raw output
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
spin_up_ahnlich_ai = 8660
def test_ai_client_get_pred(spin_up_ahnlich_ai):
port = spin_up_ahnlich_ai
ai_client = AhnlichAIClient(address="127.0.0.1", port=port)
store_inputs = [
(
ai_query.StoreInput__RawString("Jordan One"),
{"brand": ai_query.MetadataValue__RawString("Nike")},
),
(
ai_query.StoreInput__RawString("Yeezey"),
{"brand": ai_query.MetadataValue__RawString("Adidas")},
),
]
builder = ai_client.pipeline()
builder.create_store(**ai_store_payload_with_predicates)
builder.set(
store_name=ai_store_payload_with_predicates["store_name"],
inputs=store_inputs,
preprocess_action=ai_query.PreprocessAction__RawString(
ai_query.StringAction__ErrorIfTokensExceed()
),
)
expected = ai_response.AIServerResult(
results=[
ai_response.Result__Ok(
value=ai_response.AIServerResponse__Get(
value=[
(
ai_query.StoreInput__RawString(value="Jordan One"),
{"brand": ai_query.MetadataValue__RawString(value="Nike")},
)
]
)
)
]
)
try:
builder.exec()
response = ai_client.get_pred(
ai_store_payload_with_predicates["store_name"],
ai_query.PredicateCondition__Value(
value=ai_query.Predicate__Equals(
key="brand", value=ai_query.MetadataValue__RawString("Nike")
)
),
)
except Exception as e:
print(f"Exception: {e}")
finally:
ai_client.cleanup()
> assert str(expected) == str(response)
E UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
ahnlich_client_py/tests/ai_client/test_ai_client_store_commands.py:88: UnboundLocalError
Check warning on line 0 in ahnlich_client_py.tests.ai_client.test_ai_client_store_commands
github-actions / Test Results
test_ai_client_del_key (ahnlich_client_py.tests.ai_client.test_ai_client_store_commands) failed
python/python.xml [took 6s]
Raw output
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
spin_up_ahnlich_ai = 8495
def test_ai_client_del_key(spin_up_ahnlich_ai):
port = spin_up_ahnlich_ai
ai_client = AhnlichAIClient(address="127.0.0.1", port=port)
store_inputs = [
(
ai_query.StoreInput__RawString("Jordan One"),
{"brand": ai_query.MetadataValue__RawString("Nike")},
),
(
ai_query.StoreInput__RawString("Yeezey"),
{"brand": ai_query.MetadataValue__RawString("Adidas")},
),
]
builder = ai_client.pipeline()
builder.create_store(**ai_store_payload_with_predicates)
builder.set(
store_name=ai_store_payload_with_predicates["store_name"],
inputs=store_inputs,
preprocess_action=ai_query.PreprocessAction__RawString(
ai_query.StringAction__ErrorIfTokensExceed()
),
)
expected = ai_response.AIServerResult(
results=[
ai_response.Result__Ok(value=ai_response.AIServerResponse__Del(1)),
]
)
try:
builder.exec()
response = ai_client.del_key(
ai_store_payload_with_predicates["store_name"],
key=ai_query.StoreInput__RawString("Yeezey"),
)
except Exception as e:
print(f"Exception: {e}")
finally:
ai_client.cleanup()
> assert str(expected) == str(response)
E UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
ahnlich_client_py/tests/ai_client/test_ai_client_store_commands.py:212: UnboundLocalError
Check warning on line 0 in ahnlich_client_py.tests.ai_client.test_ai_client_store_commands
github-actions / Test Results
test_ai_client_drop_store_succeeds (ahnlich_client_py.tests.ai_client.test_ai_client_store_commands) failed
python/python.xml [took 6s]
Raw output
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
spin_up_ahnlich_ai = 8813
def test_ai_client_drop_store_succeeds(spin_up_ahnlich_ai):
port = spin_up_ahnlich_ai
ai_client = AhnlichAIClient(address="127.0.0.1", port=port)
expected = ai_response.AIServerResult(
results=[
ai_response.Result__Ok(ai_response.AIServerResponse__Del(1)),
]
)
try:
builder = ai_client.pipeline()
builder.create_store(**ai_store_payload_no_predicates)
builder.create_store(**ai_store_payload_with_predicates)
builder.list_stores()
_ = builder.exec()
response = ai_client.drop_store(
store_name=ai_store_payload_with_predicates["store_name"],
error_if_not_exists=True,
)
except Exception as e:
print(f"Exception: {e}")
finally:
ai_client.cleanup()
> assert str(response) == str(expected)
E UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
ahnlich_client_py/tests/ai_client/test_ai_client_store_commands.py:240: UnboundLocalError
Check warning on line 0 in ahnlich_client_py.tests.ai_client.test_ai_client_store_commands
github-actions / Test Results
test_ai_client_purge_stores_succeeds (ahnlich_client_py.tests.ai_client.test_ai_client_store_commands) failed
python/python.xml [took 6s]
Raw output
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
spin_up_ahnlich_ai = 8768
def test_ai_client_purge_stores_succeeds(spin_up_ahnlich_ai):
port = spin_up_ahnlich_ai
ai_client = AhnlichAIClient(address="127.0.0.1", port=port)
expected = ai_response.AIServerResult(
results=[
ai_response.Result__Ok(ai_response.AIServerResponse__Del(2)),
]
)
try:
builder = ai_client.pipeline()
builder.create_store(**ai_store_payload_no_predicates)
builder.create_store(**ai_store_payload_with_predicates)
builder.list_stores()
_ = builder.exec()
response = ai_client.purge_stores()
except Exception as e:
print(f"Exception: {e}")
finally:
ai_client.cleanup()
> assert str(response) == str(expected)
E UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
ahnlich_client_py/tests/ai_client/test_ai_client_store_commands.py:266: UnboundLocalError
Check notice on line 0 in .github
github-actions / Test Results
138 tests found
There are 138 tests, see "Raw output" for the full list of tests.
Raw output
ahnlich_client_py.tests.ai_client.test_ai_client_store_commands ‑ test_ai_client_create_pred_index
ahnlich_client_py.tests.ai_client.test_ai_client_store_commands ‑ test_ai_client_del_key
ahnlich_client_py.tests.ai_client.test_ai_client_store_commands ‑ test_ai_client_drop_pred_index
ahnlich_client_py.tests.ai_client.test_ai_client_store_commands ‑ test_ai_client_drop_store_succeeds
ahnlich_client_py.tests.ai_client.test_ai_client_store_commands ‑ test_ai_client_get_pred
ahnlich_client_py.tests.ai_client.test_ai_client_store_commands ‑ test_ai_client_purge_stores_succeeds
ahnlich_client_py.tests.ai_client.test_ai_client_store_commands ‑ test_aiproxy_client_sends_create_stores_succeeds
ahnlich_client_py.tests.ai_client.test_client_unit_commands ‑ test_client_sends_info_server_to_aiproxy_success
ahnlich_client_py.tests.ai_client.test_client_unit_commands ‑ test_client_sends_list_stores_to_fresh_aiproxy_succeeds
ahnlich_client_py.tests.ai_client.test_client_unit_commands ‑ test_client_sends_ping_to_aiproxy_success
ahnlich_client_py.tests.ai_client.test_client_unit_commands ‑ test_client_works_using_protocol_in_context
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_create_pred_index_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_delete_key_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_delete_predicate_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_drop_pred_index_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_drop_store_fails_no_store
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_drop_store_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_get_by_predicate_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_get_key_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_get_sim_n_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_list_stores_finds_created_store_with_predicate
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_list_stores_reflects_dropped_store
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_sends_create_stores_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_sends_create_stores_with_predicates_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_sends_list_stores_on_existing_database_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_set_in_store_succeeds
ahnlich_client_py.tests.db_client.test_client_store_commands ‑ test_client_set_in_store_succeeds_with_binary
ahnlich_client_py.tests.db_client.test_client_unit_commands ‑ test_client_sends_info_server_to_db_success
ahnlich_client_py.tests.db_client.test_client_unit_commands ‑ test_client_sends_list_clients_to_db_success
ahnlich_client_py.tests.db_client.test_client_unit_commands ‑ test_client_sends_list_stores_to_fresh_database_succeeds
ahnlich_client_py.tests.db_client.test_client_unit_commands ‑ test_client_sends_ping_to_db_success
ahnlich_client_py.tests.db_client.test_client_unit_commands ‑ test_client_works_using_protocol_in_context
ahnlich_client_py.tests.db_client.test_db_builders ‑ test_client_sends_bulk_unit_requests_to_db_succeeds
ahnlich_client_rs ‑ ai::tests::test_ai_client_actions_on_binary_store
ahnlich_client_rs ‑ ai::tests::test_ai_client_get_pred
ahnlich_client_rs ‑ ai::tests::test_ai_client_ping
ahnlich_client_rs ‑ ai::tests::test_ai_client_simple_pipeline
ahnlich_client_rs ‑ ai::tests::test_create_stores_with_pipeline
ahnlich_client_rs ‑ ai::tests::test_del_key
ahnlich_client_rs ‑ ai::tests::test_destroy_purge_stores_with_pipeline
ahnlich_client_rs ‑ ai::tests::test_pool_commands_fail_if_server_not_exist
ahnlich_client_rs ‑ db::tests::test_create_stores_with_pipeline
ahnlich_client_rs ‑ db::tests::test_del_key
ahnlich_client_rs ‑ db::tests::test_get_sim_n
ahnlich_client_rs ‑ db::tests::test_pool_commands_fail_if_server_not_exist
ahnlich_client_rs ‑ db::tests::test_simple_pipeline
ahnlich_client_rs ‑ db::tests::test_simple_server_ping
ahnlich_similarity ‑ kdtree::tests::test_delete_sequence
ahnlich_similarity ‑ kdtree::tests::test_results_are_accurate
ahnlich_similarity ‑ kdtree::tests::test_serialize_deserialize_roundtrip
ahnlich_similarity ‑ kdtree::tests::test_simple_insert_multithread
ahnlich_similarity ‑ kdtree::tests::test_with_accept_list
ai ‑ manager::tests::test_model_manager_refreshes_evicted_model
ai ‑ manager::tests::test_model_manager_setup_works
ai ‑ tests::aiproxy_test::test_ai_proxy_binary_store_actions
ai ‑ tests::aiproxy_test::test_ai_proxy_binary_store_set_text_and_binary_fails
ai ‑ tests::aiproxy_test::test_ai_proxy_create_drop_pred_index
ai ‑ tests::aiproxy_test::test_ai_proxy_create_store_errors_unsupported_models
ai ‑ tests::aiproxy_test::test_ai_proxy_create_store_success
ai ‑ tests::aiproxy_test::test_ai_proxy_del_key_drop_store
ai ‑ tests::aiproxy_test::test_ai_proxy_destroy_database
ai ‑ tests::aiproxy_test::test_ai_proxy_embedding_size_mismatch_error
ai ‑ tests::aiproxy_test::test_ai_proxy_fails_db_server_unavailable
ai ‑ tests::aiproxy_test::test_ai_proxy_get_pred_succeeds
ai ‑ tests::aiproxy_test::test_ai_proxy_get_sim_n_succeeds
ai ‑ tests::aiproxy_test::test_ai_proxy_test_with_persistence
ai ‑ tests::aiproxy_test::test_ai_store_no_original
ai ‑ tests::aiproxy_test::test_simple_ai_proxy_ping
db ‑ algorithm::heap::tests::test_max_heap_ordering_works
db ‑ algorithm::heap::tests::test_min_heap_ordering_works
db ‑ algorithm::similarity::tests::test_find_top_3_similar_words_using_cosine_similarity
db ‑ algorithm::similarity::tests::test_find_top_3_similar_words_using_dot_product
db ‑ algorithm::similarity::tests::test_find_top_3_similar_words_using_euclidean_distance
db ‑ algorithm::tests::test_teststore_find_top_3_similar_words_using_find_nearest_n
db ‑ engine::predicate::tests::test_add_index_to_predicate_after
db ‑ engine::predicate::tests::test_adding_and_removing_entries_for_predicate
db ‑ engine::predicate::tests::test_matches_works_on_predicate_index
db ‑ engine::predicate::tests::test_predicate_indices_matches
db ‑ engine::store::tests::test_add_index_in_store
db ‑ engine::store::tests::test_compute_store_key_id_empty_vector
db ‑ engine::store::tests::test_compute_store_key_id_multiple_elements_array
db ‑ engine::store::tests::test_compute_store_key_id_single_element_array
db ‑ engine::store::tests::test_create_and_set_in_store_fails
db ‑ engine::store::tests::test_create_and_set_in_store_passes
db ‑ engine::store::tests::test_get_and_create_store_handler
db ‑ engine::store::tests::test_get_key_in_store
db ‑ engine::store::tests::test_get_pred_in_store
db ‑ engine::store::tests::test_get_sim_in_store_with_predicate
db ‑ engine::store::tests::test_get_store_info
db ‑ tests::server_test::test_create_pred_index
db ‑ tests::server_test::test_create_stores
db ‑ tests::server_test::test_del_key
db ‑ tests::server_test::test_del_pred
db ‑ tests::server_test::test_drop_pred_index
db ‑ tests::server_test::test_drop_stores
db ‑ tests::server_test::test_get_key
db ‑ tests::server_test::test_get_pred
db ‑ tests::server_test::test_get_sim_n
db ‑ tests::server_test::test_get_sim_n_non_linear
db ‑ tests::server_test::test_maximum_client_restriction_works
db ‑ tests::server_test::test_remove_non_linear_indices
db ‑ tests::server_test::test_run_server_echos
db ‑ tests::server_test::test_server_client_info
db ‑ tests::server_test::test_server_with_persistence
db ‑ tests::server_test::test_set_in_store
db ‑ tests::server_test::test_simple_stores_list
dsl ‑ tests::ai::test_create_non_linear_algorithm_parse
dsl ‑ tests::ai::test_create_predicate_index_parse
dsl ‑ tests::ai::test_create_store_parse
dsl ‑ tests::ai::test_del_key_parse
dsl ‑ tests::ai::test_drop_non_linear_algorithm_parse
dsl ‑ tests::ai::test_drop_pred_index_parse
dsl ‑ tests::ai::test_drop_store_parse
dsl ‑ tests::ai::test_get_pred_parse
dsl ‑ tests::ai::test_get_sim_n_parse
dsl ‑ tests::ai::test_multi_query_parse
dsl ‑ tests::ai::test_no_valid_input_in_query
dsl ‑ tests::ai::test_set_in_store_parse
dsl ‑ tests::ai::test_single_query_parse
dsl ‑ tests::db::test_create_non_linear_algorithm_parse
dsl ‑ tests::db::test_create_predicate_index_parse
dsl ‑ tests::db::test_create_store_parse
dsl ‑ tests::db::test_del_key_parse
dsl ‑ tests::db::test_drop_non_linear_algorithm_parse
dsl ‑ tests::db::test_drop_pred_index_parse
dsl ‑ tests::db::test_drop_store_parse
dsl ‑ tests::db::test_get_key_parse
dsl ‑ tests::db::test_get_pred_parse
dsl ‑ tests::db::test_get_sim_n_parse
dsl ‑ tests::db::test_multi_query_parse
dsl ‑ tests::db::test_no_valid_input_in_query
dsl ‑ tests::db::test_set_in_store_parse
dsl ‑ tests::db::test_single_query_parse
tracer ‑ tests::test_trace_parent_parsing
typegen::bin/typegen ‑ tracers::query::ai::tests::test_spec_documents_matches_current_db_query_enum
typegen::bin/typegen ‑ tracers::query::db::tests::test_spec_documents_matches_current_db_query_enum
typegen::bin/typegen ‑ tracers::server_response::ai::tests::test_spec_documents_matches_current_ai_server_response_enum
typegen::bin/typegen ‑ tracers::server_response::db::tests::test_spec_documents_matches_current_db_server_response_enum