diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 9075fc37..fa4ae58d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -10,7 +10,6 @@ endif() # public add_subdirectory(astl) add_subdirectory(xxhash-cpp) -add_subdirectory(schema) if(AC_BUILD_TESTS OR AC_BUILD_EXAMPLES OR AC_BUILD_POC) add_subdirectory(ac-repo-root) diff --git a/inference/dummy/local/code/ac/local/DummyModelSchema.hpp b/inference/dummy/local/code/ac/local/DummyModelSchema.hpp index a817da6d..e44bcaef 100644 --- a/inference/dummy/local/code/ac/local/DummyModelSchema.hpp +++ b/inference/dummy/local/code/ac/local/DummyModelSchema.hpp @@ -1,7 +1,7 @@ // Copyright (c) Alpaca Core // SPDX-License-Identifier: MIT // -#include +#include namespace ac::local::schema { diff --git a/inference/dummy/local/tools/generate-schema.cpp b/inference/dummy/local/tools/generate-schema.cpp index 9faf6697..bcfe6942 100644 --- a/inference/dummy/local/tools/generate-schema.cpp +++ b/inference/dummy/local/tools/generate-schema.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MIT // #include -#include +#include int main(int argc, char** argv) { using namespace ac::local::schema; diff --git a/inference/llama.cpp/local/code/ac/local/LlamaModelSchema.hpp b/inference/llama.cpp/local/code/ac/local/LlamaModelSchema.hpp index a474bc09..0bec0dec 100644 --- a/inference/llama.cpp/local/code/ac/local/LlamaModelSchema.hpp +++ b/inference/llama.cpp/local/code/ac/local/LlamaModelSchema.hpp @@ -1,7 +1,7 @@ // Copyright (c) Alpaca Core // SPDX-License-Identifier: MIT // -#include +#include namespace ac::local::schema { diff --git a/inference/llama.cpp/local/tools/generate-schema.cpp b/inference/llama.cpp/local/tools/generate-schema.cpp index b9dd1fb3..4774acdd 100644 --- a/inference/llama.cpp/local/tools/generate-schema.cpp +++ b/inference/llama.cpp/local/tools/generate-schema.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MIT // #include -#include +#include int main(int argc, char** argv) { using namespace ac::local::schema; diff --git a/inference/whisper/local/code/ac/local/WhisperModelSchema.hpp b/inference/whisper/local/code/ac/local/WhisperModelSchema.hpp index b8945a21..14a1d89d 100644 --- a/inference/whisper/local/code/ac/local/WhisperModelSchema.hpp +++ b/inference/whisper/local/code/ac/local/WhisperModelSchema.hpp @@ -1,7 +1,7 @@ // Copyright (c) Alpaca Core // SPDX-License-Identifier: MIT // -#include +#include namespace ac::local::schema { diff --git a/inference/whisper/local/tools/generate-schema.cpp b/inference/whisper/local/tools/generate-schema.cpp index 1ade1263..9d2e1fe2 100644 --- a/inference/whisper/local/tools/generate-schema.cpp +++ b/inference/whisper/local/tools/generate-schema.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MIT // #include -#include +#include int main(int argc, char** argv) { using namespace ac::local::schema; diff --git a/local/CMakeLists.txt b/local/CMakeLists.txt index 1cd8438d..72c2df56 100644 --- a/local/CMakeLists.txt +++ b/local/CMakeLists.txt @@ -3,3 +3,4 @@ # add_subdirectory(code) ac_add_test_subdir() +add_subdirectory(schema) diff --git a/common/schema/CMakeLists.txt b/local/schema/CMakeLists.txt similarity index 85% rename from common/schema/CMakeLists.txt rename to local/schema/CMakeLists.txt index a1ce532d..280c1efc 100644 --- a/common/schema/CMakeLists.txt +++ b/local/schema/CMakeLists.txt @@ -1,13 +1,12 @@ # Copyright (c) Alpaca Core # SPDX-License-Identifier: MIT # -ac_dep(nl-json) ac_dep(magic_enum) add_library(ac-schema INTERFACE) add_library(ac::schema ALIAS ac-schema) target_link_libraries(ac-schema INTERFACE - nlohmann_json::nlohmann_json + ac::dict magic_enum::magic_enum ) target_include_directories(ac-schema INTERFACE code) diff --git a/local/code/ac/local/ModelSchema.hpp b/local/schema/code/ac/schema/ModelSchema.hpp similarity index 99% rename from local/code/ac/local/ModelSchema.hpp rename to local/schema/code/ac/schema/ModelSchema.hpp index 6394d58d..77c6a968 100644 --- a/local/code/ac/local/ModelSchema.hpp +++ b/local/schema/code/ac/schema/ModelSchema.hpp @@ -3,7 +3,7 @@ // #pragma once #include -#include +#include "SchemaItem.hpp" #include // here we use tuples to define instances within a model and operations within an instance diff --git a/local/code/ac/local/ModelSchemaGenHelper.hpp b/local/schema/code/ac/schema/ModelSchemaGenHelper.hpp similarity index 100% rename from local/code/ac/local/ModelSchemaGenHelper.hpp rename to local/schema/code/ac/schema/ModelSchemaGenHelper.hpp diff --git a/common/schema/code/ac/schema/SchemaEnum.hpp b/local/schema/code/ac/schema/SchemaEnum.hpp similarity index 100% rename from common/schema/code/ac/schema/SchemaEnum.hpp rename to local/schema/code/ac/schema/SchemaEnum.hpp diff --git a/common/schema/code/ac/schema/SchemaItem.hpp b/local/schema/code/ac/schema/SchemaItem.hpp similarity index 100% rename from common/schema/code/ac/schema/SchemaItem.hpp rename to local/schema/code/ac/schema/SchemaItem.hpp diff --git a/common/schema/test/CMakeLists.txt b/local/schema/test/CMakeLists.txt similarity index 89% rename from common/schema/test/CMakeLists.txt rename to local/schema/test/CMakeLists.txt index e59a9fb1..e19f0177 100644 --- a/common/schema/test/CMakeLists.txt +++ b/local/schema/test/CMakeLists.txt @@ -7,3 +7,4 @@ endmacro() schema_test(SchemaItem) schema_test(SchemaEnum) +schema_test(ModelSchema) diff --git a/local/test/t-ModelSchema.cpp b/local/schema/test/t-ModelSchema.cpp similarity index 99% rename from local/test/t-ModelSchema.cpp rename to local/schema/test/t-ModelSchema.cpp index 8ec3835b..3ebb9961 100644 --- a/local/test/t-ModelSchema.cpp +++ b/local/schema/test/t-ModelSchema.cpp @@ -1,7 +1,7 @@ // Copyright (c) Alpaca Core // SPDX-License-Identifier: MIT // -#include +#include #include using namespace ac::local::schema; diff --git a/common/schema/test/t-SchemaEnum.cpp b/local/schema/test/t-SchemaEnum.cpp similarity index 100% rename from common/schema/test/t-SchemaEnum.cpp rename to local/schema/test/t-SchemaEnum.cpp diff --git a/common/schema/test/t-SchemaItem.cpp b/local/schema/test/t-SchemaItem.cpp similarity index 100% rename from common/schema/test/t-SchemaItem.cpp rename to local/schema/test/t-SchemaItem.cpp diff --git a/local/test/CMakeLists.txt b/local/test/CMakeLists.txt index 21368832..a9b8c362 100644 --- a/local/test/CMakeLists.txt +++ b/local/test/CMakeLists.txt @@ -7,4 +7,3 @@ endmacro() add_local_test(ProgressCb) add_local_test(ModelFactory) -add_local_test(ModelSchema)