From 1f1fb2035e178fb5b5e6cc2ae1fb4be0413fe2d9 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Tue, 30 Sep 2025 22:58:06 +0200 Subject: [PATCH 1/4] The base commit --- infera/Cargo.toml | 2 +- infera/bindings/infera_extension.cpp | 2 +- vcpkg.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infera/Cargo.toml b/infera/Cargo.toml index a43f0a1..7153c67 100644 --- a/infera/Cargo.toml +++ b/infera/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "infera" -version = "0.1.0" +version = "0.2.0" edition = "2021" publish = false diff --git a/infera/bindings/infera_extension.cpp b/infera/bindings/infera_extension.cpp index adceb12..0785adb 100644 --- a/infera/bindings/infera_extension.cpp +++ b/infera/bindings/infera_extension.cpp @@ -403,7 +403,7 @@ static void LoadInternal(ExtensionLoader &loader) { void InferaExtension::Load(ExtensionLoader &loader) { LoadInternal(loader); } std::string InferaExtension::Name() { return "infera"; } -std::string InferaExtension::Version() const { return "v0.1.0"; } +std::string InferaExtension::Version() const { return "v0.2.0"; } } // namespace duckdb diff --git a/vcpkg.json b/vcpkg.json index de0dcb9..26c42b1 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "infera", - "version": "0.1.0", + "version": "0.2.0", "description": "Infera DuckDB Extension", "dependencies": [ { From 851a3263bd81e05251e850886a236827f3854df7 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Tue, 30 Sep 2025 23:24:32 +0200 Subject: [PATCH 2/4] WIP --- CONTRIBUTING.md | 14 +++++++------- README.md | 23 +++++++++++++++-------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a26193d..8fa73e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,21 +1,21 @@ ## Contribution Guidelines -Thank you for considering contributing to the project! +Thank you for considering contributing to this project! Contributions are always welcome and appreciated. ### How to Contribute -Please check the [issue tracker](https://github.com/habedi/template-go-project/issues) to see if there is an issue you +Please check the [issue tracker](https://github.com/CogitatorTech/infera/issues) to see if there is an issue you would like to work on or if it has already been resolved. #### Reporting Bugs -1. Open an issue on the [issue tracker](https://github.com/habedi/template-go-project/issues). +1. Open an issue on the [issue tracker](https://github.com/CogitatorTech/infera/issues). 2. Include information such as steps to reproduce, expected/actual behavior, and relevant logs or screenshots. #### Suggesting Features -1. Open an issue on the [issue tracker](https://github.com/habedi/template-go-project/issues). +1. Open an issue on the [issue tracker](https://github.com/CogitatorTech/infera/issues). 2. Provide details about the feature, its purpose, and potential implementation ideas. ### Submitting Pull Requests @@ -31,15 +31,15 @@ would like to work on or if it has already been resolved. #### Code Style -- Use the `make format` command to format the code. +- Use the `make rust-format` command to format the code. #### Running Tests -- Use the `make test` command to run the tests. +- Use the `make rust-test` and `make test` commands to run the tests. #### Running Linters -- Use the `make lint` command to run the linters. +- Use the `make rust-lint` command to run the linters. #### See Available Commands diff --git a/README.md b/README.md index 88735c6..abc0c4f 100644 --- a/README.md +++ b/README.md @@ -73,26 +73,33 @@ make release 3. Run the following SQL commands in the shell to try Infera out: ```sql --- 1. Load the extension (optional when building from source) -load 'build/release/extension/infera/infera.duckdb_extension' -load infera; - --- 2. Load a simple linear model from a remote URL +-- 1. Load a simple linear model from a remote URL select infera_load_model('linear_model', 'https://github.com/CogitatorTech/infera/raw/refs/heads/main/test/models/linear.onnx'); --- 3. Run a prediction using a very simple linear model +-- 2. Run a prediction using a very simple linear model -- Model: y = 2*x1 - 1*x2 + 0.5*x3 + 0.25 select infera_predict('linear_model', 1.0, 2.0, 3.0); -- Expected output: 1.75 --- 4. Unload the model when we're done with it +-- 3. Unload the model when we're done with it select infera_unload_model('linear_model'); --- 5. Check the Infera version +-- 4. Check the Infera version select infera_get_version(); ```` +> [!NOTE] +> After building from source, the Infera binary will be `build/release/extension/infera/infera.duckdb_extension`. +> You can load it using the `load 'build/release/extension/infera/infera.duckdb_extension'` command in DuckDB shell. +> Note that the extension binary will only work with the DuckDB version that it was built against. +> At the moment, Infera is not available as +> a [DuckDB community extension](https://duckdb.org/community_extensions/list_of_extensions). +> Nevertheless, you can still use Infera by building it from source or downloading a pre-built binary from +> the [releases page](https://github.com/CogitatorTech/infera/releases). +> Please check the [this page](https://duckdb.org/docs/stable/extensions/installing_extensions.html) for more details on +> how to use extensions in DuckDB. + --- ### Documentation From 0361e51fc0a141cd114c8fc78833af34979dbeb5 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Tue, 30 Sep 2025 23:30:11 +0200 Subject: [PATCH 3/4] WIP --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index abc0c4f..b0f0a5d 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,11 @@ make release 3. Run the following SQL commands in the shell to try Infera out: ```sql +-- Normally, we need to load the extension first, +-- but the `duckdb` binary that we built in the previous step +-- already has Infera statically linked to it. +-- So, we don't need to load the extension explicitly. + -- 1. Load a simple linear model from a remote URL select infera_load_model('linear_model', 'https://github.com/CogitatorTech/infera/raw/refs/heads/main/test/models/linear.onnx'); @@ -91,12 +96,12 @@ select infera_get_version(); > [!NOTE] > After building from source, the Infera binary will be `build/release/extension/infera/infera.duckdb_extension`. -> You can load it using the `load 'build/release/extension/infera/infera.duckdb_extension'` command in DuckDB shell. +> You can load it using the `load 'build/release/extension/infera/infera.duckdb_extension';` in DuckDB shell. > Note that the extension binary will only work with the DuckDB version that it was built against. > At the moment, Infera is not available as > a [DuckDB community extension](https://duckdb.org/community_extensions/list_of_extensions). -> Nevertheless, you can still use Infera by building it from source or downloading a pre-built binary from -> the [releases page](https://github.com/CogitatorTech/infera/releases). +> Nevertheless, you can still use Infera by building it from source yourself, or downloading pre-built binaries from +> the [releases page](https://github.com/CogitatorTech/infera/releases) for your platform. > Please check the [this page](https://duckdb.org/docs/stable/extensions/installing_extensions.html) for more details on > how to use extensions in DuckDB. From c516f24ac2ddf84ef210b6679bc56587e6ae0270 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Tue, 30 Sep 2025 23:36:37 +0200 Subject: [PATCH 4/4] WIP --- infera/Cargo.toml | 2 +- infera/bindings/infera_extension.cpp | 2 +- vcpkg.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infera/Cargo.toml b/infera/Cargo.toml index 7153c67..a43f0a1 100644 --- a/infera/Cargo.toml +++ b/infera/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "infera" -version = "0.2.0" +version = "0.1.0" edition = "2021" publish = false diff --git a/infera/bindings/infera_extension.cpp b/infera/bindings/infera_extension.cpp index 0785adb..adceb12 100644 --- a/infera/bindings/infera_extension.cpp +++ b/infera/bindings/infera_extension.cpp @@ -403,7 +403,7 @@ static void LoadInternal(ExtensionLoader &loader) { void InferaExtension::Load(ExtensionLoader &loader) { LoadInternal(loader); } std::string InferaExtension::Name() { return "infera"; } -std::string InferaExtension::Version() const { return "v0.2.0"; } +std::string InferaExtension::Version() const { return "v0.1.0"; } } // namespace duckdb diff --git a/vcpkg.json b/vcpkg.json index 26c42b1..de0dcb9 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "infera", - "version": "0.2.0", + "version": "0.1.0", "description": "Infera DuckDB Extension", "dependencies": [ {