Skip to content

Conversation

@tzolov
Copy link
Contributor

@tzolov tzolov commented Apr 28, 2024

Attempt to replace the #305

@tzolov
Copy link
Contributor Author

tzolov commented Apr 28, 2024

Hi @making , because it was too much effort to rebase #305, I've tried to reproduce it with the latest code.
Unfortunately, after updating the container to ghcr.io/postgresml/postgresml:2.8.2 it seems that all ITs are failing.
Would you be interested to have a look?

@markpollack
Copy link
Member

The tests pass when running individually, but fail as a group. e.g. for embed()

2024-10-23T18:45:59.256-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : Executing SQL statement [DROP EXTENSION IF EXISTS pgml]
2024-10-23T18:45:59.867-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : Executing SQL statement [DROP EXTENSION IF EXISTS hstore]
2024-10-23T18:45:59.873-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : SQLWarning ignored: SQL state '00000', error code '0', message [extension "hstore" does not exist, skipping]
2024-10-23T18:46:00.495-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : Executing SQL statement [DROP EXTENSION IF EXISTS vector]
2024-10-23T18:46:00.500-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : SQLWarning ignored: SQL state '00000', error code '0', message [extension "vector" does not exist, skipping]
2024-10-23T18:46:06.179-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : Executing SQL statement [CREATE EXTENSION IF NOT EXISTS pgml]
2024-10-23T18:46:06.234-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : SQLWarning ignored: SQL state '00000', error code '0', message [Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]]
2024-10-23T18:46:06.235-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : SQLWarning ignored: SQL state '00000', error code '0', message [Scikit-learn 1.3.2, XGBoost 2.0.2, LightGBM 4.1.0, NumPy 1.26.2]
2024-10-23T18:46:06.892-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : Executing SQL statement [CREATE EXTENSION IF NOT EXISTS hstore]
2024-10-23T18:46:10.530-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : Executing prepared SQL query
2024-10-23T18:46:10.532-04:00 DEBUG 627946 --- [           main] o.s.jdbc.core.JdbcTemplate               : Executing prepared SQL statement [SELECT pgml.embed(?, ?, ?::JSONB) AS embedding]
2024-10-23T18:46:10.533-04:00 TRACE 627946 --- [           main] o.s.jdbc.core.StatementCreatorUtils      : Setting SQL statement parameter value: column index 1, parameter value [distilbert-base-uncased], value class [java.lang.String], SQL type unknown
2024-10-23T18:46:10.534-04:00 TRACE 627946 --- [           main] o.s.jdbc.core.StatementCreatorUtils      : Setting SQL statement parameter value: column index 2, parameter value [Hello World!], value class [java.lang.String], SQL type unknown
2024-10-23T18:46:10.536-04:00 TRACE 627946 --- [           main] o.s.jdbc.core.StatementCreatorUtils      : Setting SQL statement parameter value: column index 3, parameter value [{}], value class [java.util.ImmutableCollections$MapN], SQL type unknown

org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT pgml.embed(?, ?, ?::JSONB) AS embedding]; SQL state [XX000]; error code [0]; ERROR: cache lookup failed for type 17818

	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:723)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:754)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:767)
	at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:896)
	at org.springframework.ai.postgresml.PostgresMlEmbeddingClient.embed(PostgresMlEmbeddingClient.java:164)
	at org.springframework.ai.postgresml.PostgresMlEmbeddingClientIT.embed(PostgresMlEmbeddingClientIT.java:87)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: org.postgresql.util.PSQLException: ERROR: cache lookup failed for type 17818
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:134)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
	at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:732)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
	... 9 more

Not sure what is going on.

@markpollack markpollack added this to the 1.0.0-M4 milestone Oct 23, 2024
@making
Copy link
Member

making commented Oct 28, 2024

#1610 will fix the test issue.

@markpollack
Copy link
Member

This has been resolved in this commit c02d136

closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants