Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5078 - Upgrade dependencies #5222

Merged
merged 4 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions inception/inception-app-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@
<artifactId>mock-oauth2-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spring:
max-age: 31536000

datasource:
url: ${database.url:${INCEPTION_DB_URL:jdbc:hsqldb:file:${inception.home:${user.home}/.inception}/db/inception;hsqldb.default_table_type=cached}}
url: ${database.url:${INCEPTION_DB_URL:jdbc:hsqldb:file:${inception.home:${user.home}/.inception}/db/inception;hsqldb.default_table_type=cached;hsqldb.tx=mvcc}}
username: ${database.username:${INCEPTION_DB_USERNAME:sa}}
password: ${database.password:${INCEPTION_DB_PASSWORD:}}
driver-class-name: ${database.driver:${INCEPTION_DB_DRIVER:}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void setup()
var issuerUrl = oauth2Server.url(ISSUER_ID).toString();

setProperty("java.awt.headless", "true");
setProperty("database.url", "jdbc:hsqldb:mem:testdb");
setProperty("database.url", "jdbc:hsqldb:mem:testdb;hsqldb.tx=mvcc");
setProperty("inception.home", appHome.toString());
setProperty("remote-api.enabled", "true");
setProperty("remote-api.oauth2.enabled", "true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.containers.MSSQLServerContainer;
import org.testcontainers.junit.jupiter.Testcontainers;
import org.testcontainers.utility.DockerImageName;

@Testcontainers(disabledWithoutDocker = true)
class InceptionMSSQLServerIntegrationTest
{
static final DockerImageName image = DockerImageName.parse("mcr.microsoft.com/mssql/server")
.withTag("2022-latest");
// .withTag("@sha256:45a1a9d13ca5574cf8e0fe4ae73ab77248b66d9c3132ac9658fb6c16dd72a8af");
@SuppressWarnings("resource")
static final MSSQLServerContainer<?> dbContainer = new MSSQLServerContainer<>(
"mcr.microsoft.com/mssql/server:2022-latest") //
.acceptLicense();
static final MSSQLServerContainer<?> dbContainer = new MSSQLServerContainer<>(image) //
.acceptLicense();

static @TempDir Path tempDir;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
import org.apache.lucene.codecs.KnnVectorsFormat;
import org.apache.lucene.codecs.KnnVectorsReader;
import org.apache.lucene.codecs.KnnVectorsWriter;
import org.apache.lucene.codecs.lucene99.Lucene99Codec;
import org.apache.lucene.codecs.lucene912.Lucene912Codec;
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsFormat;
import org.apache.lucene.index.SegmentReadState;
import org.apache.lucene.index.SegmentWriteState;

public class HighDimensionLucene99Codec
extends Lucene99Codec
public class HighDimensionLucene912Codec
extends Lucene912Codec
{
private final KnnVectorsFormat defaultKnnVectorsFormat;

public HighDimensionLucene99Codec(int aDimension)
public HighDimensionLucene912Codec(int aDimension)
{
var knnFormat = new Lucene99HnswVectorsFormat();
defaultKnnVectorsFormat = new HighDimensionKnnVectorsFormat(knnFormat, aDimension);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public PooledIndex create(Long aKey) throws Exception
{
var dir = new MMapDirectory(getIndexDirectory(aKey));
var iwc = new IndexWriterConfig();
iwc.setCodec(new HighDimensionLucene99Codec(embeddingService.getDimension()));
iwc.setCodec(new HighDimensionLucene912Codec(embeddingService.getDimension()));
return new PooledIndex(aKey, dir, new IndexWriter(dir, iwc));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

import de.tudarmstadt.ukp.inception.assistant.config.AssistantProperties;
import de.tudarmstadt.ukp.inception.assistant.embedding.EmbeddingService;
import de.tudarmstadt.ukp.inception.assistant.index.HighDimensionLucene99Codec;
import de.tudarmstadt.ukp.inception.assistant.index.HighDimensionLucene912Codec;
import de.tudarmstadt.ukp.inception.scheduling.SchedulingService;
import de.tudarmstadt.ukp.inception.support.SettingsUtil;
import de.tudarmstadt.ukp.inception.support.json.JSONUtil;
Expand Down Expand Up @@ -198,7 +198,7 @@ else if (LOG.isTraceEnabled()) {
IndexWriter getIndexWriter() throws IOException
{
var iwc = new IndexWriterConfig();
iwc.setCodec(new HighDimensionLucene99Codec(embeddingService.getDimension()));
iwc.setCodec(new HighDimensionLucene912Codec(embeddingService.getDimension()));
return new IndexWriter(getSharedIndexDirectory(), iwc);
}

Expand Down
Loading
Loading