With this change I am able to run the planner on the linux kernel repository. Previously the planner would error out with exceptions related to "too many file handles" on linux or "file table overflow" on macos
db.db.serialize(...) guarantees that each statement runs in order. However, the function itself will terminate execution long before all the statements are executed. Therefore, we should only resolve the promise when the last COMMIT transaction has run. In the other cases, there will have been an error and we'll have call reject(err).
This also removed the need for the extra insert that was recently added so it was removed (in fact the extra insert was causing conflict errors).
* add stop token param for watsonx provider
* add stop token to config_schema
* add stop token param for watsonx provider
* add stop token to config_schema
* update model id for granite code, remove system message
* update code instruct model id in config schemas
* add stop token param for watsonx provider
* add stop token to config_schema
* update model id for granite code, remove system message
* update code instruct model id in config schemas
* use lowercase x
* remove rpg test file
The intention of the PRAGMA was to revert the databse back from WAL, however, this pragma is creating problems when multiple instances of continue are open
Co-authored-by: Rob Leidle <rleidle@tesla.com>
The prior approach, of batching on lists of files as returned by
walkDir(...) broke the assumptions made by
getComputeDeleteAddRemove(...). Instead, call
getComputeDeleteAddRemove() and then batch on its results. This
approach uses a bit more memory but is roughly just as fast.
In addition, made markComplete(...)'s signature return Promise<void> as
it is an async function. Awaiting this async function has made
everything "slow" again because we do not do bulk inserts for
markComplete database rows. However, that can be fixed in a subsequent
commit.
Also disabled WAL mode for SQLite as we do not completely control the
program lifecycle so was noticing a lot of times where indexing resutls
were not checkpointed to disk.
Co-authored-by: Rob Leidle <rleidle@tesla.com>
Without this change, the following error occurs on MacOS (but not linux):
../core/indexing/chunk/ChunkCodebaseIndex.ts:175:5 - error TS2322: Type 'unknown[]' is not assignable to type 'Chunk[]'.
Type '{}' is missing the following properties from type 'Chunk': digest, filepath, index, content, and 2 more.
175 return chunkLists.flat();
~~~~~~~~~~~~~~~~~~~~~~~~~
Co-authored-by: Rob Leidle <rleidle@tesla.com>
This will improve the performance of indexing when using a GPT model.
Also, improved the Async interface to also have an async decode method.
Note: I was only able to test this method with the test I added as I do
not have access to a GPT model.
Co-authored-by: Rob Leidle <rleidle@tesla.com>
This greatly improves the performance of indexing. Combined with the
change for bulk inserts in ChunkCodebaseIndexer, indexing is over twice
as fast. However, it can be much faster if the other indexers are
converted to use bulk insert as well.
In addition, this indexer is not using the computed chunks in the chunk
table. It would be faster to reference the already computed chunks,
however, for the purposes of this PR we are not changing that behavior.
Co-authored-by: Rob Leidle <rleidle@tesla.com>