├── go-sdk ├── VERSION ├── pkg │ ├── onfs │ │ └── init.go │ └── proto │ │ └── onfs │ │ ├── persist.proto │ │ └── retrieve.proto └── go.mod ├── numerix ├── VERSION ├── .gitignore ├── src │ ├── pkg │ │ ├── etcd │ │ │ └── mod.rs │ │ ├── config │ │ │ └── mod.rs │ │ ├── logger │ │ │ └── mod.rs │ │ ├── metrics │ │ │ └── mod.rs │ │ ├── middleware │ │ │ └── mod.rs │ │ ├── rust_matrix_frame │ │ │ ├── mod.rs │ │ │ ├── tests │ │ │ │ └── mod.rs │ │ │ ├── Cargo.toml │ │ │ └── vector.rs │ │ └── mod.rs │ ├── handler │ │ └── mod.rs │ ├── main.rs │ └── protos │ │ └── proto │ │ └── numerix.proto ├── build.rs ├── env.example ├── Dockerfile └── Cargo.toml ├── docs-src ├── static │ ├── .nojekyll │ └── img │ │ ├── logo.jpg │ │ ├── favicon.ico │ │ ├── v1.0.0-onfs-arch.png │ │ ├── v1.0.0-psdb-anatomy.png │ │ ├── v1.0.0-csdb-skip-read.png │ │ ├── v1.0.0-trufflebox-login.png │ │ ├── v1.0.0-psdb-bool-encoding.png │ │ ├── v1.0.0-psdb-string-encoding.png │ │ ├── v1.0.0-trufflebox-edit-fg.png │ │ ├── v1.0.0-trufflebox-approve-fg.png │ │ ├── v1.0.0-trufflebox-approve-job.png │ │ ├── v1.0.0-trufflebox-edit-entity.png │ │ ├── v1.0.0-trufflebox-navigation.png │ │ ├── v1.0.0-trufflebox-register-fg.png │ │ ├── v1.0.0-trufflebox-add-features.png │ │ ├── v1.0.0-trufflebox-approve-entity.png │ │ ├── v1.0.0-trufflebox-approve-store.png │ │ ├── v1.0.0-trufflebox-edit-features.png │ │ ├── v1.0.0-trufflebox-job-discovery.png │ │ ├── v1.0.0-trufflebox-register-job.png │ │ ├── v1.0.0-trufflebox-register-store.png │ │ ├── v1.0.0-trufflebox-registration.png │ │ ├── v1.0.0-trufflebox-reject-popup.png │ │ ├── v1.0.0-psdb-fixed-length-encodding.png │ │ ├── v1.0.0-trufflebox-approve-edit-fg.png │ │ ├── v1.0.0-trufflebox-register-entity.png │ │ ├── v1.0.0-trufflebox-store-discovery.png │ │ ├── v1.0.0-trufflebox-user-management.png │ │ ├── v1.0.0-trufflebox-approve-edit-entity.png │ │ ├── v1.0.0-trufflebox-feature-discovery.png │ │ ├── v1.0.0-trufflebox-register-fg-details.png │ │ ├── v1.0.0-trufflebox-add-features-details.png │ │ ├── v1.0.0-trufflebox-approve-add-features.png │ │ ├── v1.0.0-trufflebox-approve-edit-features.png │ │ ├── v1.0.0-trufflebox-register-job-details.png │ │ ├── v1.0.0-trufflebox-register-entity-details.png │ │ ├── v1.0.0-trufflebox-register-store-details.png │ │ ├── v1.0.0-trufflebox-feature-discovery-fg-details.png │ │ ├── v1.0.0-trufflebox-feature-discovery-entity-details.png │ │ └── v1.0.0-trufflebox-feature-discovery-feature-details.png ├── blog │ ├── bharatmlstack-history │ │ └── post-one │ │ │ ├── logo.jpg │ │ │ ├── schema.png │ │ │ ├── bharatmlstack.png │ │ │ ├── first-gen-arch.png │ │ │ ├── old-batch-arch.png │ │ │ ├── interaction-store-v0.png │ │ │ └── online-feature-store-v0.png │ └── authors.yml ├── src │ └── pages │ │ └── markdown-page.md ├── docs │ ├── numerix │ │ ├── v1.0.0 │ │ │ └── _category_.json │ │ └── _category_.json │ ├── online-feature-store │ │ ├── v1.0.0 │ │ │ └── _category_.json │ │ └── _category_.json │ ├── sdks │ │ ├── _category_.json │ │ ├── go │ │ │ └── _category_.json │ │ └── python │ │ │ ├── _category_.json │ │ │ └── v1.0.0 │ │ │ └── _category_.json │ ├── trufflebox-ui │ │ └── _category_.json │ └── quick-start │ │ └── _category_.json ├── .gitignore ├── README.md ├── sidebars.js └── package.json ├── helix-client ├── VERSION ├── pkg │ ├── clients │ │ ├── numerix │ │ │ ├── numerix.go │ │ │ ├── init.go │ │ │ ├── models.go │ │ │ └── client │ │ │ │ └── proto │ │ │ │ └── numerix.proto │ │ ├── predator │ │ │ ├── client.go │ │ │ ├── config.go │ │ │ └── init.go │ │ └── skye │ │ │ ├── init.go │ │ │ ├── models.go │ │ │ └── skye.go │ ├── utils │ │ ├── empty_utils.go │ │ ├── slice_utils_test.go │ │ ├── slice_utils.go │ │ └── empty_utils_test.go │ ├── system │ │ └── global.go │ ├── middleware │ │ ├── grpcrecovery.go │ │ └── httprecovery.go │ ├── api │ │ ├── http │ │ │ ├── helper.go │ │ │ └── header.go │ │ └── http_grpc_error_mapper.go │ └── httpframework │ │ └── httpframework.go └── README.md ├── horizon ├── VERSION ├── internal │ ├── numerix │ │ ├── config │ │ │ ├── config.go │ │ │ └── models.go │ │ ├── handler │ │ │ ├── init.go │ │ │ └── config.go │ │ ├── util │ │ │ └── expression_parser.go │ │ └── proto │ │ │ └── numerix.proto │ ├── auth │ │ ├── handler │ │ │ ├── init.go │ │ │ ├── handler.go │ │ │ └── models.go │ │ └── router │ │ │ └── router.go │ ├── repositories │ │ ├── scylla │ │ │ └── scylla.go │ │ └── sql │ │ │ ├── token │ │ │ └── table.go │ │ │ ├── apiresolver │ │ │ ├── table.go │ │ │ └── sql.go │ │ │ ├── numerix │ │ │ ├── unaryops │ │ │ │ ├── table.go │ │ │ │ └── repository.go │ │ │ └── binaryops │ │ │ │ ├── table.go │ │ │ │ └── repository.go │ │ │ ├── rolepermission │ │ │ └── table.go │ │ │ ├── store │ │ │ └── table.go │ │ │ ├── auth │ │ │ └── table.go │ │ │ ├── job │ │ │ └── table.go │ │ │ ├── entity │ │ │ └── table.go │ │ │ ├── features │ │ │ └── table.go │ │ │ └── featuregroup │ │ │ └── table.go │ ├── online-feature-store │ │ ├── config │ │ │ ├── enums │ │ │ │ └── cache_type.go │ │ │ └── init.go │ │ └── handler │ │ │ └── init.go │ └── middlewares │ │ └── resolver │ │ ├── config.go │ │ └── resolver_registry.go ├── pkg │ ├── infra │ │ ├── init.go │ │ └── connection.go │ ├── config │ │ └── env.go │ ├── grpc │ │ └── grpc.go │ ├── middleware │ │ ├── httprecovery.go │ │ └── httplogger.go │ ├── httpframework │ │ └── httpframework.go │ ├── etcd │ │ ├── etcd.go │ │ └── init.go │ └── api │ │ └── http │ │ ├── helper.go │ │ └── header.go ├── cmd │ └── horizon │ │ ├── Dockerfile │ │ └── main.go └── env.example ├── trufflebox-ui ├── VERSION ├── src │ ├── pages │ │ ├── EmbeddingPlatform │ │ │ └── components │ │ │ │ └── StoreManagement │ │ │ │ └── index.jsx │ │ ├── Auth │ │ │ └── Layout.jsx │ │ ├── Layout │ │ │ └── Layout.jsx │ │ └── OnlineFeatureStore │ │ │ └── components │ │ │ └── FeatureApproval │ │ │ └── styles.scss │ ├── Health.jsx │ ├── style.css │ ├── index.css │ ├── index.js │ ├── constants │ │ ├── databaseTypes.js │ │ └── dataTypes.js │ └── hooks │ │ └── useFormatDate.jsx ├── public │ └── env.js ├── nginx.conf ├── entrypoint.sh ├── docker-compose.yml ├── DockerFile └── env.example ├── online-feature-store ├── VERSION ├── assets │ ├── logo.png │ ├── logov1.png │ └── logov2.webp ├── internal │ ├── consumer │ │ └── listeners │ │ │ ├── listener.go │ │ │ └── models.go │ ├── data │ │ ├── models │ │ │ └── raw.go │ │ ├── repositories │ │ │ ├── caches │ │ │ │ └── errors.go │ │ │ ├── stores │ │ │ │ ├── errors.go │ │ │ │ ├── scylla_internal_stub.go │ │ │ │ ├── store.go │ │ │ │ └── scylla_v1.go │ │ │ └── provider │ │ │ │ ├── provider.go │ │ │ │ └── init.go │ │ └── blocks │ │ │ ├── psdb_pool_bench_test.go │ │ │ └── psdb_pool.go │ ├── config │ │ ├── enums │ │ │ └── consistency.go │ │ └── init.go │ ├── handler │ │ └── feature │ │ │ └── init.go │ ├── server │ │ └── http │ │ │ └── server.go │ └── quantization │ │ └── quantization.go ├── pkg │ ├── p2pcache │ │ ├── network │ │ │ ├── client │ │ │ │ └── client.go │ │ │ └── constant.go │ │ └── clustermanager │ │ │ └── cluster_manager.go │ ├── circuitbreaker │ │ ├── circuit_breaker.go │ │ ├── manualcb │ │ │ ├── model.go │ │ │ └── pass_through_breaker.go │ │ └── cb_factory.go │ ├── config │ │ └── env.go │ ├── infra │ │ ├── scylla_internal_stub.go │ │ ├── init.go │ │ ├── connection.go │ │ └── inmemory_cache_conf_builder.go │ ├── ds │ │ ├── concurrent_map.go │ │ ├── sync_map.go │ │ └── sync_map_with_ttl.go │ ├── proto │ │ ├── p2p.proto │ │ ├── persist.proto │ │ └── retrieve.proto │ └── etcd │ │ ├── etcd.go │ │ └── init.go ├── examples │ └── sample-data │ │ ├── retrieve-sample.json │ │ └── persist-sample.json ├── env-api-server.example └── cmd │ ├── api-server │ └── DockerFile │ └── consumer │ └── DockerFile ├── py-sdk ├── bharatml_commons │ ├── VERSION │ ├── bharatml_commons │ │ ├── proto │ │ │ ├── persist │ │ │ │ └── __init__.py │ │ │ ├── retrieve │ │ │ │ └── __init__.py │ │ │ ├── __init__.py │ │ │ ├── persist.proto │ │ │ └── retrieve.proto │ │ └── __init__.py │ └── pyproject.toml ├── grpc_feature_client │ ├── VERSION │ ├── grpc_feature_client │ │ └── __init__.py │ └── pyproject.toml └── spark_feature_push_client │ ├── VERSION │ ├── spark_feature_push_client │ ├── utils │ │ └── __init__,py │ └── __init__.py │ └── pyproject.toml ├── .DS_Store ├── docs ├── img │ ├── logo.jpg │ ├── favicon.ico │ ├── v1.0.0-onfs-arch.png │ ├── v1.0.0-psdb-anatomy.png │ ├── v1.0.0-csdb-skip-read.png │ ├── v1.0.0-trufflebox-login.png │ ├── v1.0.0-psdb-bool-encoding.png │ ├── v1.0.0-trufflebox-edit-fg.png │ ├── v1.0.0-psdb-string-encoding.png │ ├── v1.0.0-trufflebox-approve-fg.png │ ├── v1.0.0-trufflebox-navigation.png │ ├── v1.0.0-trufflebox-add-features.png │ ├── v1.0.0-trufflebox-approve-job.png │ ├── v1.0.0-trufflebox-edit-entity.png │ ├── v1.0.0-trufflebox-register-fg.png │ ├── v1.0.0-trufflebox-register-job.png │ ├── v1.0.0-trufflebox-registration.png │ ├── v1.0.0-trufflebox-reject-popup.png │ ├── v1.0.0-trufflebox-approve-edit-fg.png │ ├── v1.0.0-trufflebox-approve-entity.png │ ├── v1.0.0-trufflebox-approve-store.png │ ├── v1.0.0-trufflebox-edit-features.png │ ├── v1.0.0-trufflebox-job-discovery.png │ ├── v1.0.0-trufflebox-register-entity.png │ ├── v1.0.0-trufflebox-register-store.png │ ├── v1.0.0-trufflebox-store-discovery.png │ ├── v1.0.0-trufflebox-user-management.png │ ├── v1.0.0-psdb-fixed-length-encodding.png │ ├── v1.0.0-trufflebox-feature-discovery.png │ ├── v1.0.0-trufflebox-add-features-details.png │ ├── v1.0.0-trufflebox-approve-add-features.png │ ├── v1.0.0-trufflebox-approve-edit-entity.png │ ├── v1.0.0-trufflebox-register-fg-details.png │ ├── v1.0.0-trufflebox-register-job-details.png │ ├── v1.0.0-trufflebox-approve-edit-features.png │ ├── v1.0.0-trufflebox-register-store-details.png │ ├── v1.0.0-trufflebox-register-entity-details.png │ ├── v1.0.0-trufflebox-feature-discovery-fg-details.png │ ├── v1.0.0-trufflebox-feature-discovery-entity-details.png │ └── v1.0.0-trufflebox-feature-discovery-feature-details.png └── assets │ ├── images │ ├── schema-d699efc400ed0f83bba421c1f55ab211.png │ ├── bharatmlstack-72e1796337bfa224dee2a0f59ec4e2da.png │ ├── first-gen-arch-7c0b286810aecb7eff42b48f51caee1f.png │ ├── old-batch-arch-bc2cedbc1fed0fc6f08479ba8fe52996.png │ ├── v1.0.0-onfs-arch-7b3e91a84b2a24a378d13db769995c08.png │ ├── interaction-store-v0-68167b64c6e462ef2f177f0f86d55bda.png │ ├── v1.0.0-psdb-anatomy-c1735559f93dce6d0bb3894d16047059.png │ ├── v1.0.0-csdb-skip-read-e3926080f7341aa7d3c6ec6d8274ea14.png │ ├── online-feature-store-v0-86ec0010947ae24621f39ebd0d1729ca.png │ ├── v1.0.0-psdb-bool-encoding-4b154fdf5e6d79a67c91b6fb21c7209e.png │ ├── v1.0.0-trufflebox-edit-fg-edc1a8999700e5c1e9ff023fe9f6413f.png │ ├── v1.0.0-trufflebox-login-de1cbf15b2daa5c532875a94a4ad1a47.png │ ├── v1.0.0-psdb-string-encoding-b1d69e9452269124d1b545020fa27d63.png │ ├── v1.0.0-trufflebox-add-features-6cb39960d91af3ee1c896492188cfcb5.png │ ├── v1.0.0-trufflebox-edit-entity-0c3bb1263b53ed678ae2f9310441f3d7.png │ ├── v1.0.0-trufflebox-navigation-0e472fd13ccdae9448011eb9aebb990e.png │ ├── v1.0.0-trufflebox-register-fg-9c3b22e62b389f2c1baf968a6e201964.png │ ├── v1.0.0-trufflebox-register-job-e45c350f42a09adaeea50ef00d53df55.png │ ├── v1.0.0-trufflebox-registration-aed7738afc652b6418bdc00966850ec0.png │ ├── v1.0.0-trufflebox-reject-popup-9941183f1128e19034f41970d218d72f.png │ ├── v1.0.0-trufflebox-approve-store-1057c0853f92becfa9b1f87d165a72f9.png │ ├── v1.0.0-trufflebox-edit-features-41cb78c09d70203c166fce91976d2ba0.png │ ├── v1.0.0-trufflebox-job-discovery-3fac78c4b09b6c76a7bc1dd0738cc93d.png │ ├── v1.0.0-trufflebox-register-store-d6f80ceb9a6570b225bba4653ac22dd8.png │ ├── v1.0.0-psdb-fixed-length-encodding-dd252110b084e01cf38f21de16b3a1a5.png │ ├── v1.0.0-trufflebox-feature-discovery-c3a8456bb04479842666120a0ec082e6.png │ ├── v1.0.0-trufflebox-register-entity-fe6449f47304e0377107d8e5b3ce1d30.png │ ├── v1.0.0-trufflebox-store-discovery-8c9042352255fff36b35b4aa193583f7.png │ ├── v1.0.0-trufflebox-user-management-2c50fa8488f21ff07b9925c48a10f7cd.png │ ├── v1.0.0-trufflebox-register-fg-details-1b1100bbb5d23fac31414b15f2a59366.png │ ├── v1.0.0-trufflebox-add-features-details-278a519cdfe25bead880d7a18e0b858e.png │ ├── v1.0.0-trufflebox-register-job-details-075436efba1df107ac7e42164ff6494a.png │ ├── v1.0.0-trufflebox-register-store-details-a36537beae9ac91576186b193e858112.png │ ├── v1.0.0-trufflebox-register-entity-details-016ab5c5b2fef9f58bde75e6a07c9823.png │ ├── v1.0.0-trufflebox-feature-discovery-fg-details-a2dda4f72568878138e3b2d50fa20e8f.png │ ├── v1.0.0-trufflebox-feature-discovery-entity-details-839bb44b2cd99129eeb0ee785d19152c.png │ └── v1.0.0-trufflebox-feature-discovery-feature-details-b780eb1ede246eb257862a46f0fdb53e.png │ └── js │ ├── 36994c47.337a7516.js │ ├── a7456010.5f9bbb01.js │ ├── aba21aa0.ed09cce9.js │ ├── acecf23e.4b2b5a9c.js │ ├── f994c8da.90063f83.js │ ├── 814f3328.b45803b6.js │ ├── 5e95c892.a6c239e7.js │ ├── 1a64de69.22893b6e.js │ ├── 479eb034.0c88dc68.js │ ├── 3980073a.4ab85476.js │ ├── 3e1c5046.22a78085.js │ ├── 7fa80e1c.b5f726bf.js │ ├── 616111d3.9f2925b1.js │ ├── c7b64fcc.9ff95135.js │ ├── fcf4f6ca.d9bac5e5.js │ ├── 44d1c015.4db6c425.js │ ├── 14064408.be0f96be.js │ ├── fa31f022.c62034f4.js │ ├── 8ac6191a.6f3973a2.js │ ├── a7bd4aaa.8da7b7a1.js │ ├── 72dc5b25.e57720a7.js │ ├── 2d865531.a5005531.js │ ├── 2237.bfceba09.js │ └── 393be207.81b456e5.js ├── assets ├── bharatmlstack.jpg ├── version-fix-latest.png ├── version-new-backward.png ├── bharatmlstack-layered.png ├── version-fix-latest-older.png └── version-new-non-backward.png ├── .gitignore ├── .pre-commit-config.yaml ├── quick-start └── db-init │ ├── scripts │ ├── init-scylla.sh │ ├── wait-for-services.sh │ ├── main-init.sh │ ├── init-etcd.sh │ └── verify-init.sh │ └── Dockerfile ├── cli-tools ├── .cursor │ └── rules │ │ └── global │ │ └── golang │ │ ├── code-quality.mdc │ │ └── requirement-planning.mdc └── go.mod └── .github ├── ISSUE_TEMPLATE ├── bug_report.md └── feature_request.md ├── pull_request_template.md └── workflows ├── horizon.yml ├── inferflow.yml └── trufflebox-ui.yml /go-sdk/VERSION: -------------------------------------------------------------------------------- 1 | v1.0.0 -------------------------------------------------------------------------------- /numerix/VERSION: -------------------------------------------------------------------------------- 1 | v1.0.0 -------------------------------------------------------------------------------- /docs-src/static/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /helix-client/VERSION: -------------------------------------------------------------------------------- 1 | v1.0.0 -------------------------------------------------------------------------------- /horizon/VERSION: -------------------------------------------------------------------------------- 1 | v1.2.0 2 | -------------------------------------------------------------------------------- /trufflebox-ui/VERSION: -------------------------------------------------------------------------------- 1 | v1.2.0 -------------------------------------------------------------------------------- /online-feature-store/VERSION: -------------------------------------------------------------------------------- 1 | v1.1.0 -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/VERSION: -------------------------------------------------------------------------------- 1 | 1.0.1 -------------------------------------------------------------------------------- /py-sdk/grpc_feature_client/VERSION: -------------------------------------------------------------------------------- 1 | 1.0.1 -------------------------------------------------------------------------------- /numerix/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | -------------------------------------------------------------------------------- /py-sdk/spark_feature_push_client/VERSION: -------------------------------------------------------------------------------- 1 | 1.0.1 -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/.DS_Store -------------------------------------------------------------------------------- /py-sdk/spark_feature_push_client/spark_feature_push_client/utils/__init__,py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /trufflebox-ui/src/pages/EmbeddingPlatform/components/StoreManagement/index.jsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /numerix/src/pkg/etcd/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::module_inception)] 2 | pub mod etcd; 3 | -------------------------------------------------------------------------------- /docs/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/logo.jpg -------------------------------------------------------------------------------- /numerix/src/pkg/config/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::module_inception)] 2 | pub mod config; 3 | -------------------------------------------------------------------------------- /numerix/src/pkg/logger/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::module_inception)] 2 | pub mod logger; 3 | -------------------------------------------------------------------------------- /numerix/src/pkg/metrics/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::module_inception)] 2 | pub mod metrics; 3 | -------------------------------------------------------------------------------- /docs/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/favicon.ico -------------------------------------------------------------------------------- /numerix/src/pkg/middleware/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::module_inception)] 2 | pub mod middleware; 3 | -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/bharatml_commons/proto/persist/__init__.py: -------------------------------------------------------------------------------- 1 | """Generated protobuf files""" 2 | -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/bharatml_commons/proto/retrieve/__init__.py: -------------------------------------------------------------------------------- 1 | """Generated protobuf files""" 2 | -------------------------------------------------------------------------------- /assets/bharatmlstack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/assets/bharatmlstack.jpg -------------------------------------------------------------------------------- /docs-src/static/img/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/logo.jpg -------------------------------------------------------------------------------- /assets/version-fix-latest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/assets/version-fix-latest.png -------------------------------------------------------------------------------- /assets/version-new-backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/assets/version-new-backward.png -------------------------------------------------------------------------------- /docs-src/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/favicon.ico -------------------------------------------------------------------------------- /docs/img/v1.0.0-onfs-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-onfs-arch.png -------------------------------------------------------------------------------- /py-sdk/spark_feature_push_client/spark_feature_push_client/__init__.py: -------------------------------------------------------------------------------- 1 | from .client import OnlineFeatureStorePyClient -------------------------------------------------------------------------------- /assets/bharatmlstack-layered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/assets/bharatmlstack-layered.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-psdb-anatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-psdb-anatomy.png -------------------------------------------------------------------------------- /assets/version-fix-latest-older.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/assets/version-fix-latest-older.png -------------------------------------------------------------------------------- /assets/version-new-non-backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/assets/version-new-non-backward.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-csdb-skip-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-csdb-skip-read.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-login.png -------------------------------------------------------------------------------- /online-feature-store/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/online-feature-store/assets/logo.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-psdb-bool-encoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-psdb-bool-encoding.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-edit-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-edit-fg.png -------------------------------------------------------------------------------- /numerix/src/handler/mod.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::module_inception)] 2 | pub mod config; 3 | pub mod handler; 4 | pub mod handler_test; 5 | -------------------------------------------------------------------------------- /numerix/src/pkg/rust_matrix_frame/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod error; 2 | pub mod matrix; 3 | pub mod ops; 4 | mod tests; 5 | pub mod vector; 6 | -------------------------------------------------------------------------------- /online-feature-store/assets/logov1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/online-feature-store/assets/logov1.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-onfs-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-onfs-arch.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-psdb-string-encoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-psdb-string-encoding.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-fg.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-navigation.png -------------------------------------------------------------------------------- /numerix/src/pkg/rust_matrix_frame/tests/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod matrix_fp64_test; 3 | 4 | #[cfg(test)] 5 | mod matrix_fp32_test; 6 | -------------------------------------------------------------------------------- /online-feature-store/assets/logov2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/online-feature-store/assets/logov2.webp -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-psdb-anatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-psdb-anatomy.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-add-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-add-features.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-job.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-edit-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-edit-entity.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-fg.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-job.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-registration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-registration.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-reject-popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-reject-popup.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-csdb-skip-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-csdb-skip-read.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-edit-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-edit-fg.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-entity.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-store.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-edit-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-edit-features.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-job-discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-job-discovery.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-entity.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-store.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-store-discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-store-discovery.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-user-management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-user-management.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-login.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-psdb-fixed-length-encodding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-psdb-fixed-length-encodding.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-feature-discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-feature-discovery.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-psdb-bool-encoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-psdb-bool-encoding.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-psdb-string-encoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-psdb-string-encoding.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-edit-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-edit-fg.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-add-features-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-add-features-details.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-add-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-add-features.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-edit-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-edit-entity.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-fg-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-fg-details.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-job-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-job-details.png -------------------------------------------------------------------------------- /numerix/src/pkg/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod config; 2 | pub mod etcd; 3 | pub mod logger; 4 | pub mod metrics; 5 | pub mod middleware; 6 | pub mod rust_matrix_frame; 7 | -------------------------------------------------------------------------------- /online-feature-store/internal/consumer/listeners/listener.go: -------------------------------------------------------------------------------- 1 | package listeners 2 | 3 | type FeatureConsumer interface { 4 | Init() 5 | Consume() 6 | } 7 | -------------------------------------------------------------------------------- /docs-src/blog/bharatmlstack-history/post-one/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/blog/bharatmlstack-history/post-one/logo.jpg -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-fg.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-job.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-edit-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-edit-entity.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-navigation.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-fg.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-approve-edit-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-approve-edit-features.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-store-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-store-details.png -------------------------------------------------------------------------------- /docs-src/blog/bharatmlstack-history/post-one/schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/blog/bharatmlstack-history/post-one/schema.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-add-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-add-features.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-entity.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-store.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-edit-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-edit-features.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-job-discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-job-discovery.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-job.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-job.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-store.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-registration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-registration.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-reject-popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-reject-popup.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-register-entity-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-register-entity-details.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-psdb-fixed-length-encodding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-psdb-fixed-length-encodding.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-edit-fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-edit-fg.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-entity.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-store-discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-store-discovery.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-user-management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-user-management.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-edit-entity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-edit-entity.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-feature-discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-feature-discovery.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-fg-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-fg-details.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-feature-discovery-fg-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-feature-discovery-fg-details.png -------------------------------------------------------------------------------- /helix-client/pkg/clients/numerix/numerix.go: -------------------------------------------------------------------------------- 1 | package numerix 2 | 3 | type NumerixClient interface { 4 | RetrieveScore(req *NumerixRequest) (*NumerixResponse, error) 5 | } 6 | -------------------------------------------------------------------------------- /docs-src/blog/bharatmlstack-history/post-one/bharatmlstack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/blog/bharatmlstack-history/post-one/bharatmlstack.png -------------------------------------------------------------------------------- /docs-src/blog/bharatmlstack-history/post-one/first-gen-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/blog/bharatmlstack-history/post-one/first-gen-arch.png -------------------------------------------------------------------------------- /docs-src/blog/bharatmlstack-history/post-one/old-batch-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/blog/bharatmlstack-history/post-one/old-batch-arch.png -------------------------------------------------------------------------------- /docs-src/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-add-features-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-add-features-details.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-add-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-add-features.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-approve-edit-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-approve-edit-features.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-job-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-job-details.png -------------------------------------------------------------------------------- /docs/assets/images/schema-d699efc400ed0f83bba421c1f55ab211.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/schema-d699efc400ed0f83bba421c1f55ab211.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-feature-discovery-entity-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-feature-discovery-entity-details.png -------------------------------------------------------------------------------- /helix-client/pkg/clients/predator/client.go: -------------------------------------------------------------------------------- 1 | package predator 2 | 3 | type Client interface { 4 | GetInferenceScore(req *PredatorRequest) (*PredatorResponse, error) 5 | } 6 | 7 | -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-entity-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-entity-details.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-register-store-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-register-store-details.png -------------------------------------------------------------------------------- /docs/img/v1.0.0-trufflebox-feature-discovery-feature-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/img/v1.0.0-trufflebox-feature-discovery-feature-details.png -------------------------------------------------------------------------------- /trufflebox-ui/public/env.js: -------------------------------------------------------------------------------- 1 | window.env = { 2 | // Add your environment variables here 3 | API_URL: 'http://localhost:3000', 4 | // Add other configuration as needed 5 | }; -------------------------------------------------------------------------------- /docs-src/blog/bharatmlstack-history/post-one/interaction-store-v0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/blog/bharatmlstack-history/post-one/interaction-store-v0.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-feature-discovery-fg-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-feature-discovery-fg-details.png -------------------------------------------------------------------------------- /docs/assets/images/bharatmlstack-72e1796337bfa224dee2a0f59ec4e2da.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/bharatmlstack-72e1796337bfa224dee2a0f59ec4e2da.png -------------------------------------------------------------------------------- /docs/assets/images/first-gen-arch-7c0b286810aecb7eff42b48f51caee1f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/first-gen-arch-7c0b286810aecb7eff42b48f51caee1f.png -------------------------------------------------------------------------------- /docs/assets/images/old-batch-arch-bc2cedbc1fed0fc6f08479ba8fe52996.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/old-batch-arch-bc2cedbc1fed0fc6f08479ba8fe52996.png -------------------------------------------------------------------------------- /docs-src/blog/bharatmlstack-history/post-one/online-feature-store-v0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/blog/bharatmlstack-history/post-one/online-feature-store-v0.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-onfs-arch-7b3e91a84b2a24a378d13db769995c08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-onfs-arch-7b3e91a84b2a24a378d13db769995c08.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-feature-discovery-entity-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-feature-discovery-entity-details.png -------------------------------------------------------------------------------- /docs-src/static/img/v1.0.0-trufflebox-feature-discovery-feature-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs-src/static/img/v1.0.0-trufflebox-feature-discovery-feature-details.png -------------------------------------------------------------------------------- /docs/assets/images/interaction-store-v0-68167b64c6e462ef2f177f0f86d55bda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/interaction-store-v0-68167b64c6e462ef2f177f0f86d55bda.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-psdb-anatomy-c1735559f93dce6d0bb3894d16047059.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-psdb-anatomy-c1735559f93dce6d0bb3894d16047059.png -------------------------------------------------------------------------------- /docs/assets/js/36994c47.337a7516.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9858],{5516:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-blog","id":"default"}')}}]); -------------------------------------------------------------------------------- /docs/assets/js/a7456010.5f9bbb01.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1235],{8552:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); -------------------------------------------------------------------------------- /docs/assets/js/aba21aa0.ed09cce9.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5742],{7093:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-csdb-skip-read-e3926080f7341aa7d3c6ec6d8274ea14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-csdb-skip-read-e3926080f7341aa7d3c6ec6d8274ea14.png -------------------------------------------------------------------------------- /docs/assets/images/online-feature-store-v0-86ec0010947ae24621f39ebd0d1729ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/online-feature-store-v0-86ec0010947ae24621f39ebd0d1729ca.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-psdb-bool-encoding-4b154fdf5e6d79a67c91b6fb21c7209e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-psdb-bool-encoding-4b154fdf5e6d79a67c91b6fb21c7209e.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-edit-fg-edc1a8999700e5c1e9ff023fe9f6413f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-edit-fg-edc1a8999700e5c1e9ff023fe9f6413f.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-login-de1cbf15b2daa5c532875a94a4ad1a47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-login-de1cbf15b2daa5c532875a94a4ad1a47.png -------------------------------------------------------------------------------- /horizon/internal/numerix/config/config.go: -------------------------------------------------------------------------------- 1 | package etcd 2 | 3 | type Manager interface { 4 | CreateConfig(configId string, expression string) error 5 | UpdateConfig(configId string, expression string) error 6 | } 7 | -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-psdb-string-encoding-b1d69e9452269124d1b545020fa27d63.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-psdb-string-encoding-b1d69e9452269124d1b545020fa27d63.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-add-features-6cb39960d91af3ee1c896492188cfcb5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-add-features-6cb39960d91af3ee1c896492188cfcb5.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-edit-entity-0c3bb1263b53ed678ae2f9310441f3d7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-edit-entity-0c3bb1263b53ed678ae2f9310441f3d7.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-navigation-0e472fd13ccdae9448011eb9aebb990e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-navigation-0e472fd13ccdae9448011eb9aebb990e.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-fg-9c3b22e62b389f2c1baf968a6e201964.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-fg-9c3b22e62b389f2c1baf968a6e201964.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-job-e45c350f42a09adaeea50ef00d53df55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-job-e45c350f42a09adaeea50ef00d53df55.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-registration-aed7738afc652b6418bdc00966850ec0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-registration-aed7738afc652b6418bdc00966850ec0.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-reject-popup-9941183f1128e19034f41970d218d72f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-reject-popup-9941183f1128e19034f41970d218d72f.png -------------------------------------------------------------------------------- /helix-client/pkg/clients/predator/config.go: -------------------------------------------------------------------------------- 1 | package predator 2 | 3 | type Config struct { 4 | Host string 5 | Port string 6 | PlainText bool 7 | CallerId string 8 | CallerToken string 9 | } 10 | -------------------------------------------------------------------------------- /helix-client/pkg/clients/skye/init.go: -------------------------------------------------------------------------------- 1 | package skye 2 | 3 | func GetSkyeClient(version int) SkyeClient { 4 | switch version { 5 | case 1: 6 | return InitV1Client() 7 | default: 8 | return nil 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /online-feature-store/pkg/p2pcache/network/client/client.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | // Client defines the interface for UDP communication 4 | type Client interface { 5 | SendMessage(message []byte, ip string) error 6 | } 7 | -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-approve-store-1057c0853f92becfa9b1f87d165a72f9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-approve-store-1057c0853f92becfa9b1f87d165a72f9.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-edit-features-41cb78c09d70203c166fce91976d2ba0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-edit-features-41cb78c09d70203c166fce91976d2ba0.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-job-discovery-3fac78c4b09b6c76a7bc1dd0738cc93d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-job-discovery-3fac78c4b09b6c76a7bc1dd0738cc93d.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-store-d6f80ceb9a6570b225bba4653ac22dd8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-store-d6f80ceb9a6570b225bba4653ac22dd8.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-psdb-fixed-length-encodding-dd252110b084e01cf38f21de16b3a1a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-psdb-fixed-length-encodding-dd252110b084e01cf38f21de16b3a1a5.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-feature-discovery-c3a8456bb04479842666120a0ec082e6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-feature-discovery-c3a8456bb04479842666120a0ec082e6.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-entity-fe6449f47304e0377107d8e5b3ce1d30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-entity-fe6449f47304e0377107d8e5b3ce1d30.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-store-discovery-8c9042352255fff36b35b4aa193583f7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-store-discovery-8c9042352255fff36b35b4aa193583f7.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-user-management-2c50fa8488f21ff07b9925c48a10f7cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-user-management-2c50fa8488f21ff07b9925c48a10f7cd.png -------------------------------------------------------------------------------- /horizon/internal/auth/handler/init.go: -------------------------------------------------------------------------------- 1 | package handler 2 | 3 | func NewAuthenticator(version int) Authenticator { 4 | switch version { 5 | case 1: 6 | return InitAuthHandler() 7 | default: 8 | return nil 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /trufflebox-ui/src/Health.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const HealthCheck = () => { 4 | return ( 5 |
6 |

Health Check: OK

7 |
8 | ); 9 | }; 10 | 11 | export default HealthCheck; -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-fg-details-1b1100bbb5d23fac31414b15f2a59366.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-fg-details-1b1100bbb5d23fac31414b15f2a59366.png -------------------------------------------------------------------------------- /horizon/internal/repositories/scylla/scylla.go: -------------------------------------------------------------------------------- 1 | package scylla 2 | 3 | type Store interface { 4 | CreateTable(tableName string, pkColumns []string, defaultTimeToLive int) error 5 | AddColumn(tableName string, column string) error 6 | } 7 | -------------------------------------------------------------------------------- /numerix/src/pkg/rust_matrix_frame/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-matrix-frame" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [dependencies] 7 | 8 | 9 | [lib] 10 | name = "rust_matrix_frame" 11 | path = "src/lib.rs" 12 | -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-add-features-details-278a519cdfe25bead880d7a18e0b858e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-add-features-details-278a519cdfe25bead880d7a18e0b858e.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-job-details-075436efba1df107ac7e42164ff6494a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-job-details-075436efba1df107ac7e42164ff6494a.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-store-details-a36537beae9ac91576186b193e858112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-store-details-a36537beae9ac91576186b193e858112.png -------------------------------------------------------------------------------- /helix-client/pkg/clients/skye/models.go: -------------------------------------------------------------------------------- 1 | package skye 2 | 3 | import "github.com/Meesho/BharatMLStack/helix-client/pkg/grpcclient" 4 | 5 | type ClientV1 struct { 6 | ClientConfigs *ClientConfig 7 | GrpcClient *grpcclient.GRPCClient 8 | } 9 | -------------------------------------------------------------------------------- /trufflebox-ui/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | root /usr/share/nginx/html; 6 | index index.html; 7 | 8 | location / { 9 | try_files $uri /index.html; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /docs-src/docs/numerix/v1.0.0/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "v1.0.0", 3 | "position": 1, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Numerix v1.0.0", 7 | "slug": "/numerix/v1.0.0" 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-register-entity-details-016ab5c5b2fef9f58bde75e6a07c9823.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-register-entity-details-016ab5c5b2fef9f58bde75e6a07c9823.png -------------------------------------------------------------------------------- /trufflebox-ui/src/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #121212; 3 | color: #e0e0e0; 4 | } 5 | 6 | button { 7 | background-color: #333; 8 | color: #e0e0e0; 9 | } 10 | 11 | h1, p { 12 | color: #e0e0e0; 13 | } -------------------------------------------------------------------------------- /docs/assets/js/acecf23e.4b2b5a9c.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1903],{1912:a=>{a.exports=JSON.parse('{"blogBasePath":"/BharatMLStack/blog","blogTitle":"Blog","authorsListPath":"/BharatMLStack/blog/authors"}')}}]); -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .pre-commit-config.yaml 2 | trufflehog/ 3 | trufflebox-ui/node_modules/ 4 | dist/ 5 | .env* 6 | .idea/ 7 | workspace/ 8 | __pycache__/ 9 | 10 | # Dev toggle script artifacts 11 | .internal-configs/ 12 | .dev-toggle-state 13 | .go.mod.appended -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-feature-discovery-fg-details-a2dda4f72568878138e3b2d50fa20e8f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-feature-discovery-fg-details-a2dda4f72568878138e3b2d50fa20e8f.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-feature-discovery-entity-details-839bb44b2cd99129eeb0ee785d19152c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-feature-discovery-entity-details-839bb44b2cd99129eeb0ee785d19152c.png -------------------------------------------------------------------------------- /docs/assets/images/v1.0.0-trufflebox-feature-discovery-feature-details-b780eb1ede246eb257862a46f0fdb53e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meesho/BharatMLStack/HEAD/docs/assets/images/v1.0.0-trufflebox-feature-discovery-feature-details-b780eb1ede246eb257862a46f0fdb53e.png -------------------------------------------------------------------------------- /helix-client/pkg/clients/numerix/init.go: -------------------------------------------------------------------------------- 1 | package numerix 2 | 3 | func GetNumerixClient(version int, configBytes []byte) NumerixClient { 4 | switch version { 5 | case 1: 6 | return InitV1Client(configBytes) 7 | default: 8 | return nil 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /online-feature-store/pkg/circuitbreaker/circuit_breaker.go: -------------------------------------------------------------------------------- 1 | package circuitbreaker 2 | 3 | type ManualCircuitBreaker interface { 4 | IsAllowed() bool 5 | RecordSuccess() 6 | RecordFailure() 7 | ForceOpen() 8 | ForceClose() 9 | NormalExecutionMode() 10 | } 11 | -------------------------------------------------------------------------------- /horizon/internal/numerix/config/models.go: -------------------------------------------------------------------------------- 1 | package etcd 2 | 3 | type NumerixConfig struct { 4 | Expression string `json:"expression"` 5 | } 6 | 7 | type NumerixConfigRegistery struct { 8 | ExpressionConfig map[string]NumerixConfig `json:"expression-config"` 9 | } 10 | -------------------------------------------------------------------------------- /horizon/internal/numerix/handler/init.go: -------------------------------------------------------------------------------- 1 | package handler 2 | 3 | var ( 4 | config Config 5 | ) 6 | 7 | func NewConfigHandler(version int) Config { 8 | switch version { 9 | case 1: 10 | return InitV1ConfigHandler() 11 | default: 12 | return nil 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/models/raw.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "github.com/Meesho/BharatMLStack/online-feature-store/internal/data/blocks" 4 | 5 | type Row struct { 6 | PkMap map[string]string 7 | FgIdToPsDb map[int]*blocks.PermStorageDataBlock 8 | } 9 | -------------------------------------------------------------------------------- /docs-src/docs/online-feature-store/v1.0.0/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "v1.0.0", 3 | "position": 1, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Online Feature Store v1.0.0", 7 | "slug": "/online-feature-store/v1.0.0" 8 | } 9 | } -------------------------------------------------------------------------------- /docs/assets/js/f994c8da.90063f83.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1999],{38:a=>{a.exports=JSON.parse('{"metadata":{"permalink":"/BharatMLStack/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/bharatml_commons/proto/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Protobuf definitions for BharatML Stack 3 | 4 | This package contains the protobuf message definitions and generated Python code 5 | for gRPC communication across all BharatML Stack SDKs. 6 | """ 7 | 8 | __version__ = "0.1.0" -------------------------------------------------------------------------------- /docs-src/docs/numerix/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Numerix", 3 | "position": 6, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Numerix is a mathematical compute engine for BharatML Stack. It is used to perform mathematical operations on matrices and vectors." 7 | } 8 | } -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: local 3 | hooks: 4 | - id: trufflehog 5 | name: TruffleHog 6 | description: Detect secrets in your data. 7 | entry: "trufflehog/trufflehog-hook.sh" 8 | language: script 9 | stages: ["pre-commit", "pre-push"] 10 | -------------------------------------------------------------------------------- /numerix/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tonic_build::configure() 3 | .out_dir("src/protos/proto_gen") 4 | .protoc_arg("--experimental_allow_proto3_optional") 5 | .compile(&["src/protos/proto/numerix.proto"], &["src/protos/proto"]) 6 | .expect("Failed to compile proto file"); 7 | } 8 | -------------------------------------------------------------------------------- /online-feature-store/internal/config/enums/consistency.go: -------------------------------------------------------------------------------- 1 | package enums 2 | 3 | type Consistency string 4 | 5 | const ( 6 | ConsistencyUnknown Consistency = "ConsistencyUnknown" 7 | ConsistencyStrong Consistency = "ConsistencyStrong" 8 | ConsistencyEventual Consistency = "ConsistencyEventual" 9 | ) 10 | -------------------------------------------------------------------------------- /horizon/internal/online-feature-store/config/enums/cache_type.go: -------------------------------------------------------------------------------- 1 | package enums 2 | 3 | type CacheType string 4 | 5 | const ( 6 | CacheTypeDistributed CacheType = "distributed" 7 | CacheTypeInMemory CacheType = "in-memory" 8 | ) 9 | 10 | func (c CacheType) String() string { 11 | return string(c) 12 | } 13 | -------------------------------------------------------------------------------- /docs-src/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /docs-src/docs/sdks/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "SDKs", 3 | "position": 3, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Software Development Kits (SDKs) for BharatML Stack. Includes client libraries for Go and Python to interact with the online feature store and other platform components." 7 | } 8 | } -------------------------------------------------------------------------------- /docs-src/docs/trufflebox-ui/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Trufflebox UI", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Trufflebox UI is a modern, feature rich UI framework for supporting MLOps. It supports Feature catalog, management, user managemnet and other adminops" 7 | } 8 | } -------------------------------------------------------------------------------- /docs-src/docs/sdks/go/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Go SDK", 3 | "position": 1, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Go SDK for BharatML Stack. Provides Go client libraries and packages for interacting with the online feature store, including gRPC clients and protocol buffer definitions." 7 | } 8 | } -------------------------------------------------------------------------------- /docs/assets/js/814f3328.b45803b6.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7472],{5513:e=>{e.exports=JSON.parse('{"title":"Recent posts","items":[{"title":"Building Meesho\u2019s ML Platform: From Chaos to Cutting-Edge (Part 1)","permalink":"/BharatMLStack/blog/post-one","unlisted":false,"date":"2022-11-15T00:00:00.000Z"}]}')}}]); -------------------------------------------------------------------------------- /online-feature-store/internal/handler/feature/init.go: -------------------------------------------------------------------------------- 1 | package feature 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/online-feature-store/pkg/proto/retrieve" 5 | ) 6 | 7 | func GetHandler(version int) retrieve.FeatureServiceServer { 8 | switch version { 9 | case 1: 10 | return InitV1() 11 | default: 12 | return nil 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docs-src/docs/quick-start/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Quick Start", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Quick Start guide for BharatML Stack. Get up and running quickly with step-by-step instructions, sample data, and Docker Compose setup for local development and testing." 7 | } 8 | } -------------------------------------------------------------------------------- /docs/assets/js/5e95c892.a6c239e7.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9647],{7121:(e,s,r)=>{r.r(s),r.d(s,{default:()=>l});r(6540);var c=r(4164),u=r(5500),a=r(7559),d=r(2831),n=r(1656),t=r(4848);function l(e){return(0,t.jsx)(u.e3,{className:(0,c.A)(a.G.wrapper.docsPages),children:(0,t.jsx)(n.A,{children:(0,d.v)(e.route.routes)})})}}}]); -------------------------------------------------------------------------------- /horizon/pkg/infra/init.go: -------------------------------------------------------------------------------- 1 | package infra 2 | 3 | import "sync" 4 | 5 | var ( 6 | mut sync.Mutex 7 | ConfIdDBTypeMap = make(map[int]DBType) 8 | ) 9 | 10 | func InitDBConnectors() { 11 | mut.Lock() 12 | defer mut.Unlock() 13 | if Scylla == nil { 14 | initScyllaClusterConns() 15 | } 16 | if SQL == nil { 17 | initSQLConns() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs-src/docs/sdks/python/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Python SDK", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Python SDK for BharatML Stack. Provides Python client libraries and utilities for interacting with the online feature store, including gRPC clients, Spark integration, and common utilities." 7 | } 8 | } -------------------------------------------------------------------------------- /helix-client/pkg/utils/empty_utils.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | func IsEmptyString(in string) bool { 4 | return in == "" 5 | } 6 | 7 | func IsNilPointer[T any](ptr *T) bool { 8 | return ptr == nil 9 | } 10 | 11 | func IsEmptyMap[K comparable, V any](m map[K]V) bool { 12 | return len(m) == 0 13 | } 14 | 15 | func IsEmptySlice[V any](s []V) bool { 16 | return len(s) == 0 17 | } 18 | -------------------------------------------------------------------------------- /online-feature-store/pkg/circuitbreaker/manualcb/model.go: -------------------------------------------------------------------------------- 1 | package manualcb 2 | 3 | type CBConfig struct { 4 | CBName string 5 | FailureRateThreshold int 6 | FailureExecutionThreshold int 7 | FailureThresholdingPeriodInMS int 8 | SuccessRatioThreshold int 9 | SuccessThresholdingCapacity int 10 | WithDelayInMS int 11 | } 12 | -------------------------------------------------------------------------------- /docs-src/docs/sdks/python/v1.0.0/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "v1.0.0", 3 | "position": 1, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Python SDK v1.0.0 documentation for BharatML Stack. Contains API reference, usage guides, and examples for the Python client libraries including gRPC feature client, Spark feature push client, and common utilities." 7 | } 8 | } -------------------------------------------------------------------------------- /py-sdk/grpc_feature_client/grpc_feature_client/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | gRPC Feature Client SDK for BharatML Stack 3 | 4 | A high-performance gRPC client for feature operations including persist, retrieve, and retrieveDecoded. 5 | """ 6 | 7 | from .client import GRPCFeatureClient 8 | from .config import GRPCClientConfig 9 | 10 | __version__ = "0.1.0" 11 | __all__ = ["GRPCFeatureClient", "GRPCClientConfig"] -------------------------------------------------------------------------------- /online-feature-store/examples/sample-data/retrieve-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity_label": "user", 3 | "feature_groups": [ 4 | { 5 | "label": "user_features", 6 | "feature_labels": ["age", "location", "subscription_type"] 7 | } 8 | ], 9 | "keys_schema": ["user_id"], 10 | "keys": [ 11 | { 12 | "cols": ["user_123"] 13 | }, 14 | { 15 | "cols": ["user_456"] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /trufflebox-ui/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Generate env.js dynamically based on container env var 5 | cat < /usr/share/nginx/html/env.js 6 | window.env = { 7 | REACT_APP_HORIZON_BASE_URL: "${REACT_APP_HORIZON_BASE_URL:-http://localhost:8082}", 8 | }; 9 | EOF 10 | 11 | echo "✅ Generated env.js with REACT_APP_HORIZON_BASE_URL=${REACT_APP_HORIZON_BASE_URL}" 12 | 13 | # Start nginx 14 | exec nginx -g "daemon off;" -------------------------------------------------------------------------------- /online-feature-store/pkg/p2pcache/network/constant.go: -------------------------------------------------------------------------------- 1 | package network 2 | 3 | import "time" 4 | 5 | const ( 6 | RESPONSE_PACKET_KEY_VALUE_SEPARATOR = byte(0) 7 | VALUE_NOT_FOUND_RESPONSE = byte(0) 8 | SET_DATA_PACKET_START_BYTE_IDENTIFIER = byte(0) 9 | SET_DATA_PACKET_KEY_TTL_SEPARATOR = byte(0) 10 | 11 | MAX_PACKET_SIZE_IN_BYTES = 1024 * 4 // 4KB 12 | 13 | REQUEST_TIMEOUT = 10 * time.Millisecond 14 | ) 15 | -------------------------------------------------------------------------------- /docs/assets/js/1a64de69.22893b6e.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3645],{1694:a=>{a.exports=JSON.parse('{"tag":{"label":"meesho","permalink":"/BharatMLStack/blog/tags/meesho","allTagsPath":"/BharatMLStack/blog/tags","count":1,"unlisted":false},"listMetadata":{"permalink":"/BharatMLStack/blog/tags/meesho","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); -------------------------------------------------------------------------------- /trufflebox-ui/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /docs/assets/js/479eb034.0c88dc68.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5425],{9341:a=>{a.exports=JSON.parse('{"tag":{"label":"mlplatform","permalink":"/BharatMLStack/blog/tags/mlplatform","allTagsPath":"/BharatMLStack/blog/tags","count":1,"unlisted":false},"listMetadata":{"permalink":"/BharatMLStack/blog/tags/mlplatform","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); -------------------------------------------------------------------------------- /trufflebox-ui/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import 'bootstrap/dist/css/bootstrap.min.css'; 6 | 7 | async function bootstrap() { 8 | const root = ReactDOM.createRoot(document.getElementById('root')); 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | } 15 | 16 | bootstrap(); 17 | 18 | -------------------------------------------------------------------------------- /docs/assets/js/3980073a.4ab85476.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[940],{3840:t=>{t.exports=JSON.parse('{"tag":{"label":"interaction-store","permalink":"/BharatMLStack/blog/tags/interaction-store","allTagsPath":"/BharatMLStack/blog/tags","count":1,"unlisted":false},"listMetadata":{"permalink":"/BharatMLStack/blog/tags/interaction-store","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); -------------------------------------------------------------------------------- /horizon/pkg/config/env.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "github.com/rs/zerolog/log" 5 | "github.com/spf13/viper" 6 | "sync" 7 | ) 8 | 9 | var ( 10 | initialized = false 11 | once sync.Once 12 | ) 13 | 14 | func InitEnv() { 15 | if initialized { 16 | log.Debug().Msg("Env already initialized!") 17 | return 18 | } 19 | once.Do(func() { 20 | viper.AutomaticEnv() 21 | initialized = true 22 | log.Info().Msg("Env initialized!") 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /docs/assets/js/3e1c5046.22a78085.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[690],{8750:a=>{a.exports=JSON.parse('{"tag":{"label":"online-feature-store","permalink":"/BharatMLStack/blog/tags/online-feature-store","allTagsPath":"/BharatMLStack/blog/tags","count":1,"unlisted":false},"listMetadata":{"permalink":"/BharatMLStack/blog/tags/online-feature-store","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); -------------------------------------------------------------------------------- /docs-src/docs/online-feature-store/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Online Feature Store", 3 | "position": 1, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Online-feature-store is a high-performance, scalable, and production-grade feature store built for modern machine learning systems. It supports both real-time and batch workflows, with a strong emphasis on developer experience, system observability, and low-latency feature retrieval." 7 | } 8 | } -------------------------------------------------------------------------------- /horizon/internal/online-feature-store/handler/init.go: -------------------------------------------------------------------------------- 1 | package handler 2 | 3 | import "sync" 4 | 5 | var ( 6 | once sync.Once 7 | config Config 8 | ) 9 | 10 | func NewConfigHandler(version int) Config { 11 | switch version { 12 | case 1: 13 | return InitV1ConfigHandler() 14 | default: 15 | return nil 16 | } 17 | } 18 | 19 | func ResetConfigForTests() { 20 | once = sync.Once{} // Re-instantiate the sync.Once 21 | config = nil // Reset the handler instance 22 | } 23 | -------------------------------------------------------------------------------- /trufflebox-ui/src/pages/Auth/Layout.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Header from '../Header/index'; 3 | import PropTypes from 'prop-types'; 4 | 5 | const Layout = ({ children }) => { 6 | return ( 7 |
8 |
{/* Persistent Header */} 9 |
{children}
{/* Render the page content */} 10 |
11 | ); 12 | }; 13 | 14 | Layout.propTypes = { 15 | children: PropTypes.node.isRequired, 16 | }; 17 | 18 | export default Layout; 19 | -------------------------------------------------------------------------------- /trufflebox-ui/src/pages/Layout/Layout.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Header from '../Header/index'; 3 | import PropTypes from 'prop-types'; 4 | 5 | const Layout = ({ children }) => { 6 | return ( 7 |
8 |
{/* Persistent Header */} 9 |
{children}
{/* Render the page content */} 10 |
11 | ); 12 | }; 13 | 14 | Layout.propTypes = { 15 | children: PropTypes.node.isRequired, 16 | }; 17 | 18 | export default Layout; 19 | -------------------------------------------------------------------------------- /online-feature-store/pkg/config/env.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "sync" 5 | 6 | "github.com/rs/zerolog/log" 7 | "github.com/spf13/viper" 8 | ) 9 | 10 | var ( 11 | initialized = false 12 | once sync.Once 13 | ) 14 | 15 | func InitEnv() { 16 | if initialized { 17 | log.Debug().Msg("Env already initialized!") 18 | return 19 | } 20 | once.Do(func() { 21 | viper.AutomaticEnv() 22 | initialized = true 23 | log.Info().Msg("Env initialized!") 24 | }) 25 | } 26 | -------------------------------------------------------------------------------- /docs/assets/js/7fa80e1c.b5f726bf.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3322],{9189:a=>{a.exports=JSON.parse('{"tags":[{"label":"online-feature-store","permalink":"/BharatMLStack/blog/tags/online-feature-store","count":1},{"label":"interaction-store","permalink":"/BharatMLStack/blog/tags/interaction-store","count":1},{"label":"mlplatform","permalink":"/BharatMLStack/blog/tags/mlplatform","count":1},{"label":"meesho","permalink":"/BharatMLStack/blog/tags/meesho","count":1}]}')}}]); -------------------------------------------------------------------------------- /numerix/src/main.rs: -------------------------------------------------------------------------------- 1 | pub mod pkg; 2 | pub mod server; 3 | use handler::config as handler_config; 4 | use pkg::config::config; 5 | use pkg::etcd::etcd; 6 | use pkg::metrics::metrics; 7 | pub mod handler; 8 | use pkg::logger::logger; 9 | 10 | #[tokio::main] 11 | async fn main() { 12 | logger::init_logger(); 13 | config::get_config(); 14 | metrics::init_config(); 15 | etcd::init_etcd_connection().await; 16 | handler_config::init_config().await; 17 | server::init_server().await; 18 | } 19 | -------------------------------------------------------------------------------- /helix-client/pkg/clients/skye/skye.go: -------------------------------------------------------------------------------- 1 | package skye 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/helix-client/pkg/clients/skye/client/grpc" 5 | ) 6 | 7 | type SkyeClient interface { 8 | GetSimilarCandidates(request *grpc.SkyeRequest) (*grpc.SkyeResponse, error) 9 | GetEmbeddingsForCandidateIds(request *grpc.SkyeBulkEmbeddingRequest) (*grpc.SkyeBulkEmbeddingResponse, error) 10 | GetDotProductOfCandidatesForEmbedding(request *grpc.EmbeddingDotProductRequest) (*grpc.EmbeddingDotProductResponse, error) 11 | } 12 | -------------------------------------------------------------------------------- /horizon/internal/online-feature-store/config/init.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var ( 8 | registry = make(map[int]Manager) 9 | once sync.Once 10 | ) 11 | 12 | const ( 13 | DefaultVersion = 1 14 | ) 15 | 16 | func Init() { 17 | once.Do(func() { 18 | registry[DefaultVersion] = NewEtcdConfig() 19 | }) 20 | } 21 | 22 | func Instance(version int) Manager { 23 | switch version { 24 | case DefaultVersion: 25 | return registry[DefaultVersion] 26 | default: 27 | return nil 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/repositories/caches/errors.go: -------------------------------------------------------------------------------- 1 | package caches 2 | 3 | import "errors" 4 | 5 | var ( 6 | // ErrNotImplemented is returned when a cache method is not implemented 7 | ErrNotImplemented = errors.New("method not implemented") 8 | 9 | // ErrInvalidInput is returned when input parameters are invalid 10 | ErrInvalidInput = errors.New("invalid input parameters") 11 | 12 | // ErrCacheOperation is returned when a cache operation fails 13 | ErrCacheOperation = errors.New("cache operation failed") 14 | ) 15 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/repositories/stores/errors.go: -------------------------------------------------------------------------------- 1 | package stores 2 | 3 | import "errors" 4 | 5 | var ( 6 | // ErrNotImplemented is returned when a store method is not implemented 7 | ErrNotImplemented = errors.New("method not implemented") 8 | 9 | // ErrInvalidInput is returned when input parameters are invalid 10 | ErrInvalidInput = errors.New("invalid input parameters") 11 | 12 | // ErrStoreOperation is returned when a store operation fails 13 | ErrStoreOperation = errors.New("store operation failed") 14 | ) 15 | -------------------------------------------------------------------------------- /horizon/internal/auth/handler/handler.go: -------------------------------------------------------------------------------- 1 | package handler 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var ( 8 | authOnce sync.Once 9 | authenticator Authenticator 10 | JwtKey = []byte("horizon-admin-secret") // Replace with a secure secret key 11 | ) 12 | 13 | type Authenticator interface { 14 | Register(user *User) error 15 | Login(user *Login) (*LoginResponse, error) 16 | Logout(token string) error 17 | GetAllUsers() ([]UserListingResponse, error) 18 | UpdateUserAccessAndRole(email string, isActive bool, role string) error 19 | } 20 | -------------------------------------------------------------------------------- /online-feature-store/pkg/infra/scylla_internal_stub.go: -------------------------------------------------------------------------------- 1 | //go:build !meesho 2 | 3 | package infra 4 | 5 | import "errors" 6 | 7 | func createSessionV2(_ interface{}) (interface{}, error) { 8 | return nil, errors.New("gocql_v2 not compiled: build with -tags meesho") 9 | } 10 | 11 | func isSessionClosedV2(_ interface{}) bool { 12 | return true // treat as closed 13 | } 14 | 15 | func buildGocqlV2ClusterConfig(_ []string, _ string, _ string) (interface{}, error) { 16 | return nil, errors.New("gocql_v2 not compiled: build with -tags meesho") 17 | } 18 | -------------------------------------------------------------------------------- /numerix/env.example: -------------------------------------------------------------------------------- 1 | # APPLICATION CONFIGURATION - Basic app settings 2 | APPLICATION_PORT=8083 3 | APP_ENV=prd 4 | APP_LOG_LEVEL=ERROR 5 | APP_NAME=numerix 6 | 7 | # MATRIX OPERATIONS CONFIGURATION - Performance tuning 8 | CHANNEL_BUFFER_SIZE=10000 9 | 10 | # ETCD CONFIGURATION - Distributed configuration management 11 | ETCD_SERVERS=127.0.0.1:2379 12 | 13 | # MONITORING CONFIGURATION - Metrics and observability 14 | METRIC_SAMPLING_RATE=1 15 | TELEGRAF_UDP_HOST=127.0.0.1 16 | TELEGRAF_UDP_PORT=8125 17 | 18 | # LOGGING CONFIGURATION 19 | LOG_SAMPLING_RATE=1 -------------------------------------------------------------------------------- /online-feature-store/internal/config/init.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var ( 8 | registry = make(map[int]Manager) 9 | once sync.Once 10 | ) 11 | 12 | const ( 13 | DefaultVersion = 1 14 | ) 15 | 16 | func InitEtcDBridge() { 17 | once.Do(func() { 18 | registry[DefaultVersion] = NewEtcdConfig() 19 | }) 20 | } 21 | 22 | func Instance(version int) Manager { 23 | switch version { 24 | case DefaultVersion: 25 | return registry[DefaultVersion] 26 | default: 27 | return registry[DefaultVersion] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/repositories/provider/provider.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/online-feature-store/internal/data/repositories/caches" 5 | "github.com/Meesho/BharatMLStack/online-feature-store/internal/data/repositories/stores" 6 | ) 7 | 8 | type StoreProvider interface { 9 | GetStore(storeId string) (stores.Store, error) 10 | UpdateStore() error 11 | } 12 | 13 | type CacheProvider interface { 14 | GetCache(entityLabel string) (caches.Cache, error) 15 | updateCacheMapping() error 16 | } 17 | -------------------------------------------------------------------------------- /helix-client/pkg/system/global.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "encoding/binary" 5 | "unsafe" 6 | ) 7 | 8 | var ( 9 | ByteOrder binary.ByteOrder 10 | ) 11 | 12 | func init() { 13 | loadByteOrder() 14 | } 15 | 16 | func loadByteOrder() { 17 | buf := [2]byte{} 18 | *(*uint16)(unsafe.Pointer(&buf[0])) = uint16(0xABCD) 19 | 20 | switch buf { 21 | case [2]byte{0xCD, 0xAB}: 22 | ByteOrder = binary.LittleEndian 23 | case [2]byte{0xAB, 0xCD}: 24 | ByteOrder = binary.BigEndian 25 | default: 26 | panic("Could not determine endianness.") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /horizon/cmd/horizon/Dockerfile: -------------------------------------------------------------------------------- 1 | # Stage 1: Build the Go binary 2 | FROM golang:1.22-bullseye AS builder 3 | 4 | ARG TARGETOS 5 | ARG TARGETARCH 6 | ENV CGO_ENABLED=0 \ 7 | GOOS=${TARGETOS} \ 8 | GOARCH=${TARGETARCH} 9 | 10 | WORKDIR /app 11 | 12 | COPY go.mod go.sum ./ 13 | RUN go mod download 14 | 15 | COPY . . 16 | RUN go build -o horizon ./cmd/horizon/main.go 17 | 18 | # Stage 2: Minimal distroless runtime 19 | FROM gcr.io/distroless/static:nonroot 20 | 21 | WORKDIR / 22 | 23 | COPY --from=builder /app/horizon . 24 | 25 | EXPOSE 8082 26 | 27 | ENTRYPOINT ["/horizon"] -------------------------------------------------------------------------------- /helix-client/pkg/utils/slice_utils_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "github.com/stretchr/testify/assert" 5 | "testing" 6 | ) 7 | 8 | func TestBatch(t *testing.T) { 9 | in := []int{1, 2, 3, 4, 5} 10 | batches, _ := Batch(in, 2) 11 | assert.Equal(t, 3, len(batches), "Expected length of 3, got %d", len(batches)) 12 | assert.Equal(t, 2, len(batches[0]), "Expected length of 2, got %d", len(batches[0])) 13 | assert.Equal(t, 2, len(batches[1]), "Expected length of 2, got %d", len(batches[1])) 14 | assert.Equal(t, 1, len(batches[2]), "Expected length of 1, got %d", len(batches[2])) 15 | } 16 | -------------------------------------------------------------------------------- /horizon/internal/middlewares/resolver/config.go: -------------------------------------------------------------------------------- 1 | package resolver 2 | 3 | import "github.com/gin-gonic/gin" 4 | 5 | type ScreenModule struct { 6 | ScreenType string 7 | Module string 8 | Service string 9 | } 10 | 11 | type Func func(c *gin.Context) ScreenModule 12 | 13 | type ServiceResolver interface { 14 | GetResolvers() map[string]Func 15 | } 16 | 17 | func StaticResolver(screenType, module, service string) Func { 18 | return func(c *gin.Context) ScreenModule { 19 | return ScreenModule{ 20 | ScreenType: screenType, 21 | Module: module, 22 | Service: service, 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /docs/assets/js/616111d3.9f2925b1.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9158],{9470:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"SDKs","description":"Software Development Kits (SDKs) for BharatML Stack. Includes client libraries for Go and Python to interact with the online feature store and other platform components.","slug":"/category/sdks","permalink":"/BharatMLStack/category/sdks","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"User Manual","permalink":"/BharatMLStack/trufflebox-ui/v1.0.0/userguide"},"next":{"title":"Go SDK","permalink":"/BharatMLStack/category/go-sdk"}}}}')}}]); -------------------------------------------------------------------------------- /trufflebox-ui/src/constants/databaseTypes.js: -------------------------------------------------------------------------------- 1 | // Database types supported for variant onboarding 2 | export const DATABASE_TYPES = { 3 | QDRANT: 'QDRANT', 4 | // ELASTICSEARCH: 'ELASTICSEARCH', 5 | // PINECONE: 'PINECONE', 6 | // WEAVIATE: 'WEAVIATE', 7 | }; 8 | 9 | // Database type options for dropdown 10 | export const DATABASE_TYPE_OPTIONS = [ 11 | { 12 | value: DATABASE_TYPES.QDRANT, 13 | label: 'Qdrant', 14 | description: 'Vector database for similarity search and machine learning applications' 15 | } 16 | ]; 17 | 18 | // Default database type 19 | export const DEFAULT_DATABASE_TYPE = DATABASE_TYPES.QDRANT; 20 | -------------------------------------------------------------------------------- /docs/assets/js/c7b64fcc.9ff95135.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8933],{9997:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Go SDK","description":"Go SDK for BharatML Stack. Provides Go client libraries and packages for interacting with the online feature store, including gRPC clients and protocol buffer definitions.","slug":"/category/go-sdk","permalink":"/BharatMLStack/category/go-sdk","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"SDKs","permalink":"/BharatMLStack/category/sdks"},"next":{"title":"GRPC Feature client","permalink":"/BharatMLStack/sdks/go/v1.0.0/feature_client"}}}}')}}]); -------------------------------------------------------------------------------- /online-feature-store/pkg/ds/concurrent_map.go: -------------------------------------------------------------------------------- 1 | package ds 2 | 3 | import "sync" 4 | 5 | type ConcurrentMap[K comparable, V any] struct { 6 | rw sync.RWMutex 7 | Map map[K]V 8 | } 9 | 10 | func NewConcurrentMap[K comparable, V any]() *ConcurrentMap[K, V] { 11 | return &ConcurrentMap[K, V]{ 12 | Map: make(map[K]V), 13 | } 14 | } 15 | 16 | func (sm *ConcurrentMap[K, V]) Set(key K, value V) { 17 | sm.rw.Lock() 18 | defer sm.rw.Unlock() 19 | sm.Map[key] = value 20 | } 21 | 22 | func (sm *ConcurrentMap[K, V]) Get(key K) (V, bool) { 23 | sm.rw.RLock() 24 | defer sm.rw.RUnlock() 25 | value, ok := sm.Map[key] 26 | return value, ok 27 | } 28 | -------------------------------------------------------------------------------- /quick-start/db-init/scripts/init-scylla.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo "🗃️ Initializing ScyllaDB..." 6 | 7 | # Create keyspace 8 | echo " 📋 Creating 'onfs' keyspace... ok ?" 9 | cqlsh scylla 9042 <<'EOF' 10 | CREATE KEYSPACE IF NOT EXISTS onfs 11 | WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; 12 | EOF 13 | 14 | # Verify keyspace creation 15 | echo " 🔍 Verifying keyspace creation..." 16 | if cqlsh scylla 9042 -e "DESCRIBE KEYSPACE onfs" > /dev/null 2>&1; then 17 | echo " ✅ ScyllaDB keyspace 'onfs' created successfully" 18 | else 19 | echo " ❌ Failed to create ScyllaDB keyspace" 20 | exit 1 21 | fi -------------------------------------------------------------------------------- /docs/assets/js/fcf4f6ca.d9bac5e5.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7720],{4041:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Trufflebox UI","description":"Trufflebox UI is a modern, feature rich UI framework for supporting MLOps. It supports Feature catalog, management, user managemnet and other adminops","slug":"/category/trufflebox-ui","permalink":"/BharatMLStack/category/trufflebox-ui","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Quick Start","permalink":"/BharatMLStack/quick-start/v1.0.0/quick-start"},"next":{"title":"User Manual","permalink":"/BharatMLStack/trufflebox-ui/v1.0.0/userguide"}}}}')}}]); -------------------------------------------------------------------------------- /online-feature-store/pkg/infra/init.go: -------------------------------------------------------------------------------- 1 | package infra 2 | 3 | import "sync" 4 | 5 | var ( 6 | mut sync.Mutex 7 | ConfIdDBTypeMap = make(map[int]DBType) 8 | ) 9 | 10 | func InitDBConnectors() { 11 | mut.Lock() 12 | defer mut.Unlock() 13 | if RedisCluster == nil { 14 | initRedisClusterConns() 15 | } 16 | if RedisStandalone == nil { 17 | initRedisStandaloneConns() 18 | } 19 | if RedisFailover == nil { 20 | initRedisFailoverConns() 21 | } 22 | if Scylla == nil { 23 | initScyllaClusterConns() 24 | } 25 | if InMemoryCache == nil { 26 | initInMemoryCacheConns() 27 | } 28 | if P2PCache == nil { 29 | initP2PCacheConns() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /docs/assets/js/44d1c015.4db6c425.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1065],{6725:t=>{t.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Python SDK","description":"Python SDK for BharatML Stack. Provides Python client libraries and utilities for interacting with the online feature store, including gRPC clients, Spark integration, and common utilities.","slug":"/category/python-sdk","permalink":"/BharatMLStack/category/python-sdk","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"GRPC Feature client","permalink":"/BharatMLStack/sdks/go/v1.0.0/feature_client"},"next":{"title":"v1.0.0","permalink":"/BharatMLStack/category/v100"}}}}')}}]); -------------------------------------------------------------------------------- /docs/assets/js/14064408.be0f96be.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4582],{9416:t=>{t.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Quick Start","description":"Quick Start guide for BharatML Stack. Get up and running quickly with step-by-step instructions, sample data, and Docker Compose setup for local development and testing.","slug":"/category/quick-start","permalink":"/BharatMLStack/category/quick-start","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Release Notes","permalink":"/BharatMLStack/online-feature-store/v1.0.0/release-notes"},"next":{"title":"Quick Start","permalink":"/BharatMLStack/quick-start/v1.0.0/quick-start"}}}}')}}]); -------------------------------------------------------------------------------- /docs/assets/js/fa31f022.c62034f4.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6062],{6096:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"v1.0.0","description":"Python SDK v1.0.0 documentation for BharatML Stack. Contains API reference, usage guides, and examples for the Python client libraries including gRPC feature client, Spark feature push client, and common utilities.","slug":"/category/v100","permalink":"/BharatMLStack/category/v100","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Python SDK","permalink":"/BharatMLStack/category/python-sdk"},"next":{"title":"GRPC Feature client","permalink":"/BharatMLStack/sdks/python/v1.0.0/grpc_feature_client"}}}}')}}]); -------------------------------------------------------------------------------- /trufflebox-ui/src/constants/dataTypes.js: -------------------------------------------------------------------------------- 1 | // src/constants/dataTypes.js 2 | 3 | export const dataTypes = [ 4 | 'FP8E5M2', 'FP8E4M3', 'FP16', 'FP32', 'FP64', 5 | 'Int8', 'Int16', 'Int32', 'Int64', 6 | 'Uint8', 'Uint16', 'Uint32', 'Uint64', 7 | 'String', 'Bool', 8 | 'FP8E5M2Vector', 'FP8E4M3Vector', 'FP16Vector', 'FP32Vector', 'FP64Vector', 9 | 'Int8Vector', 'Int16Vector', 'Int32Vector', 'Int64Vector', 10 | 'Uint8Vector', 'Uint16Vector', 'Uint32Vector', 'Uint64Vector', 11 | 'StringVector', 'BoolVector' 12 | ]; 13 | 14 | export const addDataTypePrefix = (value) => `DataType${value}`; 15 | 16 | export const removeDataTypePrefix = (value) => value.replace('DataType', ''); -------------------------------------------------------------------------------- /online-feature-store/env-api-server.example: -------------------------------------------------------------------------------- 1 | APP_ENV=prod 2 | APP_LOG_LEVEL=DEBUG 3 | APP_METRIC_SAMPLING_RATE=1 4 | APP_NAME=onfs 5 | APP_PORT=8089 6 | 7 | ETCD_SERVER=127.0.0.1:2379 8 | ETCD_WATCHER_ENABLED=true 9 | 10 | IN_MEM_CACHE_3_ENABLED=true 11 | IN_MEM_CACHE_3_NAME=onfs 12 | IN_MEM_CACHE_3_SIZE_IN_BYTES=100 13 | 14 | STORAGE_SCYLLA_1_CONTACT_POINTS=127.0.01 15 | STORAGE_SCYLLA_1_KEYSPACE=onfs 16 | STORAGE_SCYLLA_1_NUM_CONNS=1 17 | STORAGE_SCYLLA_1_PORT=9042 18 | STORAGE_SCYLLA_1_TIMEOUT_IN_MS=300000 19 | STORAGE_SCYLLA_1_PASSWORD= 20 | STORAGE_SCYLLA_1_USERNAME= 21 | 22 | STORAGE_SCYLLA_ACTIVE_CONFIG_IDS=1 23 | IN_MEM_CACHE_ACTIVE_CONFIG_IDS=3 24 | 25 | POD_IP=127.0.0.1 26 | NODE_IP=127.0.0.1 27 | -------------------------------------------------------------------------------- /docs/assets/js/8ac6191a.6f3973a2.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8465],{4540:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Online Feature Store","description":"Online-feature-store is a high-performance, scalable, and production-grade feature store built for modern machine learning systems. It supports both real-time and batch workflows, with a strong emphasis on developer experience, system observability, and low-latency feature retrieval.","slug":"/category/online-feature-store","permalink":"/BharatMLStack/category/online-feature-store","sidebar":"tutorialSidebar","navigation":{"next":{"title":"v1.0.0","permalink":"/BharatMLStack/online-feature-store/v1.0.0"}}}}')}}]); -------------------------------------------------------------------------------- /trufflebox-ui/src/pages/OnlineFeatureStore/components/FeatureApproval/styles.scss: -------------------------------------------------------------------------------- 1 | form { 2 | margin: auto auto; // Center the form 3 | padding: 2rem; 4 | width: 100%; 5 | background-color: #ffffff; // White background for the form 6 | border-radius: 8px; // Rounded corners for the form 7 | box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); // Subtle shadow for depth 8 | 9 | h5 { 10 | // margin-top: 1.5rem; // Space above the headings 11 | color: #450839; /* Changed from #446e9b */ 12 | text-align: left; // Left align the headings 13 | font-size: 1rem; // Larger font size for headings 14 | } 15 | 16 | } 17 | .custom-modal-width { 18 | max-width: 600px !important; 19 | width: 500px; 20 | } -------------------------------------------------------------------------------- /online-feature-store/pkg/infra/connection.go: -------------------------------------------------------------------------------- 1 | package infra 2 | 3 | type DBType string 4 | 5 | const ( 6 | DBTypeScylla DBType = "scylla" 7 | DBTypeRedisStandalone DBType = "standalone_redis" 8 | DBTypeRedisFailover DBType = "failover_redis" 9 | DBTypeRedisCluster DBType = "cluster_redis" 10 | DBTypeInMemory DBType = "in_memory" 11 | DBTypeP2P DBType = "p2p" 12 | activeConfIds = "ACTIVE_CONFIG_IDS" 13 | ) 14 | 15 | type ConnectionFacade interface { 16 | GetConn() (interface{}, error) 17 | GetMeta() (map[string]interface{}, error) 18 | IsLive() bool 19 | } 20 | 21 | type Connector interface { 22 | GetConnection(configId int) (ConnectionFacade, error) 23 | } 24 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/blocks/psdb_pool_bench_test.go: -------------------------------------------------------------------------------- 1 | package blocks 2 | 3 | import "testing" 4 | 5 | func BenchmarkGetPSDBPoolWithoutPool(b *testing.B) { 6 | _ = GetPSDBPool() 7 | b.ResetTimer() 8 | b.ReportAllocs() 9 | var psdb *PermStorageDataBlock 10 | for i := 0; i < b.N; i++ { 11 | psdb = &PermStorageDataBlock{} 12 | psdb.Clear() 13 | //psdb.Builder = &PermStorageDataBlockBuilder{psdb: psdb} 14 | } 15 | _ = psdb 16 | } 17 | 18 | func BenchmarkGetPSDBPoolWithPool(b *testing.B) { 19 | psdbPool := GetPSDBPool() 20 | b.ResetTimer() 21 | b.ReportAllocs() 22 | var psdb *PermStorageDataBlock 23 | for i := 0; i < b.N; i++ { 24 | psdb = psdbPool.Get() 25 | psdbPool.Put(psdb) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /docs/assets/js/a7bd4aaa.8da7b7a1.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7098],{1723:(n,e,s)=>{s.r(e),s.d(e,{default:()=>l});s(6540);var r=s(5500);function o(n,e){return`docs-${n}-${e}`}var t=s(3025),c=s(2831),i=s(1463),u=s(4848);function a(n){const{version:e}=n;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i.A,{version:e.version,tag:o(e.pluginId,e.version)}),(0,u.jsx)(r.be,{children:e.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function d(n){const{version:e,route:s}=n;return(0,u.jsx)(r.e3,{className:e.className,children:(0,u.jsx)(t.n,{version:e,children:(0,c.v)(s.routes)})})}function l(n){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...n}),(0,u.jsx)(d,{...n})]})}}}]); -------------------------------------------------------------------------------- /online-feature-store/internal/data/repositories/stores/scylla_internal_stub.go: -------------------------------------------------------------------------------- 1 | //go:build !meesho 2 | 3 | package stores 4 | 5 | import ( 6 | "fmt" 7 | 8 | "github.com/gocql/gocql" 9 | ) 10 | 11 | func getQueryV2(_ interface{}, _ string) (*gocql.Query, error) { 12 | return nil, fmt.Errorf("gocql_v2 not compiled: build with -tags meesho") 13 | } 14 | 15 | func retrieveV2(_ interface{}) ([]map[string]interface{}, error) { 16 | return nil, fmt.Errorf("gocql_v2 not compiled: build with -tags meesho") 17 | } 18 | 19 | func persistV2(_ interface{}) error { 20 | return fmt.Errorf("gocql_v2 not compiled: build with -tags meesho") 21 | } 22 | 23 | func bindV2(_ interface{}, _ []interface{}) interface{} { 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /docs/assets/js/72dc5b25.e57720a7.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8261],{3613:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"v1.0.0","description":"Python SDK v1.0.0 documentation for BharatML Stack. Contains API reference, usage guides, and examples for the Python client libraries including gRPC feature client, Spark feature push client, and common utilities.","slug":"/online-feature-store/v1.0.0","permalink":"/BharatMLStack/online-feature-store/v1.0.0","sidebar":"tutorialSidebar","navigation":{"previous":{"title":"Online Feature Store","permalink":"/BharatMLStack/category/online-feature-store"},"next":{"title":"Architecture","permalink":"/BharatMLStack/online-feature-store/v1.0.0/architecture"}}}}')}}]); -------------------------------------------------------------------------------- /horizon/pkg/infra/connection.go: -------------------------------------------------------------------------------- 1 | package infra 2 | 3 | type DBType string 4 | 5 | const ( 6 | DBTypeScylla DBType = "scylla" 7 | DBTypeMySQL DBType = "mysql" 8 | activeConfIds = "ACTIVE_CONFIG_IDS" 9 | DefaultSqlConfId = 2 10 | DefaultScyllaConfId = 1 11 | ) 12 | 13 | // ConnectionFacade is a common interface for all database connections 14 | type ConnectionFacade interface { 15 | // GetConn returns the database connection 16 | GetConn() (interface{}, error) 17 | 18 | // GetMeta returns metadata about the connection 19 | GetMeta() (map[string]interface{}, error) 20 | IsLive() bool 21 | } 22 | 23 | type Connector interface { 24 | GetConnection(configId int) (ConnectionFacade, error) 25 | } 26 | -------------------------------------------------------------------------------- /horizon/internal/middlewares/resolver/resolver_registry.go: -------------------------------------------------------------------------------- 1 | // middlewares/handler.go 2 | package resolver 3 | 4 | import ( 5 | "log" 6 | ) 7 | 8 | type Handler struct { 9 | ResolverRegistry map[string]Func 10 | } 11 | 12 | func NewHandler() (*Handler, error) { 13 | registry := make(map[string]Func) 14 | resolverList := []func() (ServiceResolver, error){ 15 | NewnumerixServiceResolver, 16 | } 17 | 18 | for _, rFn := range resolverList { 19 | resolver, err := rFn() 20 | if err != nil { 21 | log.Printf("error initializing resolver: %v", err) 22 | return nil, err 23 | } 24 | for k, v := range resolver.GetResolvers() { 25 | registry[k] = v 26 | } 27 | } 28 | return &Handler{ 29 | ResolverRegistry: registry, 30 | }, nil 31 | } 32 | -------------------------------------------------------------------------------- /helix-client/pkg/utils/slice_utils.go: -------------------------------------------------------------------------------- 1 | // Package util provides utility functions for handling slices and batching. 2 | 3 | package utils 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | // Batch is a generic function that batches elements of a list based on the specified batch size. 10 | // It takes a pointer to a slice and a batchSize, and returns a 2D slice of batches. 11 | func Batch[T any](in []T, batchSize int) ([][]T, error) { 12 | if batchSize <= 0 { 13 | return nil, errors.New("batch size must be greater than 0") 14 | } 15 | var batches [][]T 16 | for batchSize < len(in) { 17 | in, batches = in[batchSize:], append(batches, in[0:batchSize:batchSize]) 18 | } 19 | if len(in) > 0 { 20 | batches = append(batches, in) 21 | } 22 | return batches, nil 23 | } 24 | -------------------------------------------------------------------------------- /online-feature-store/internal/server/http/server.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "net/http" 5 | "sync" 6 | 7 | "github.com/gin-gonic/gin" 8 | "github.com/rs/zerolog/log" 9 | "github.com/spf13/viper" 10 | ) 11 | 12 | var ( 13 | router *gin.Engine 14 | once sync.Once 15 | ) 16 | 17 | func Init() { 18 | once.Do(func() { 19 | env := viper.GetString("APP_ENV") 20 | if env == "prod" || env == "production" { 21 | gin.SetMode(gin.ReleaseMode) 22 | } 23 | router = gin.New() 24 | router.GET("/health/self", func(c *gin.Context) { 25 | c.JSON(http.StatusOK, gin.H{"message": "true"}) 26 | }) 27 | }) 28 | } 29 | 30 | func Instance() *gin.Engine { 31 | if router == nil { 32 | log.Fatal().Msg("Router not initialized") 33 | } 34 | return router 35 | } 36 | -------------------------------------------------------------------------------- /trufflebox-ui/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | trufflebox-ui: 5 | build: 6 | context: . 7 | dockerfile: DockerFile 8 | args: 9 | - REACT_APP_API_URL=${REACT_APP_API_URL} 10 | - REACT_APP_BASE_URL=${REACT_APP_BASE_URL:-http://localhost:9090} 11 | - REACT_APP_HORIZON_BASE_URL=${REACT_APP_HORIZON_BASE_URL:-http://horizon.int.meesho.int} 12 | container_name: trufflebox-ui 13 | ports: 14 | - "9090:80" 15 | environment: 16 | - NODE_ENV=production 17 | - REACT_APP_API_URL=${REACT_APP_API_URL} 18 | - REACT_APP_BASE_URL=${REACT_APP_BASE_URL:-http://localhost:9090} 19 | - REACT_APP_HORIZON_BASE_URL=${REACT_APP_HORIZON_BASE_URL:-http://horizon.int.meesho.int} 20 | restart: unless-stopped -------------------------------------------------------------------------------- /cli-tools/.cursor/rules/global/golang/code-quality.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: "Guidelines for maintaining code quality, clarity, and consistency across imports, function usage, and documentation" 3 | globs: 4 | alwaysApply: false 5 | --- 6 | 7 | ### Import statements quality 8 | 1. Do not change the import order of existing import files and packages, just add the new ones 9 | 2. Avoid wild card imports 10 | 11 | ### Functions usage 12 | 1. Do not change the private functions to public unless we want other packages to use it 13 | 2. If the same package is using the function then keep it private 14 | 15 | ### Code comments and documentation 16 | 1. Add comments only when necessary, do not add comments when the code itself gives the understanding 17 | 2. Add comments for architectural decision 18 | -------------------------------------------------------------------------------- /online-feature-store/internal/consumer/listeners/models.go: -------------------------------------------------------------------------------- 1 | package listeners 2 | 3 | type FeatureDataEvent struct { 4 | TimeStamp int64 `json:"timestamp"` 5 | EntityLabel string `json:"entity_label"` 6 | KeysSchema []string `json:"keys_schema"` 7 | FeatureGroupSchema []FeatureGroup `json:"feature_group_schema"` 8 | Value []Value `json:"value"` 9 | } 10 | 11 | type FeatureGroup struct { 12 | Label string `json:"label"` 13 | FeatureLabels []string `json:"feature_labels"` 14 | } 15 | 16 | type FeatureValue struct { 17 | Values []string `json:"values"` 18 | } 19 | 20 | type Value struct { 21 | KeyValues []string `json:"key_values"` 22 | FeatureValues []FeatureValue `json:"feature_values"` 23 | } 24 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/blocks/psdb_pool.go: -------------------------------------------------------------------------------- 1 | package blocks 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | var ( 8 | pooledPSDB = newPSDBPool() 9 | ) 10 | 11 | func GetPSDBPool() *PSDBPool { 12 | return pooledPSDB 13 | } 14 | 15 | type PSDBPool struct { 16 | pool sync.Pool 17 | } 18 | 19 | func newPSDBPool() *PSDBPool { 20 | return &PSDBPool{ 21 | pool: sync.Pool{ 22 | New: func() interface{} { 23 | psdb := &PermStorageDataBlock{} 24 | psdb.Builder = &PermStorageDataBlockBuilder{psdb: psdb} 25 | return psdb 26 | }, 27 | }, 28 | } 29 | } 30 | 31 | func (p *PSDBPool) Get() *PermStorageDataBlock { 32 | return p.pool.Get().(*PermStorageDataBlock) 33 | } 34 | 35 | func (p *PSDBPool) Put(b *PermStorageDataBlock) { 36 | b.Clear() 37 | p.pool.Put(b) 38 | } 39 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/token/table.go: -------------------------------------------------------------------------------- 1 | package token 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | "time" 6 | ) 7 | 8 | const ( 9 | tokenTableName = "user_tokens" 10 | tokenCreatedAt = "created_at" 11 | tokenExpiresAt = "expires_at" 12 | ) 13 | 14 | // Token represents the structure of the user_tokens table. 15 | type Token struct { 16 | ID uint `gorm:"primaryKey;autoIncrement"` 17 | UserEmail string `gorm:"not null"` 18 | Token string `gorm:"unique;not null"` 19 | CreatedAt time.Time `gorm:"not null"` 20 | ExpiresAt time.Time `gorm:"not null"` 21 | } 22 | 23 | func (Token) TableName() string { 24 | return tokenTableName 25 | } 26 | 27 | func (Token) BeforeCreate(tx *gorm.DB) (err error) { 28 | tx.Statement.SetColumn(tokenCreatedAt, time.Now()) 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/apiresolver/table.go: -------------------------------------------------------------------------------- 1 | package apiresolver 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | "time" 6 | ) 7 | 8 | const ( 9 | apiResolversTable = "api_resolvers" 10 | ) 11 | 12 | type ApiResolver struct { 13 | ID uint `gorm:"primaryKey;autoIncrement"` 14 | Method string `gorm:"not null"` 15 | ApiPath string `gorm:"not null"` 16 | ResolverFn string `gorm:"not null"` 17 | CreatedAt time.Time 18 | UpdatedAt time.Time 19 | } 20 | 21 | func (ApiResolver) TableName() string { 22 | return apiResolversTable 23 | } 24 | 25 | func (r ApiResolver) BeforeCreate(tx *gorm.DB) (err error) { 26 | tx.Statement.SetColumn("CreatedAt", time.Now()) 27 | return 28 | } 29 | 30 | func (r ApiResolver) BeforeUpdate(tx *gorm.DB) (err error) { 31 | tx.Statement.SetColumn("UpdatedAt", time.Now()) 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /online-feature-store/examples/sample-data/persist-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity_label": "user", 3 | "keys_schema": ["user_id"], 4 | "feature_groups": [ 5 | { 6 | "label": "user_features", 7 | "feature_labels": ["age", "location", "subscription_type"] 8 | } 9 | ], 10 | "data": [ 11 | { 12 | "key_values": ["user_123"], 13 | "feature_values": [ 14 | { 15 | "values": { 16 | "int32_values": [28], 17 | "string_values": ["NYC", "premium"] 18 | } 19 | } 20 | ] 21 | }, 22 | { 23 | "key_values": ["user_456"], 24 | "feature_values": [ 25 | { 26 | "values": { 27 | "int32_values": [35], 28 | "string_values": ["SF", "basic"] 29 | } 30 | } 31 | ] 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/numerix/unaryops/table.go: -------------------------------------------------------------------------------- 1 | package unaryops 2 | 3 | import ( 4 | "time" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const ( 10 | tableName = "numerix_unary_ops" 11 | createdAt = "CreatedAt" 12 | updatedAt = "UpdatedAt" 13 | ) 14 | 15 | type Table struct { 16 | ID uint `gorm:"primaryKey;autoIncrement"` 17 | Operator string `gorm:"not null"` 18 | Parameters uint `gorm:"not null"` 19 | CreatedAt time.Time `gorm:"not null"` 20 | UpdatedAt time.Time 21 | } 22 | 23 | func (Table) TableName() string { 24 | return tableName 25 | } 26 | 27 | func (Table) BeforeCreate(tx *gorm.DB) (err error) { 28 | tx.Statement.SetColumn(createdAt, time.Now()) 29 | return 30 | } 31 | 32 | func (Table) BeforeUpdate(tx *gorm.DB) (err error) { 33 | tx.Statement.SetColumn(updatedAt, time.Now()) 34 | return 35 | } 36 | -------------------------------------------------------------------------------- /helix-client/pkg/middleware/grpcrecovery.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "context" 5 | "github.com/rs/zerolog/log" 6 | "google.golang.org/grpc" 7 | "google.golang.org/grpc/codes" 8 | "google.golang.org/grpc/status" 9 | "runtime/debug" 10 | ) 11 | 12 | // GRPCRecovery handles context errors/panics and sets response code accordingly 13 | func GRPCRecovery(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { 14 | defer func() { 15 | if r := recover(); r != nil { 16 | // Recover from panic and create a gRPC error 17 | log.Error().Msgf("Panic occurred in method %s: %v\n%s", info.FullMethod, r, debug.Stack()) 18 | err = status.Errorf(codes.Internal, "panic recovered: %v", r) 19 | } 20 | }() 21 | resp, err = handler(ctx, req) 22 | 23 | return resp, err 24 | } 25 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/numerix/binaryops/table.go: -------------------------------------------------------------------------------- 1 | package binaryops 2 | 3 | import ( 4 | "time" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const ( 10 | tableName = "numerix_binary_ops" 11 | createdAt = "CreatedAt" 12 | updatedAt = "UpdatedAt" 13 | ) 14 | 15 | type Table struct { 16 | ID uint `gorm:"primaryKey;autoIncrement"` 17 | Operator string `gorm:"not null"` 18 | Precedence uint `gorm:"not null"` 19 | CreatedAt time.Time `gorm:"not null"` 20 | UpdatedAt time.Time 21 | } 22 | 23 | func (Table) TableName() string { 24 | return tableName 25 | } 26 | 27 | func (Table) BeforeCreate(tx *gorm.DB) (err error) { 28 | tx.Statement.SetColumn(createdAt, time.Now()) 29 | return 30 | } 31 | 32 | func (Table) BeforeUpdate(tx *gorm.DB) (err error) { 33 | tx.Statement.SetColumn(updatedAt, time.Now()) 34 | return 35 | } 36 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/repositories/stores/store.go: -------------------------------------------------------------------------------- 1 | package stores 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/online-feature-store/internal/data/blocks" 5 | "github.com/Meesho/BharatMLStack/online-feature-store/internal/data/models" 6 | ) 7 | 8 | const ( 9 | StoreTypeRedis = "redis" 10 | StoreTypeScylla = "scylla" 11 | ) 12 | 13 | type Store interface { 14 | PersistV2(storeId string, entityLabel string, pkMap map[string]string, fgIdToPsDb map[int]*blocks.PermStorageDataBlock) error 15 | RetrieveV2(entityLabel string, pkMap map[string]string, fgIds []int) (map[int]*blocks.DeserializedPSDB, error) 16 | BatchPersistV2(storeId string, entityLabel string, rows []models.Row) error 17 | BatchRetrieveV2(entityLabel string, pkMaps []map[string]string, fgIds []int) ([]map[int]*blocks.DeserializedPSDB, error) 18 | Type() string 19 | } 20 | -------------------------------------------------------------------------------- /online-feature-store/pkg/proto/p2p.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package p2p; 3 | option go_package = "../p2p"; 4 | 5 | message Query { 6 | string entity_label = 1; 7 | } 8 | 9 | message CacheQuery { 10 | string entity_label = 1; 11 | repeated string keys = 2; 12 | } 13 | 14 | message CacheKeyValue { 15 | string entity_label = 1; 16 | map key_value = 2; 17 | } 18 | 19 | message ClusterTopology { 20 | map ring_topology = 1; 21 | map cluster_members = 2; 22 | } 23 | 24 | message PodData { 25 | string node_ip = 1; 26 | string pod_ip = 2; 27 | } 28 | 29 | service P2PCacheService { 30 | rpc GetClusterConfigs(Query) returns (ClusterTopology) {}; 31 | rpc GetP2PCacheValues(CacheQuery) returns (CacheKeyValue) {}; 32 | rpc SetP2PCacheValues(CacheKeyValue) returns (CacheKeyValue) {}; 33 | } 34 | -------------------------------------------------------------------------------- /quick-start/db-init/scripts/wait-for-services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # Wait for ports to be ready 6 | wait_for_port() { 7 | local name=$1 8 | local host=$2 9 | local port=$3 10 | 11 | echo -n " Waiting for $name on $host:$port... " 12 | while ! nc -z "$host" "$port"; do 13 | sleep 1 14 | done 15 | echo "✅" 16 | } 17 | 18 | echo "⏳ Waiting for infrastructure services to be ready..." 19 | 20 | wait_for_port "ScyllaDB" "scylla" 9042 21 | wait_for_port "MySQL" "mysql" 3306 22 | wait_for_port "Redis" "redis" 6379 23 | wait_for_port "etcd" "etcd" 2379 24 | 25 | # Wait for ScyllaDB CQL to be fully ready 26 | echo -n " Waiting for ScyllaDB CQL service to be ready... " 27 | until cqlsh scylla 9042 -e "SELECT now() FROM system.local" > /dev/null 2>&1; do 28 | sleep 2 29 | done 30 | echo "✅" 31 | 32 | echo "✅ All infrastructure services are ready!" -------------------------------------------------------------------------------- /horizon/internal/auth/router/router.go: -------------------------------------------------------------------------------- 1 | package router 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/horizon/internal/auth/controller" 5 | "github.com/Meesho/BharatMLStack/horizon/pkg/httpframework" 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | // Init expects http framework to be initialized before calling this function 10 | func Init() { 11 | api := httpframework.Instance().Group("/") 12 | { 13 | api.POST("/register", controller.NewController().Register) 14 | api.POST("/login", controller.NewController().Login) 15 | api.POST("/logout", controller.NewController().Logout) 16 | api.GET("/users", controller.NewController().GetAllUsers) 17 | api.PUT("/update-user", controller.NewController().UpdateUserAccessAndRole) 18 | api.GET("/health", Health) 19 | } 20 | } 21 | 22 | func Health(c *gin.Context) { 23 | c.JSON(200, gin.H{"message": "Application is up!!!"}) 24 | } 25 | -------------------------------------------------------------------------------- /horizon/internal/numerix/handler/config.go: -------------------------------------------------------------------------------- 1 | package handler 2 | 3 | type Config interface { 4 | Onboard(OnboardConfigRequest) (Response, error) 5 | Promote(PromoteConfigRequest) (Response, error) 6 | GetAll() (GetAllConfigsResponse, error) 7 | GetExpressionVariables(ExpressionVariablesRequest) (ExpressionVariablesResponse, error) 8 | ReviewRequest(ReviewRequestConfigRequest) (Response, error) 9 | Edit(EditConfigRequest) (Response, error) 10 | CancelRequest(CancelConfigRequest) (Response, error) 11 | GetAllRequests(GetAllRequestConfigsRequest) (GetAllRequestConfigsResponse, error) 12 | GenerateFuncitonalTestRequest(RequestGenerationRequest) (FuncitonalRequestGenerationResponse, error) 13 | ExecuteFuncitonalTestRequest(ExecuteRequestFunctionalRequest) (ExecuteRequestFunctionalResponse, error) 14 | GetBinaryOps() (GetBinaryOpsResponse, error) 15 | GetUnaryOps() (GetUnaryOpsResponse, error) 16 | } 17 | -------------------------------------------------------------------------------- /horizon/pkg/grpc/grpc.go: -------------------------------------------------------------------------------- 1 | package grpc 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/rs/zerolog/log" 7 | "google.golang.org/grpc" 8 | "google.golang.org/grpc/credentials/insecure" 9 | "google.golang.org/grpc/metadata" 10 | "google.golang.org/protobuf/proto" 11 | ) 12 | 13 | func GetConnection(host string) (*grpc.ClientConn, error) { 14 | conn, err := grpc.NewClient(host, grpc.WithTransportCredentials(insecure.NewCredentials())) 15 | if err != nil { 16 | log.Error().Msg("Unable to create client connection GRPC") 17 | return nil, err 18 | } 19 | return conn, nil 20 | } 21 | 22 | func SendGRPCRequest(ctx context.Context, conn *grpc.ClientConn, method string, req proto.Message, resp proto.Message, md metadata.MD, opts ...grpc.CallOption) error { 23 | if md != nil { 24 | ctx = metadata.NewOutgoingContext(ctx, md) 25 | } 26 | return conn.Invoke(ctx, method, req, resp, opts...) 27 | } 28 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/rolepermission/table.go: -------------------------------------------------------------------------------- 1 | package rolepermission 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | "time" 6 | ) 7 | 8 | const ( 9 | rolePermissionTable = "role_permission" 10 | ) 11 | 12 | type RolePermission struct { 13 | ID uint `gorm:"primaryKey;autoIncrement"` 14 | Role string `gorm:"not null"` 15 | Service string `gorm:"not null"` 16 | ScreenType string `gorm:"not null"` 17 | Module string `gorm:"not null"` 18 | CreatedAt time.Time 19 | UpdatedAt time.Time 20 | } 21 | 22 | func (RolePermission) TableName() string { 23 | return rolePermissionTable 24 | } 25 | 26 | func (r RolePermission) BeforeCreate(tx *gorm.DB) (err error) { 27 | tx.Statement.SetColumn("CreatedAt", time.Now()) 28 | return 29 | } 30 | 31 | func (r RolePermission) BeforeUpdate(tx *gorm.DB) (err error) { 32 | tx.Statement.SetColumn("UpdatedAt", time.Now()) 33 | return 34 | } 35 | -------------------------------------------------------------------------------- /quick-start/db-init/scripts/main-init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo "🗄️ BharatML Stack Database Initialization Starting..." 6 | echo "==================================================" 7 | 8 | # Wait for all services to be ready 9 | echo "🔍 Step 1: Waiting for infrastructure services..." 10 | ./wait-for-services.sh 11 | 12 | # Initialize ScyllaDB 13 | echo "" 14 | echo "🗃️ Step 2: Initializing ScyllaDB..." 15 | ./init-scylla.sh 16 | 17 | # Initialize MySQL 18 | echo "" 19 | echo "🗂️ Step 3: Initializing MySQL..." 20 | ./init-mysql.sh 21 | 22 | # Initialize etcd 23 | echo "" 24 | echo "🔧 Step 4: Initializing etcd..." 25 | ./init-etcd.sh 26 | 27 | # Verify initialization 28 | echo "" 29 | echo "✅ Step 5: Verifying initialization..." 30 | ./verify-init.sh 31 | 32 | echo "" 33 | echo "🎉 Database initialization completed successfully!" 34 | echo "==================================================" -------------------------------------------------------------------------------- /horizon/pkg/middleware/httprecovery.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "fmt" 5 | "runtime/debug" 6 | 7 | "github.com/Meesho/BharatMLStack/horizon/pkg/api" 8 | "github.com/gin-gonic/gin" 9 | "github.com/rs/zerolog/log" 10 | ) 11 | 12 | // HTTPRecovery handles context errors/panics and sets response code accordingly 13 | func HTTPRecovery() gin.HandlerFunc { 14 | return func(c *gin.Context) { 15 | defer func() { 16 | if len(c.Errors) > 0 { 17 | err := c.Errors.Last().Err 18 | if apiErr, ok := err.(*api.Error); ok { 19 | c.JSON(apiErr.StatusCode, gin.H{"error": apiErr.Message}) 20 | c.Abort() 21 | } 22 | } 23 | if err := recover(); err != nil { 24 | log.Error().Msgf("Panic occurred: %v\n%s", err, debug.Stack()) 25 | errorMsg := fmt.Sprintf("%v", err) 26 | c.JSON(500, gin.H{"error": errorMsg}) 27 | c.Abort() 28 | } 29 | }() 30 | c.Next() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /quick-start/db-init/scripts/init-etcd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo "🔧 Initializing etcd..." 6 | 7 | # Create configuration key 8 | echo " 📋 Creating /config/onfs configuration key..." 9 | etcdctl --endpoints=http://etcd:2379 put /config/onfs "{}" 10 | 11 | echo " 📋 Creating /reader keys..." 12 | etcdctl --endpoints=http://etcd:2379 put /config/onfs/security/reader/test "{\"token\":\"test\"}" 13 | 14 | echo " 📋 Creating /config/numerix configuration key..." 15 | etcdctl --endpoints=http://etcd:2379 put /config/numerix/expression-config/1 "{\"expression\":\"a b c * *\"}" 16 | 17 | # Verify etcd initialization 18 | echo " 🔍 Verifying etcd configuration..." 19 | if etcdctl --endpoints=http://etcd:2379 get /config/onfs > /dev/null 2>&1; then 20 | echo " ✅ etcd configuration key '/config/onfs' created successfully" 21 | else 22 | echo " ❌ Failed to create etcd configuration key" 23 | exit 1 24 | fi -------------------------------------------------------------------------------- /helix-client/pkg/middleware/httprecovery.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "fmt" 5 | "runtime/debug" 6 | 7 | "github.com/Meesho/BharatMLStack/helix-client/pkg/api" 8 | "github.com/gin-gonic/gin" 9 | "github.com/rs/zerolog/log" 10 | ) 11 | 12 | // HTTPRecovery handles context errors/panics and sets response code accordingly 13 | func HTTPRecovery() gin.HandlerFunc { 14 | return func(c *gin.Context) { 15 | defer func() { 16 | if len(c.Errors) > 0 { 17 | err := c.Errors.Last().Err 18 | if apiErr, ok := err.(*api.Error); ok { 19 | c.JSON(apiErr.StatusCode, gin.H{"error": apiErr.Message}) 20 | c.Abort() 21 | } 22 | } 23 | if err := recover(); err != nil { 24 | log.Error().Msgf("Panic occurred: %v\n%s", err, debug.Stack()) 25 | errorMsg := fmt.Sprintf("%v", err) 26 | c.JSON(500, gin.H{"error": errorMsg}) 27 | c.Abort() 28 | } 29 | }() 30 | c.Next() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐞 Bug Report 3 | about: Create a report to help us improve BharatMLStack 4 | title: "[BUG] " 5 | labels: ["bug"] 6 | assignees: [] 7 | --- 8 | 9 | ## 🐛 Describe the bug 10 | 11 | A clear and concise description of what the bug is. 12 | 13 | --- 14 | 15 | ## 🔁 To Reproduce 16 | 17 | Steps to reproduce the behavior: 18 | 1. Go to '...' 19 | 2. Click on '...' 20 | 3. Scroll to '...' 21 | 4. See the error 22 | 23 | --- 24 | 25 | ## ✅ Expected behavior 26 | 27 | What did you expect to happen instead? 28 | 29 | --- 30 | 31 | ## 🖼️ Screenshots 32 | 33 | If applicable, add screenshots to help explain your problem. 34 | 35 | --- 36 | 37 | ## 💻 Image Details 38 | 39 | - module: - version: 40 | 41 | --- 42 | 43 | ## 🧩 Additional context 44 | 45 | Add any other context (logs, configs, stack traces) about the problem here. 46 | -------------------------------------------------------------------------------- /numerix/Dockerfile: -------------------------------------------------------------------------------- 1 | # Stage 1: Build the Rust binary 2 | FROM rust:1.80-bullseye AS builder 3 | 4 | ARG TARGETOS 5 | ARG TARGETARCH 6 | 7 | # Install protobuf compiler 8 | RUN apt-get update && apt-get install -y \ 9 | protobuf-compiler \ 10 | && rm -rf /var/lib/apt/lists/* 11 | 12 | WORKDIR /app 13 | 14 | # Copy manifests 15 | COPY Cargo.toml Cargo.lock ./ 16 | 17 | # Create a dummy main to cache dependencies 18 | RUN mkdir src && echo "fn main() {}" > src/main.rs 19 | RUN cargo build --release 20 | RUN rm -rf src 21 | 22 | # Copy source code 23 | COPY . . 24 | 25 | # Remove the dummy build artifacts and build the real binary 26 | RUN rm -rf target/release/deps/numerix* 27 | RUN cargo build --release 28 | 29 | # Stage 2: Minimal distroless runtime 30 | FROM gcr.io/distroless/cc:nonroot 31 | 32 | WORKDIR / 33 | 34 | COPY --from=builder /app/target/release/numerix . 35 | 36 | EXPOSE 8082 37 | 38 | ENTRYPOINT ["/numerix"] -------------------------------------------------------------------------------- /online-feature-store/pkg/p2pcache/clustermanager/cluster_manager.go: -------------------------------------------------------------------------------- 1 | package clustermanager 2 | 3 | import ( 4 | "crypto/sha1" 5 | "encoding/hex" 6 | "fmt" 7 | ) 8 | 9 | const ( 10 | envPodIP = "POD_IP" 11 | envNodeIP = "NODE_IP" 12 | ) 13 | 14 | type ClusterTopology struct { 15 | RingTopology map[uint32]string 16 | ClusterMembers map[string]PodData 17 | } 18 | 19 | type PodData struct { 20 | NodeIP string 21 | PodIP string 22 | } 23 | 24 | func (p *PodData) GetUniqueId() string { 25 | key := fmt.Sprintf("%s-%s", p.NodeIP, p.PodIP) 26 | hash := sha1.Sum([]byte(key)) 27 | return hex.EncodeToString(hash[:]) 28 | } 29 | 30 | type ClusterManager interface { 31 | GetPodIdToKeysMap(keys []string) map[string][]string 32 | GetPodIdForKey(key string) string 33 | GetCurrentPodId() string 34 | GetPodDataForPodId(podId string) (*PodData, error) 35 | GetClusterTopology() ClusterTopology 36 | LeaveCluster() error 37 | } 38 | -------------------------------------------------------------------------------- /helix-client/pkg/clients/numerix/models.go: -------------------------------------------------------------------------------- 1 | package numerix 2 | 3 | import "github.com/Meesho/BharatMLStack/helix-client/pkg/clients/numerix/client/grpc" 4 | 5 | type NumerixRequest struct { 6 | EntityScoreData EntityScoreData `json:"entity_score_data"` 7 | } 8 | 9 | type EntityScoreData struct { 10 | Schema []string `json:"schema"` 11 | Data [][][]byte `json:"data"` 12 | StringData [][]string `json:"string_data"` 13 | ComputeID string `json:"compute_id"` 14 | DataType string `json:"data_type"` 15 | } 16 | 17 | type NumerixResponse struct { 18 | ComputationScoreData ComputationScoreData `json:"computation_score_data"` 19 | } 20 | 21 | type ComputationScoreData struct { 22 | Schema []string `json:"schema"` 23 | Data [][][]byte `json:"data"` 24 | StringData [][]string `json:"string_data"` 25 | } 26 | 27 | type NumerixRequestWrapper struct { 28 | RequestProto *grpc.NumerixRequestProto 29 | } 30 | -------------------------------------------------------------------------------- /trufflebox-ui/src/hooks/useFormatDate.jsx: -------------------------------------------------------------------------------- 1 | import { useCallback } from 'react'; 2 | 3 | /** 4 | * Custom hook that provides date formatting utilities 5 | * @returns {Object} Date formatting functions 6 | */ 7 | const useFormatDate = () => { 8 | /** 9 | * Converts UTC date string to IST format 10 | * @param {string} utcDateString - Date string in UTC format 11 | * @returns {string} Formatted date string in IST 12 | */ 13 | const formatDateToIST = useCallback((utcDateString) => { 14 | if (!utcDateString) return ""; 15 | const date = new Date(utcDateString); 16 | return date.toLocaleString('en-IN', { 17 | timeZone: 'Asia/Kolkata', 18 | day: '2-digit', 19 | month: 'short', 20 | year: 'numeric', 21 | hour: '2-digit', 22 | minute: '2-digit', 23 | hour12: true 24 | }); 25 | }, []); 26 | 27 | return { 28 | formatDateToIST 29 | }; 30 | }; 31 | 32 | export default useFormatDate; -------------------------------------------------------------------------------- /docs-src/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. 4 | 5 | ## Installation 6 | 7 | ```bash 8 | yarn 9 | ``` 10 | 11 | ## Local Development 12 | 13 | ```bash 14 | yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ## Build 20 | 21 | ```bash 22 | yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ## Deployment 28 | 29 | Using SSH: 30 | 31 | ```bash 32 | USE_SSH=true yarn deploy 33 | ``` 34 | 35 | Not using SSH: 36 | 37 | ```bash 38 | GIT_USER= yarn deploy 39 | ``` 40 | 41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: ✨ Feature Request 3 | about: Suggest an idea or improvement for BharatMLStack 4 | title: "[FEAT] " 5 | labels: ["enhancement"] 6 | assignees: [] 7 | --- 8 | 9 | ## ✨ Describe the feature 10 | 11 | What functionality do you want to add or improve? 12 | 13 | --- 14 | 15 | ## 🧩 Module(s) impacted 16 | 17 | - [ ] `horizon` (Real-time infra / networking) 18 | - [ ] `online-feature-store` (ML infra) 19 | - [ ] `trufflebox-ui` (Admin / UI) 20 | - [ ] `infra` (CI/CD, deployment, etc.) 21 | - [ ] Other: `___________` 22 | 23 | --- 24 | 25 | ## 🚀 Motivation 26 | 27 | Why is this feature valuable? How does it help developers or users? 28 | 29 | --- 30 | 31 | ## 🧪 Acceptance Criteria 32 | 33 | What must be true for this feature to be considered "done"? 34 | 35 | --- 36 | 37 | ## 📎 Additional context 38 | 39 | Any screenshots, diagrams, references to similar features, or technical constraints. 40 | -------------------------------------------------------------------------------- /online-feature-store/cmd/api-server/DockerFile: -------------------------------------------------------------------------------- 1 | # Stage 1: Build the Go binary 2 | FROM golang:1.24.4-bullseye AS builder 3 | 4 | ARG TARGETOS 5 | ARG TARGETARCH 6 | ENV CGO_ENABLED=1 \ 7 | GOOS=${TARGETOS} \ 8 | GOARCH=${TARGETARCH} 9 | 10 | # Install build dependencies for cgo 11 | RUN apt-get update && \ 12 | apt-get install -y --no-install-recommends \ 13 | gcc libc6-dev && \ 14 | rm -rf /var/lib/apt/lists/* 15 | 16 | WORKDIR /app 17 | 18 | COPY go.mod go.sum ./ 19 | RUN go mod download 20 | 21 | COPY . . 22 | 23 | # Build from your main package 24 | RUN go build -o online-feature-store-grpc-api-server ./cmd/api-server/main.go 25 | 26 | # Final image using distroless (only works if all assets are statically linked) 27 | FROM gcr.io/distroless/base-debian12:nonroot 28 | 29 | WORKDIR / 30 | 31 | COPY --from=builder /app/online-feature-store-grpc-api-server . 32 | 33 | EXPOSE 8089 34 | ENTRYPOINT ["/online-feature-store-grpc-api-server"] 35 | -------------------------------------------------------------------------------- /online-feature-store/cmd/consumer/DockerFile: -------------------------------------------------------------------------------- 1 | # Stage 1: Build the Go binary 2 | FROM golang:1.24.4-bullseye AS builder 3 | 4 | ARG TARGETOS 5 | ARG TARGETARCH 6 | ENV CGO_ENABLED=1 \ 7 | GOOS=${TARGETOS} \ 8 | GOARCH=${TARGETARCH} 9 | 10 | # Install build dependencies for cgo 11 | RUN apt-get update && \ 12 | apt-get install -y --no-install-recommends \ 13 | gcc libc6-dev && \ 14 | rm -rf /var/lib/apt/lists/* 15 | 16 | WORKDIR /app 17 | 18 | COPY go.mod go.sum ./ 19 | RUN go mod download 20 | 21 | COPY . . 22 | 23 | # Build the binary for the consumer 24 | RUN go build -o online-feature-store-consumer ./cmd/consumer/main.go 25 | 26 | # Stage 2: Minimal runtime image 27 | FROM gcr.io/distroless/base-debian12:nonroot 28 | 29 | WORKDIR / 30 | 31 | # Copy only the binary from builder 32 | COPY --from=builder /app/online-feature-store-consumer . 33 | 34 | # Run the consumer 35 | EXPOSE 8080 8090 36 | ENTRYPOINT ["/online-feature-store-consumer"] 37 | 38 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/store/table.go: -------------------------------------------------------------------------------- 1 | package store 2 | 3 | import ( 4 | "time" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const ( 10 | tableName = "store" 11 | createdAt = "CreatedAt" 12 | updatedAt = "UpdatedAt" 13 | ) 14 | 15 | type Table struct { 16 | RequestId uint `gorm:"primaryKey;autoIncrement"` 17 | Payload string `gorm:"not null"` 18 | CreatedBy string `gorm:"not null"` 19 | ApprovedBy string `gorm:"not null"` 20 | Status string `gorm:"not null"` 21 | Service string `gorm:"not null"` 22 | RejectReason string `gorm:"not null"` 23 | CreatedAt time.Time 24 | UpdatedAt time.Time 25 | } 26 | 27 | func (Table) TableName() string { 28 | return tableName 29 | } 30 | 31 | func (Table) BeforeCreate(tx *gorm.DB) (err error) { 32 | tx.Statement.SetColumn(createdAt, time.Now()) 33 | return 34 | } 35 | 36 | func (Table) BeforeUpdate(tx *gorm.DB) (err error) { 37 | tx.Statement.SetColumn(updatedAt, time.Now()) 38 | return 39 | } 40 | -------------------------------------------------------------------------------- /online-feature-store/pkg/ds/sync_map.go: -------------------------------------------------------------------------------- 1 | package ds 2 | 3 | import "sync" 4 | 5 | type SyncMap[K comparable, V any] struct { 6 | rw sync.RWMutex 7 | Map map[K]V 8 | } 9 | 10 | func NewSyncMap[K comparable, V any]() *SyncMap[K, V] { 11 | return &SyncMap[K, V]{ 12 | Map: make(map[K]V), 13 | } 14 | } 15 | 16 | func (sm *SyncMap[K, V]) Set(key K, value V) { 17 | sm.rw.Lock() 18 | defer sm.rw.Unlock() 19 | sm.Map[key] = value 20 | } 21 | 22 | func (sm *SyncMap[K, V]) Get(key K) (V, bool) { 23 | sm.rw.RLock() 24 | defer sm.rw.RUnlock() 25 | value, ok := sm.Map[key] 26 | return value, ok 27 | } 28 | 29 | func (sm *SyncMap[K, V]) DeleteIf(cond func(K, V) bool) { 30 | sm.rw.RLock() 31 | var keys []K 32 | for k, v := range sm.Map { 33 | if cond(k, v) { 34 | keys = append(keys, k) 35 | } 36 | } 37 | sm.rw.RUnlock() 38 | 39 | if len(keys) == 0 { 40 | return 41 | } 42 | sm.rw.Lock() 43 | for _, k := range keys { 44 | delete(sm.Map, k) 45 | } 46 | sm.rw.Unlock() 47 | } 48 | -------------------------------------------------------------------------------- /docs-src/blog/authors.yml: -------------------------------------------------------------------------------- 1 | adarsha: 2 | name: Adarsha Das 3 | title: Senior Architect @ Meesho 4 | url: https://github.com/a0d00kc 5 | image_url: https://github.com/a0d00kc.png 6 | aditya: 7 | name: Aditya Kumar 8 | title: SDE-III @ Meesho 9 | url: https://github.com/Adit2607 10 | image_url: https://github.com/Adit2607.png 11 | jigar: 12 | name: Jigar Dave 13 | title: SDE-IV @ Meesho 14 | url: https://github.com/jigarpatel26 15 | image_url: https://github.com/jigarpatel26.png 16 | jaya: 17 | name: Jaya Kumar 18 | title: MLE-III @ Meesho 19 | url: https://github.com/jayakommuru 20 | image_url: https://github.com/jayakommuru.png 21 | bhawani: 22 | name: Bhawani Singh 23 | title: SDE-IV @ Meesho 24 | url: https://github.com/singh-bhawani 25 | image_url: https://github.com/singh-bhawani.png 26 | mohit: 27 | name: Mohit Kumar 28 | title: SDE-III @ Meesho 29 | url: https://github.com/kmohit00 30 | image_url: https://github.com/kmohit00.png 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /helix-client/pkg/clients/predator/init.go: -------------------------------------------------------------------------------- 1 | package predator 2 | 3 | import ( 4 | "sync" 5 | 6 | "github.com/rs/zerolog/log" 7 | ) 8 | 9 | const ( 10 | Version1 = 1 11 | ) 12 | 13 | var ( 14 | registry = make(map[int]Client) 15 | onceMap = make(map[int]*sync.Once) 16 | ) 17 | 18 | // It panics if the client is already initialised 19 | func InitClient(version int, conf *Config) Client { 20 | // Ensure a `sync.Once` instance exists for the given version 21 | if _, exists := onceMap[version]; !exists { 22 | onceMap[version] = &sync.Once{} 23 | } 24 | 25 | onceMap[version].Do(func() { 26 | if registry[version] != nil { 27 | log.Panic().Msgf("Client for version %d already initialised", version) 28 | } 29 | registry[version] = NewClientV1(conf) 30 | }) 31 | return registry[version] 32 | } 33 | 34 | func GetInstance(version int) Client { 35 | if registry[version] == nil { 36 | log.Panic().Msgf("Client for version %d not initialised", version) 37 | } 38 | return registry[version] 39 | } 40 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/auth/table.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | import ( 4 | "time" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const ( 10 | tableName = "users" 11 | createdAt = "CreatedAt" 12 | updatedAt = "UpdatedAt" 13 | ) 14 | 15 | type User struct { 16 | ID uint `gorm:"primaryKey;autoIncrement"` 17 | FirstName string `gorm:"not null"` 18 | LastName string `gorm:"not null"` 19 | Email string `gorm:"unique;not null"` 20 | PasswordHash string `gorm:"not null"` 21 | Role string `gorm:"not null;default:user"` 22 | IsActive bool `gorm:"not null;default:false"` 23 | CreatedAt time.Time 24 | UpdatedAt time.Time 25 | } 26 | 27 | func (User) TableName() string { 28 | return tableName 29 | } 30 | 31 | func (User) BeforeCreate(tx *gorm.DB) (err error) { 32 | tx.Statement.SetColumn(createdAt, time.Now()) 33 | return 34 | } 35 | 36 | func (User) BeforeUpdate(tx *gorm.DB) (err error) { 37 | tx.Statement.SetColumn(updatedAt, time.Now()) 38 | return 39 | } 40 | -------------------------------------------------------------------------------- /docs-src/sidebars.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) 4 | 5 | /** 6 | * Creating a sidebar enables you to: 7 | - create an ordered group of docs 8 | - render a sidebar for each doc of that group 9 | - provide next/previous navigation 10 | 11 | The sidebars can be generated from the filesystem, or explicitly defined here. 12 | 13 | Create as many sidebars as you want. 14 | 15 | @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} 16 | */ 17 | const sidebars = { 18 | // By default, Docusaurus generates a sidebar from the docs folder structure 19 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 20 | 21 | // But you can create a sidebar manually 22 | /* 23 | tutorialSidebar: [ 24 | 'intro', 25 | 'hello', 26 | { 27 | type: 'category', 28 | label: 'Tutorial', 29 | items: ['tutorial-basics/create-a-document'], 30 | }, 31 | ], 32 | */ 33 | }; 34 | 35 | export default sidebars; 36 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/job/table.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | "time" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const ( 10 | tableName = "job" 11 | createdAt = "CreatedAt" 12 | updatedAt = "UpdatedAt" 13 | ) 14 | 15 | type Table struct { 16 | RequestId uint `gorm:"primaryKey;autoIncrement"` 17 | JobId string `gorm:"not null"` 18 | Payload string `gorm:"not null"` 19 | CreatedBy string `gorm:"not null"` 20 | ApprovedBy string `gorm:"not null"` 21 | Status string `gorm:"not null"` 22 | Service string `gorm:"not null"` 23 | RejectReason string `gorm:"not null"` 24 | CreatedAt time.Time 25 | UpdatedAt time.Time 26 | } 27 | 28 | func (Table) TableName() string { 29 | return tableName 30 | } 31 | 32 | func (Table) BeforeCreate(tx *gorm.DB) (err error) { 33 | tx.Statement.SetColumn(createdAt, time.Now()) 34 | return 35 | } 36 | 37 | func (Table) BeforeUpdate(tx *gorm.DB) (err error) { 38 | tx.Statement.SetColumn(updatedAt, time.Now()) 39 | return 40 | } 41 | -------------------------------------------------------------------------------- /horizon/env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=horizon 2 | APP_PORT=8082 3 | APP_LOG_LEVEL=INFO 4 | MYSQL_MASTER_MAX_POOL_SIZE=5 5 | MYSQL_MASTER_MIN_POOL_SIZE=2 6 | MYSQL_MASTER_PASSWORD=root 7 | MYSQL_MASTER_HOST=127.0.0.1 8 | MYSQL_MASTER_PORT=3306 9 | MYSQL_MASTER_USERNAME=root 10 | MYSQL_SLAVE_MAX_POOL_SIZE=5 11 | MYSQL_SLAVE_MIN_POOL_SIZE=2 12 | MYSQL_SLAVE_PASSWORD=root 13 | MYSQL_SLAVE_HOST=127.0.0.1 14 | MYSQL_SLAVE_USERNAME=root 15 | MYSQL_SLAVE_PORT=3306 16 | MYSQL_DB_NAME=testdb 17 | 18 | ETCD_WATCHER_ENABLED=true 19 | ETCD_SERVER=127.0.0.1:2379 20 | 21 | CORS_ORIGINS=http://localhost:3000,http://localhost:8080 22 | 23 | ONLINE_FEATURE_STORE_APP_NAME=onfs 24 | 25 | SCYLLA_1_CONTACT_POINTS=127.0.0.1 26 | SCYLLA_1_KEYSPACE=onfs 27 | SCYLLA_1_NUM_CONNS=1 28 | SCYLLA_1_PASSWORD= 29 | SCYLLA_1_PORT=9042 30 | SCYLLA_1_TIMEOUT_IN_MS=10000 31 | SCYLLA_1_USERNAME= 32 | 33 | SCYLLA_ACTIVE_CONFIG_IDS=1 34 | REDIS_FAILOVER_ACTIVE_CONFIG_IDS=4 35 | 36 | NUMERIX_APP_NAME=numerix 37 | NUMERIX_MONITORING_URL=http://localhost:8125/numerix_dashboard -------------------------------------------------------------------------------- /online-feature-store/pkg/infra/inmemory_cache_conf_builder.go: -------------------------------------------------------------------------------- 1 | package infra 2 | 3 | import ( 4 | "fmt" 5 | "github.com/spf13/viper" 6 | ) 7 | 8 | const ( 9 | inMemoryCachePrefix = "IN_MEM_CACHE_" 10 | enabledSuffix = "_ENABLED" 11 | sizeInBytesSuffix = "_SIZE_IN_BYTES" 12 | nameSuffix = "_NAME" 13 | ) 14 | 15 | type IMCacheConf struct { 16 | Enabled bool 17 | SizeInBytes int 18 | Name string 19 | } 20 | 21 | func BuildInMemoryCacheConfFromEnv(envPrefix string) (*IMCacheConf, error) { 22 | if !viper.IsSet(envPrefix+enabledSuffix) || !viper.IsSet(envPrefix+nameSuffix) || !viper.IsSet(envPrefix+sizeInBytesSuffix) { 23 | return nil, fmt.Errorf("failed to load in-memory cache. invalid in-memory configs, prefix: %s", envPrefix) 24 | } 25 | size := viper.GetInt(envPrefix + sizeInBytesSuffix) 26 | name := viper.GetString(envPrefix + nameSuffix) 27 | return &IMCacheConf{ 28 | Enabled: viper.GetBool(envPrefix + enabledSuffix), 29 | SizeInBytes: size, 30 | Name: name, 31 | }, nil 32 | 33 | } 34 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/numerix/unaryops/repository.go: -------------------------------------------------------------------------------- 1 | package unaryops 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/Meesho/BharatMLStack/horizon/pkg/infra" 7 | "gorm.io/gorm" 8 | ) 9 | 10 | type Repository interface { 11 | GetAll() ([]Table, error) 12 | } 13 | 14 | type NumerixBinaryOps struct { 15 | db *gorm.DB 16 | dbName string 17 | } 18 | 19 | func NewRepository(connection *infra.SQLConnection) (Repository, error) { 20 | if connection == nil { 21 | return nil, errors.New("connection cannot be nil") 22 | } 23 | 24 | session, err := connection.GetConn() 25 | if err != nil { 26 | return nil, err 27 | } 28 | meta, err := connection.GetMeta() 29 | if err != nil { 30 | return nil, err 31 | } 32 | dbName := meta["db_name"].(string) 33 | 34 | return &NumerixBinaryOps{ 35 | db: session.(*gorm.DB), 36 | dbName: dbName, 37 | }, nil 38 | } 39 | 40 | func (g *NumerixBinaryOps) GetAll() ([]Table, error) { 41 | var tables []Table 42 | result := g.db.Find(&tables) 43 | return tables, result.Error 44 | } 45 | -------------------------------------------------------------------------------- /horizon/pkg/httpframework/httpframework.go: -------------------------------------------------------------------------------- 1 | package httpframework 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/horizon/pkg/middleware" 5 | "github.com/gin-gonic/gin" 6 | "github.com/rs/zerolog/log" 7 | "os" 8 | "sync" 9 | ) 10 | 11 | var ( 12 | router *gin.Engine 13 | once sync.Once 14 | ) 15 | 16 | // Init initializes gin engine with the given middlewares 17 | // It sets the gin mode to release if the environment is production and use the middleware logger and recovery 18 | func Init(middlewares ...gin.HandlerFunc) { 19 | once.Do(func() { 20 | env := os.Getenv("APP_ENV") 21 | if env == "prod" || env == "production" { 22 | gin.SetMode(gin.ReleaseMode) 23 | } 24 | router = gin.New() 25 | middlewares = append(middlewares, middleware.HTTPLogger(), middleware.HTTPRecovery()) 26 | router.Use(middlewares...) 27 | }) 28 | } 29 | 30 | // Instance returns the httpframework instance 31 | func Instance() *gin.Engine { 32 | if router == nil { 33 | log.Fatal().Msg("Router not initialized") 34 | } 35 | return router 36 | } 37 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/numerix/binaryops/repository.go: -------------------------------------------------------------------------------- 1 | package binaryops 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/Meesho/BharatMLStack/horizon/pkg/infra" 7 | "gorm.io/gorm" 8 | ) 9 | 10 | type Repository interface { 11 | GetAll() ([]Table, error) 12 | } 13 | 14 | type NumerixBinaryOps struct { 15 | db *gorm.DB 16 | dbName string 17 | } 18 | 19 | func NewRepository(connection *infra.SQLConnection) (Repository, error) { 20 | if connection == nil { 21 | return nil, errors.New("connection cannot be nil") 22 | } 23 | 24 | session, err := connection.GetConn() 25 | if err != nil { 26 | return nil, err 27 | } 28 | meta, err := connection.GetMeta() 29 | if err != nil { 30 | return nil, err 31 | } 32 | dbName := meta["db_name"].(string) 33 | 34 | return &NumerixBinaryOps{ 35 | db: session.(*gorm.DB), 36 | dbName: dbName, 37 | }, nil 38 | } 39 | 40 | func (g *NumerixBinaryOps) GetAll() ([]Table, error) { 41 | var tables []Table 42 | result := g.db.Find(&tables) 43 | return tables, result.Error 44 | } 45 | -------------------------------------------------------------------------------- /numerix/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "numerix" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | prost = "0.11.9" 8 | prost-types = "0.11.9" 9 | tonic = "0.9" 10 | tokio = { version = "1.0", features = ["full"] } 11 | tokio-stream = { version = "0.1", features = ["net"] } 12 | hyper = { version = "0.14", features = ["full"] } 13 | tower = "0.4" 14 | config = "0.15.16" 15 | serde = { version = "1.0.219", features = ["derive"] } 16 | dotenvy = "0.15" 17 | once_cell = "1.21.1" 18 | tracing = "0.1" 19 | tracing-subscriber = { version = "0.3.20", features = ["env-filter"] } 20 | futures = "0.3.31" 21 | serde_json = "1.0.140" 22 | cadence = "1.5.0" 23 | etcd-client = "0.14" 24 | regex = "1.11.1" 25 | bytemuck = "1.14" 26 | ryu = "1.0" 27 | thiserror = "2.0.12" 28 | fastrand = "2" 29 | 30 | [build-dependencies] 31 | tonic-build = "0.10" 32 | 33 | # Force-resolve vulnerable slab via transitive dependency versions 34 | [dependencies.slab] 35 | version = "0.4.11" 36 | 37 | [profile.release] 38 | opt-level = 3 39 | lto = true 40 | codegen-units = 1 -------------------------------------------------------------------------------- /go-sdk/pkg/onfs/init.go: -------------------------------------------------------------------------------- 1 | package onfs 2 | 3 | import ( 4 | "sync" 5 | "time" 6 | 7 | "github.com/rs/zerolog/log" 8 | ) 9 | 10 | const ( 11 | Version1 = 1 12 | ) 13 | 14 | var ( 15 | registry = make(map[int]Client) 16 | mut sync.Mutex 17 | ) 18 | 19 | // InitClient initialises the client for the given version 20 | func InitClient(version int, conf *Config, timing func(name string, value time.Duration, tags []string), count func(name string, value int64, tags []string)) Client { 21 | mut.Lock() 22 | defer mut.Unlock() 23 | if registry[version] != nil { 24 | log.Panic().Msgf("Client for version %d already initialised", version) 25 | } 26 | switch version { 27 | case Version1: 28 | registry[version] = NewClientV1(conf, timing, count) 29 | } 30 | return registry[version] 31 | } 32 | 33 | // GetInstance returns the client for the given version 34 | func GetInstance(version int) Client { 35 | if registry[version] == nil { 36 | log.Panic().Msgf("Client for version %d not initialised", version) 37 | } 38 | return registry[version] 39 | } 40 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/entity/table.go: -------------------------------------------------------------------------------- 1 | package entity 2 | 3 | import ( 4 | "time" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | const ( 10 | tableName = "entity" 11 | createdAt = "CreatedAt" 12 | updatedAt = "UpdatedAt" 13 | ) 14 | 15 | type Table struct { 16 | RequestId uint `gorm:"primaryKey;autoIncrement"` 17 | Payload string `gorm:"not null"` 18 | EntityLabel string `gorm:"not null"` 19 | CreatedBy string `gorm:"not null"` 20 | ApprovedBy string `gorm:"not null"` 21 | Status string `gorm:"not null"` 22 | RequestType string `gorm:"not null"` 23 | Service string `gorm:"not null"` 24 | RejectReason string `gorm:"not null"` 25 | CreatedAt time.Time 26 | UpdatedAt time.Time 27 | } 28 | 29 | func (Table) TableName() string { 30 | return tableName 31 | } 32 | 33 | func (Table) BeforeCreate(tx *gorm.DB) (err error) { 34 | tx.Statement.SetColumn(createdAt, time.Now()) 35 | return 36 | } 37 | 38 | func (Table) BeforeUpdate(tx *gorm.DB) (err error) { 39 | tx.Statement.SetColumn(updatedAt, time.Now()) 40 | return 41 | } 42 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/repositories/stores/scylla_v1.go: -------------------------------------------------------------------------------- 1 | package stores 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/gocql/gocql" 7 | ) 8 | 9 | func getQueryV1(session interface{}, query string) (*gocql.Query, error) { 10 | if gocqlSession, ok := session.(*gocql.Session); ok { 11 | return gocqlSession.Query(query), nil 12 | } 13 | return nil, fmt.Errorf("invalid gocql query type") 14 | } 15 | 16 | func retrieveV1(query interface{}) ([]map[string]interface{}, error) { 17 | if gocqlQuery, ok := query.(*gocql.Query); ok { 18 | return gocqlQuery.Iter().SliceMap() 19 | } 20 | return nil, fmt.Errorf("invalid gocql query type") 21 | } 22 | 23 | func persistV1(query interface{}) error { 24 | if gocqlQuery, ok := query.(*gocql.Query); ok { 25 | return gocqlQuery.Exec() 26 | } 27 | return fmt.Errorf("invalid gocql query type") 28 | } 29 | 30 | func bindV1(ps interface{}, bindKeys []interface{}) interface{} { 31 | if gocqlQuery, ok := ps.(*gocql.Query); ok { 32 | return gocqlQuery.Bind(bindKeys...).Consistency(gocql.One) 33 | } 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /online-feature-store/pkg/circuitbreaker/manualcb/pass_through_breaker.go: -------------------------------------------------------------------------------- 1 | package manualcb 2 | 3 | // passThroughBreaker is an implementation of ManualCircuitBreaker that does nothing. 4 | // It is used when a circuit breaker is disabled via configuration. It allows all requests to pass through. 5 | type passThroughBreaker struct{} 6 | 7 | func NewPassThroughBreaker() *passThroughBreaker { 8 | return &passThroughBreaker{} 9 | } 10 | 11 | // IsAllowed always returns true. 12 | func (nb *passThroughBreaker) IsAllowed() bool { 13 | return true 14 | } 15 | 16 | // RecordSuccess does nothing. 17 | func (nb *passThroughBreaker) RecordSuccess() {} 18 | 19 | // RecordFailure does nothing. 20 | func (nb *passThroughBreaker) RecordFailure() {} 21 | 22 | // ForceOpen does nothing for pass-through breaker. 23 | func (nb *passThroughBreaker) ForceOpen() {} 24 | 25 | // ForceClose does nothing for pass-through breaker. 26 | func (nb *passThroughBreaker) ForceClose() {} 27 | 28 | // Execute does nothing for pass-through breaker. 29 | func (nb *passThroughBreaker) NormalExecutionMode() {} 30 | -------------------------------------------------------------------------------- /online-feature-store/pkg/etcd/etcd.go: -------------------------------------------------------------------------------- 1 | package etcd 2 | 3 | import ( 4 | "sync" 5 | "time" 6 | ) 7 | 8 | const ( 9 | configPath = "/config/" 10 | timeout = 30 * time.Second 11 | envAppName = "APP_NAME" 12 | envEtcdServer = "ETCD_SERVER" 13 | envEtcdUsername = "ETCD_USERNAME" 14 | envEtcdPassword = "ETCD_PASSWORD" 15 | envWatcherEnabled = "ETCD_WATCHER_ENABLED" 16 | ) 17 | 18 | var ( 19 | once sync.Once 20 | ) 21 | 22 | type Etcd interface { 23 | GetConfigInstance() interface{} 24 | updateConfig(config interface{}) error 25 | handleStruct(dataMap, metaMap *map[string]string, output interface{}, prefix string) error 26 | handleMap(dataMap, metaMap *map[string]string, output interface{}, prefix string) error 27 | SetValue(path string, value interface{}) error 28 | SetValues(paths map[string]interface{}) error 29 | CreateNode(path string, value interface{}) error 30 | CreateNodes(paths map[string]interface{}) error 31 | IsNodeExist(path string) (bool, error) 32 | RegisterWatchPathCallback(path string, callback func() error) error 33 | } 34 | -------------------------------------------------------------------------------- /horizon/internal/numerix/util/expression_parser.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "strconv" 5 | "strings" 6 | ) 7 | 8 | var binaryOps = map[string]bool{ 9 | "+": true, "-": true, "*": true, "/": true, "^": true, 10 | ">": true, "<": true, ">=": true, "<=": true, "==": true, 11 | "min": true, "max": true, "&": true, "|": true, 12 | } 13 | 14 | var unaryOps = map[string]bool{ 15 | "exp": true, "log": true, "abs": true, 16 | "norm_min_max": true, "percentile_rank": true, 17 | "norm_percentile_0_99": true, "norm_percentile_5_95": true, 18 | } 19 | 20 | func IsOp(token string) bool { 21 | return binaryOps[token] || unaryOps[token] 22 | } 23 | 24 | func IsNumber(token string) bool { 25 | _, err := strconv.ParseFloat(token, 64) 26 | return err == nil 27 | } 28 | 29 | func ExtractVariables(expression string) []string { 30 | tokens := strings.Fields(expression) 31 | vars := make([]string, 0) 32 | 33 | for _, token := range tokens { 34 | if IsNumber(token) || IsOp(token) { 35 | continue 36 | } 37 | vars = append(vars, token) 38 | } 39 | 40 | return vars 41 | 42 | } 43 | -------------------------------------------------------------------------------- /horizon/internal/auth/handler/models.go: -------------------------------------------------------------------------------- 1 | package handler 2 | 3 | import "github.com/dgrijalva/jwt-go" 4 | 5 | type User struct { 6 | FirstName string `json:"first_name"` 7 | LastName string `json:"last_name"` 8 | Email string `json:"email"` 9 | Password string `json:"password"` 10 | } 11 | 12 | type Login struct { 13 | Email string `json:"email"` 14 | Password string `json:"password"` 15 | } 16 | 17 | type LoginResponse struct { 18 | Email string `json:"email"` 19 | Role string `json:"role"` 20 | Token string `json:"token"` 21 | } 22 | 23 | type Claims struct { 24 | Email string `json:"email"` 25 | Role string `json:"role"` 26 | jwt.StandardClaims 27 | } 28 | 29 | type UpdateUserAccessAndRole struct { 30 | Email string `json:"email"` 31 | IsActive bool `json:"is_active"` 32 | Role string `json:"role"` 33 | } 34 | 35 | type UserListingResponse struct { 36 | FirstName string `json:"first_name"` 37 | LastName string `json:"last_name"` 38 | Email string `json:"email"` 39 | IsActive bool `json:"is_active"` 40 | Role string `json:"role"` 41 | } 42 | -------------------------------------------------------------------------------- /horizon/pkg/etcd/etcd.go: -------------------------------------------------------------------------------- 1 | package etcd 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | const ( 8 | configPath = "/config/" 9 | timeout = 30 * time.Second 10 | envAppName = "APP_NAME" 11 | envEtcdServer = "ETCD_SERVER" 12 | envEtcdUsername = "ETCD_USERNAME" 13 | envEtcdPassword = "ETCD_PASSWORD" 14 | envWatcherEnabled = "ETCD_WATCHER_ENABLED" 15 | ) 16 | 17 | type Etcd interface { 18 | GetConfigInstance() interface{} 19 | updateConfig(config interface{}) error 20 | handleStruct(dataMap, metaMap *map[string]string, output interface{}, prefix string) error 21 | handleMap(dataMap, metaMap *map[string]string, output interface{}, prefix string) error 22 | SetValue(path string, value interface{}) error 23 | SetValues(paths map[string]interface{}) error 24 | CreateNode(path string, value interface{}) error 25 | CreateNodes(paths map[string]interface{}) error 26 | IsNodeExist(path string) (bool, error) 27 | IsLeafNodeExist(path string) (bool, error) 28 | RegisterWatchPathCallback(path string, callback func() error) error 29 | Delete(path string) error 30 | } 31 | -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/bharatml_commons/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | BharatML Stack Common Utilities 3 | 4 | Shared utilities and components for BharatML Stack SDKs. 5 | """ 6 | 7 | from .feature_metadata_client import FeatureMetadataClient, create_feature_metadata_client 8 | from .http_client import BharatMLHTTPClient, get_metadata_host_response 9 | from .column_utils import clean_column_name, generate_renamed_column 10 | from .feature_utils import get_fgs_to_feature_mappings, extract_entity_info 11 | from .sdk_template import BaseSDKClient, ExampleNewSDKClient 12 | 13 | __version__ = "0.1.0" 14 | 15 | __all__ = [ 16 | # Feature Metadata Client 17 | "FeatureMetadataClient", 18 | "create_feature_metadata_client", 19 | 20 | # HTTP Utilities 21 | "BharatMLHTTPClient", 22 | "get_metadata_host_response", 23 | 24 | # Data Processing Utilities 25 | "clean_column_name", 26 | "generate_renamed_column", 27 | "get_fgs_to_feature_mappings", 28 | "extract_entity_info", 29 | 30 | # Base Classes 31 | "BaseSDKClient", 32 | "ExampleNewSDKClient", 33 | ] -------------------------------------------------------------------------------- /online-feature-store/pkg/etcd/init.go: -------------------------------------------------------------------------------- 1 | package etcd 2 | 3 | import ( 4 | "github.com/rs/zerolog/log" 5 | ) 6 | 7 | var ( 8 | instance Etcd 9 | DefaultVersion = 1 10 | ) 11 | 12 | // Init initializes the Etcd client, to be called from main.go 13 | func Init(version int, config interface{}) { 14 | once.Do(func() { 15 | switch version { 16 | case DefaultVersion: 17 | instance = newV1Etcd(config) 18 | default: 19 | log.Panic().Msgf("invalid version %d", version) 20 | } 21 | }) 22 | } 23 | 24 | // InitV1 initializes the Etcd client with version 1 25 | func InitV1(config interface{}) { 26 | Init(1, config) 27 | } 28 | 29 | // Instance returns the Etcd client instance. Ensure that Init is called before calling this function 30 | func Instance() Etcd { 31 | if instance == nil { 32 | log.Panic().Msg("etcd client not initialized, call Init first") 33 | } 34 | return instance 35 | } 36 | 37 | // SetMockInstance sets the mock instance of Etcd client 38 | // This would be handy in places where we are directly using Etcd as etcd.Instance() 39 | func SetMockInstance(mock Etcd) { 40 | instance = mock 41 | } 42 | -------------------------------------------------------------------------------- /numerix/src/protos/proto/numerix.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package numerix; 4 | 5 | service Numerix { 6 | rpc Compute(NumerixRequestProto) returns (NumerixResponseProto); 7 | } 8 | 9 | message NumerixRequestProto { 10 | EntityScoreData entity_score_data = 1; 11 | } 12 | 13 | message EntityScoreData { 14 | repeated string schema = 1; 15 | repeated Score entity_scores = 2; 16 | string compute_id = 3; 17 | optional string data_type = 4; 18 | } 19 | 20 | message Score { 21 | oneof matrix_format { 22 | StringList string_data = 1; 23 | ByteList byte_data = 2; 24 | } 25 | } 26 | 27 | message StringList { 28 | repeated string values = 1; 29 | } 30 | 31 | message ByteList { 32 | repeated bytes values = 1; 33 | } 34 | 35 | message NumerixResponseProto { 36 | oneof response { 37 | ComputationScoreData computation_score_data = 1; 38 | Error error = 2; 39 | } 40 | } 41 | 42 | message ComputationScoreData { 43 | repeated string schema = 1; 44 | repeated Score computation_scores = 2; 45 | } 46 | 47 | message Error { 48 | string message = 1; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /trufflebox-ui/DockerFile: -------------------------------------------------------------------------------- 1 | # Stage 1: Build React app 2 | # syntax=docker/dockerfile:1.7 3 | FROM node:20-slim AS builder 4 | 5 | WORKDIR /app 6 | 7 | # Improve reliability/perf of yarn install in CI/multi-arch 8 | ENV YARN_CACHE_FOLDER=/usr/local/share/.cache/yarn \ 9 | NODE_OPTIONS=--max_old_space_size=4096 10 | ARG TARGETPLATFORM 11 | 12 | COPY package.json yarn.lock ./ 13 | # Set generous network timeout and use cache mount for yarn cache 14 | RUN yarn config set network-timeout 600000 -g \ 15 | && yarn config set prefer-offline true -g 16 | RUN --mount=type=cache,id=yarn-cache-${TARGETPLATFORM},target=${YARN_CACHE_FOLDER} \ 17 | yarn install --non-interactive --network-timeout 600000 --mutex network --no-progress 18 | 19 | COPY . . 20 | RUN rm -f .env 21 | RUN yarn run build 22 | 23 | # Stage 2: Serve with Nginx 24 | FROM nginx:alpine 25 | 26 | WORKDIR /usr/share/nginx/html 27 | 28 | COPY --from=builder /app/build . 29 | 30 | # Copy startup script 31 | COPY nginx.conf /etc/nginx/conf.d/default.conf 32 | COPY entrypoint.sh /entrypoint.sh 33 | RUN chmod +x /entrypoint.sh 34 | 35 | EXPOSE 80 36 | 37 | ENTRYPOINT ["/entrypoint.sh"] 38 | -------------------------------------------------------------------------------- /cli-tools/.cursor/rules/global/golang/requirement-planning.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: "Promotes thorough requirement analysis, careful planning, and implementation of robust, general-purpose solutions." 3 | alwaysApply: false 4 | --- 5 | ### Requirement Understanding 6 | 7 | Before creating a plan you MUST ask questions from the user to get clarity on the problem statement 8 | 9 | 1. Break down a problem statement into smaller problem statements 10 | 2. Please write a high quality, general purpose solution. Implement a solution that works correctly for all valid inputs, not just the test cases. Do not hard-code values or create solutions that only work for specific test inputs. Instead, implement the actual logic that solves the problem generally. 11 | 3. Focus on understanding the problem requirements and implementing the correct algorithm. Tests are there to verify correctness, not to define the solution. Provide a principled implementation that follows best practices and software design principles. 12 | 4. If the task is unreasonable or infeasible, or if any of the tests are incorrect, please tell me. The solution should be robust, maintainable, and extendable. 13 | -------------------------------------------------------------------------------- /docs/assets/js/2d865531.a5005531.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9197],{4153:t=>{t.exports=JSON.parse('{"authors":[{"name":"Adarsha Das","title":"Senior Architect @ Meesho","url":"https://github.com/a0d00kc","imageURL":"https://github.com/a0d00kc.png","key":"adarsha","page":null,"count":1},{"name":"Aditya Kumar","title":"SDE-III @ Meesho","url":"https://github.com/Adit2607","imageURL":"https://github.com/Adit2607.png","key":"aditya","page":null,"count":1},{"name":"Jigar Dave","title":"SDE-IV @ Meesho","url":"https://github.com/jigarpatel26","imageURL":"https://github.com/jigarpatel26.png","key":"jigar","page":null,"count":1},{"name":"Jaya Kumar","title":"MLE-III @ Meesho","url":"https://github.com/jayakommuru","imageURL":"https://github.com/jayakommuru.png","key":"jaya","page":null,"count":0},{"name":"Bhawani Singh","title":"SDE-IV @ Meesho","url":"https://github.com/singh-bhawani","imageURL":"https://github.com/singh-bhawani.png","key":"bhawani","page":null,"count":1},{"name":"Mohit Kumar","title":"SDE-III @ Meesho","url":"https://github.com/kmohit00","imageURL":"https://github.com/kmohit00.png","key":"mohit","page":null,"count":0}]}')}}]); -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # 🔁 Pull Request Template – BharatMLStack 2 | 3 | > Please fill out the following sections to help us review your changes efficiently. 4 | 5 | --- 6 | 7 | ## 📌 Summary 8 | 9 | 10 | > e.g., Adds optimizes Redis fetch latency in `online-feature-store`, or improves search UI responsiveness in `trufflebox-ui`. 11 | 12 | --- 13 | 14 | ## 📂 Modules Affected 15 | 16 | 17 | 18 | - [ ] `horizon` (Real-time systems / networking) 19 | - [ ] `online-feature-store` (Feature serving infra) 20 | - [ ] `trufflebox-ui` (Admin panel / UI) 21 | - [ ] `infra` (Docker, CI/CD, GCP/AWS setup) 22 | - [ ] `docs` (Documentation updates) 23 | - [ ] Other: `___________` 24 | 25 | --- 26 | 27 | ## ✅ Type of Change 28 | 29 | - [ ] Feature addition 30 | - [ ] Bug fix 31 | - [ ] Infra / build system change 32 | - [ ] Performance improvement 33 | - [ ] Refactor 34 | - [ ] Documentation 35 | - [ ] Other: `___________` 36 | 37 | --- 38 | 39 | ## 📊 Benchmark / Metrics (if applicable) 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /helix-client/pkg/clients/numerix/client/proto/numerix.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "../grpc"; 4 | 5 | package numerix; 6 | 7 | service numerix { 8 | rpc Compute(numerixRequestProto) returns (numerixResponseProto); 9 | } 10 | 11 | message numerixRequestProto { 12 | EntityScoreData entity_score_data = 1; 13 | } 14 | 15 | message EntityScoreData { 16 | repeated string schema = 1; 17 | repeated Score entity_scores = 2; 18 | string compute_id = 3; 19 | optional string data_type = 4; 20 | } 21 | 22 | message Score { 23 | oneof matrix_format { 24 | StringList string_data = 1; 25 | ByteList byte_data = 2; 26 | } 27 | } 28 | 29 | message StringList { 30 | repeated string values = 1; 31 | } 32 | 33 | message ByteList { 34 | repeated bytes values = 1; 35 | } 36 | 37 | message numerixResponseProto { 38 | oneof response { 39 | ComputationScoreData computation_score_data = 1; 40 | Error error = 2; 41 | } 42 | } 43 | 44 | message ComputationScoreData { 45 | repeated string schema = 1; 46 | repeated Score computation_scores = 2; 47 | } 48 | 49 | message Error { 50 | string message = 1; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /horizon/internal/numerix/proto/numerix.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "../../numerix/proto"; 4 | 5 | package numerix; 6 | 7 | service Numerix { 8 | rpc Compute(NumerixRequestProto) returns (NumerixResponseProto); 9 | } 10 | 11 | message NumerixRequestProto { 12 | EntityScoreData entity_score_data = 1; 13 | } 14 | 15 | message EntityScoreData { 16 | repeated string schema = 1; 17 | repeated Score entity_scores = 2; 18 | string compute_id = 3; 19 | optional string data_type = 4; 20 | } 21 | 22 | message Score { 23 | oneof matrix_format { 24 | StringList string_data = 1; 25 | ByteList byte_data = 2; 26 | } 27 | } 28 | 29 | message StringList { 30 | repeated string values = 1; 31 | } 32 | 33 | message ByteList { 34 | repeated bytes values = 1; 35 | } 36 | 37 | message NumerixResponseProto { 38 | oneof response { 39 | ComputationScoreData computation_score_data = 1; 40 | Error error = 2; 41 | } 42 | } 43 | 44 | message ComputationScoreData { 45 | repeated string schema = 1; 46 | repeated Score computation_scores = 2; 47 | } 48 | 49 | message Error { 50 | string message = 1; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /go-sdk/pkg/proto/onfs/persist.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package persist; 3 | option go_package = "../persist"; 4 | 5 | message FeatureGroupSchema { 6 | string label = 1; 7 | repeated string feature_labels = 2; 8 | } 9 | 10 | 11 | message Data { 12 | repeated string key_values = 1; 13 | repeated FeatureValues feature_values = 2; 14 | } 15 | 16 | message FeatureValues { 17 | Values values = 1; 18 | } 19 | 20 | message Values { 21 | repeated double fp32_values = 1; 22 | repeated double fp64_values = 2; 23 | repeated int32 int32_values = 3; 24 | repeated int64 int64_values = 4; 25 | repeated uint32 uint32_values = 5; 26 | repeated uint64 uint64_values = 6; 27 | repeated string string_values = 7; 28 | repeated bool bool_values = 8; 29 | repeated Vector vector = 9; 30 | } 31 | 32 | message Vector { 33 | Values values = 1; 34 | } 35 | 36 | message Query { 37 | string entity_label = 1; 38 | repeated string keys_schema = 2; 39 | repeated FeatureGroupSchema feature_group_schema = 3; 40 | repeated Data data = 4; 41 | } 42 | 43 | message Result { 44 | string message = 2; 45 | } 46 | 47 | service FeatureService { 48 | rpc PersistFeatures(Query) returns (Result) {}; 49 | } 50 | -------------------------------------------------------------------------------- /online-feature-store/pkg/proto/persist.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package persist; 3 | option go_package = "../persist"; 4 | 5 | message FeatureGroupSchema { 6 | string label = 1; 7 | repeated string feature_labels = 2; 8 | } 9 | 10 | 11 | message Data { 12 | repeated string key_values = 1; 13 | repeated FeatureValues feature_values = 2; 14 | } 15 | 16 | message FeatureValues { 17 | Values values = 1; 18 | } 19 | 20 | message Values { 21 | repeated double fp32_values = 1; 22 | repeated double fp64_values = 2; 23 | repeated int32 int32_values = 3; 24 | repeated int64 int64_values = 4; 25 | repeated uint32 uint32_values = 5; 26 | repeated uint64 uint64_values = 6; 27 | repeated string string_values = 7; 28 | repeated bool bool_values = 8; 29 | repeated Vector vector = 9; 30 | } 31 | 32 | message Vector { 33 | Values values = 1; 34 | } 35 | 36 | message Query { 37 | string entity_label = 1; 38 | repeated string keys_schema = 2; 39 | repeated FeatureGroupSchema feature_group_schema = 3; 40 | repeated Data data = 4; 41 | } 42 | 43 | message Result { 44 | string message = 2; 45 | } 46 | 47 | service FeatureService { 48 | rpc PersistFeatures(Query) returns (Result) {}; 49 | } 50 | -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/bharatml_commons/proto/persist.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package persist; 3 | option go_package = "../persist"; 4 | 5 | message FeatureGroupSchema { 6 | string label = 1; 7 | repeated string feature_labels = 2; 8 | } 9 | 10 | 11 | message Data { 12 | repeated string key_values = 1; 13 | repeated FeatureValues feature_values = 2; 14 | } 15 | 16 | message FeatureValues { 17 | Values values = 1; 18 | } 19 | 20 | message Values { 21 | repeated double fp32_values = 1; 22 | repeated double fp64_values = 2; 23 | repeated int32 int32_values = 3; 24 | repeated int64 int64_values = 4; 25 | repeated uint32 uint32_values = 5; 26 | repeated uint64 uint64_values = 6; 27 | repeated string string_values = 7; 28 | repeated bool bool_values = 8; 29 | repeated Vector vector = 9; 30 | } 31 | 32 | message Vector { 33 | Values values = 1; 34 | } 35 | 36 | message Query { 37 | string entity_label = 1; 38 | repeated string keys_schema = 2; 39 | repeated FeatureGroupSchema feature_group_schema = 3; 40 | repeated Data data = 4; 41 | } 42 | 43 | message Result { 44 | string message = 2; 45 | } 46 | 47 | service FeatureService { 48 | rpc PersistFeatures(Query) returns (Result) {}; 49 | } -------------------------------------------------------------------------------- /horizon/pkg/api/http/helper.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | const ( 9 | Timeout = "_TIMEOUT_IN_MS" 10 | Host = "_HOST" 11 | Port = "_PORT" 12 | DialTimeout = "_DIAL_TIMEOUT_IN_MS" 13 | KeepAliveTimeout = "_KEEP_ALIVE_TIMEOUT_IN_MS" 14 | MaxIdleConnections = "_MAX_IDLE_CONNS" 15 | MaxIdleConnectionsPerHost = "_MAX_IDLE_CONNS_PER_HOST" 16 | IdleConnectionTimeout = "_IDLE_CONN_TIMEOUT_IN_MS" 17 | ) 18 | 19 | // BuildHttpUrl builds a http url from the given host, port and path 20 | func BuildHttpUrl(host string, port int, path string) string { 21 | return fmt.Sprintf("http://%s:%d:%s", host, port, path) 22 | } 23 | 24 | func IsStandard2xx(code int) bool { 25 | return code >= 200 && code < 300 && http.StatusText(code) != "" 26 | } 27 | 28 | func IsStandard3xx(code int) bool { 29 | return code >= 300 && code < 400 && http.StatusText(code) != "" 30 | } 31 | 32 | func IsStandard4xx(code int) bool { 33 | return code >= 400 && code < 500 && http.StatusText(code) != "" 34 | } 35 | 36 | func IsStandard5xx(code int) bool { 37 | return code >= 500 && code < 600 && http.StatusText(code) != "" 38 | } 39 | -------------------------------------------------------------------------------- /helix-client/pkg/api/http/helper.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | const ( 9 | Timeout = "_TIMEOUT_IN_MS" 10 | Host = "_HOST" 11 | Port = "_PORT" 12 | DialTimeout = "_DIAL_TIMEOUT_IN_MS" 13 | KeepAliveTimeout = "_KEEP_ALIVE_TIMEOUT_IN_MS" 14 | MaxIdleConnections = "_MAX_IDLE_CONNS" 15 | MaxIdleConnectionsPerHost = "_MAX_IDLE_CONNS_PER_HOST" 16 | IdleConnectionTimeout = "_IDLE_CONN_TIMEOUT_IN_MS" 17 | ) 18 | 19 | // BuildHttpUrl builds a http url from the given host, port and path 20 | func BuildHttpUrl(host string, port int, path string) string { 21 | return fmt.Sprintf("http://%s:%d:%s", host, port, path) 22 | } 23 | 24 | func IsStandard2xx(code int) bool { 25 | return code >= 200 && code < 300 && http.StatusText(code) != "" 26 | } 27 | 28 | func IsStandard3xx(code int) bool { 29 | return code >= 300 && code < 400 && http.StatusText(code) != "" 30 | } 31 | 32 | func IsStandard4xx(code int) bool { 33 | return code >= 400 && code < 500 && http.StatusText(code) != "" 34 | } 35 | 36 | func IsStandard5xx(code int) bool { 37 | return code >= 500 && code < 600 && http.StatusText(code) != "" 38 | } 39 | -------------------------------------------------------------------------------- /horizon/pkg/middleware/httplogger.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | 7 | "github.com/Meesho/BharatMLStack/horizon/pkg/api/http" 8 | "github.com/Meesho/BharatMLStack/horizon/pkg/metric" 9 | "github.com/gin-gonic/gin" 10 | "github.com/rs/zerolog/log" 11 | ) 12 | 13 | // HTTPLogger logs the request 14 | func HTTPLogger() gin.HandlerFunc { 15 | return func(c *gin.Context) { 16 | startTime := time.Now() 17 | c.Next() 18 | endTime := time.Now() 19 | 20 | latency := endTime.Sub(startTime) 21 | path := c.Request.URL.Path 22 | clientIP := c.ClientIP() 23 | method := c.Request.Method 24 | statusCode := c.Writer.Status() 25 | userContext := c.Request.Header.Get(http.HeaderMeeshoUserContext) 26 | 27 | metricTags := metric.BuildTag( 28 | metric.NewTag(metric.TagPath, path), 29 | metric.NewTag(metric.TagMethod, method), 30 | metric.NewTag(metric.TagHttpStatusCode, strconv.Itoa(statusCode)), 31 | metric.NewTag(metric.TagUserContext, userContext), 32 | ) 33 | metric.Incr(metric.ApiRequestCount, metricTags) 34 | metric.Timing(metric.ApiRequestLatency, latency, metricTags) 35 | log.Info().Msgf("[access] [%s] %s %s %d %v", clientIP, method, path, statusCode, latency) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs-src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "serve": "docusaurus serve", 13 | "write-translations": "docusaurus write-translations", 14 | "write-heading-ids": "docusaurus write-heading-ids" 15 | }, 16 | "dependencies": { 17 | "@docusaurus/core": "3.8.1", 18 | "@docusaurus/preset-classic": "3.8.1", 19 | "@mdx-js/react": "^3.0.0", 20 | "clsx": "^2.0.0", 21 | "prism-react-renderer": "^2.3.0", 22 | "react": "^19.0.0", 23 | "react-dom": "^19.0.0" 24 | }, 25 | "devDependencies": { 26 | "@docusaurus/module-type-aliases": "3.8.1", 27 | "@docusaurus/types": "3.8.1" 28 | }, 29 | "browserslist": { 30 | "production": [ 31 | ">0.5%", 32 | "not dead", 33 | "not op_mini all" 34 | ], 35 | "development": [ 36 | "last 3 chrome version", 37 | "last 3 firefox version", 38 | "last 5 safari version" 39 | ] 40 | }, 41 | "engines": { 42 | "node": ">=18.0" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /helix-client/README.md: -------------------------------------------------------------------------------- 1 | # helix-clients 2 | 3 | ### Environment Variables 4 | ```shell 5 | HELIX_CLIENT_ENABLED=true 6 | HELIX_CLIENT_API_AUTH_TOKEN= 7 | HELIX_CLIENT_CONFIG_REFRESH_INTERVAL_IN_MINUTES=10 8 | HELIX_CLIENT_CONFIG_INIT_HARD_FAILURE=false 9 | HELIX_CLIENT_ENVIRONMENT=PROD 10 | 11 | 12 | HELIX_CLIENT_CONN_CONF_COUNT=1 13 | 14 | HELIX_CLIENT_CONN_CONF_ID=1 15 | HELIX_CLIENT_CONN_CONF_1_CONFIG_ID=pdp-organic-1,pdp-organic-2 16 | HELIX_CLIENT_CONN_CONF_1_SERVICE=MODEL_PROXY 17 | HELIX_CLIENT_CONN_CONF_1_CONN_PROTOCOL=HTTP1 18 | HELIX_CLIENT_CONN_CONF_1_TIMEOUT=200 19 | HELIX_CLIENT_CONN_CONF_1_MAX_IDLE_CONN=200 20 | HELIX_CLIENT_CONN_CONF_1_MAX_IDLE_CONN_PER_HOST=200 21 | HELIX_CLIENT_CONN_CONF_1_IDLE_CONN_TIMEOUT=200 22 | OR 23 | HELIX_CLIENT_CONN_CONF_ID=1 24 | HELIX_CLIENT_CONN_CONF_1_CONFIG_ID=pdp-organic-3,pdp-organic-4 25 | HELIX_CLIENT_CONN_CONF_1_SERVICE=MODEL_PROXY 26 | HELIX_CLIENT_CONN_CONF_1_CONN_PROTOCOL=GRPC 27 | HELIX_CLIENT_CONN_CONF_1_DEADLINE=200 28 | HELIX_CLIENT_CONN_CONF_1_PLAINTEXT=true 29 | HELIX_CLIENT_CONN_CONF_1_CHAN_ALGO=round-robin 30 | HELIX_CLIENT_CONN_CONF_1_KEEP_ALIVE_TIME=200 31 | HELIX_CLIENT_CONN_CONF_1_KEEP_ALIVE_WITHOUT_CALLS=true 32 | HELIX_CLIENT_CONN_CONF_1_IDLE_CONN_TIME_OUT=200 33 | ``` 34 | -------------------------------------------------------------------------------- /helix-client/pkg/utils/empty_utils_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "github.com/stretchr/testify/assert" 5 | "testing" 6 | ) 7 | 8 | func TestIsEmptyString(t *testing.T) { 9 | var s string 10 | assert.Truef(t, IsEmptyString(s), "String is empty, but got not empty") 11 | s = "xyz" 12 | assert.Falsef(t, IsEmptyString(s), "String is not empty, but got empty") 13 | } 14 | 15 | func TestIsNilPointer(t *testing.T) { 16 | var ptr *int 17 | assert.Truef(t, IsNilPointer(ptr), "Pointer is not referencing, but got not nil") 18 | i := 34 19 | ptr = &i 20 | assert.Falsef(t, IsNilPointer(ptr), "Pointer is referencing, but got nil") 21 | } 22 | 23 | func TestIsEmptyMap(t *testing.T) { 24 | var mp map[int32]string 25 | assert.Truef(t, IsEmptyMap(mp), "Map is empty, but got non empty") 26 | mp = make(map[int32]string) 27 | assert.Truef(t, IsEmptyMap(mp), "Map is empty, but got non empty") 28 | mp[int32(23)] = "xyz" 29 | assert.Falsef(t, IsEmptyMap(mp), "Map is not empty, but got empty") 30 | } 31 | 32 | func TestIsEmptySlice(t *testing.T) { 33 | var sl []int32 34 | assert.Truef(t, IsEmptySlice(sl), "Slice is empty, but got non empty") 35 | sl = append(sl, 23) 36 | assert.Falsef(t, IsEmptySlice(sl), "Slice is not empty, but got empty") 37 | } 38 | -------------------------------------------------------------------------------- /docs/assets/js/2237.bfceba09.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2237],{2237:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(6540);var i=n(1312),o=n(5500),s=n(1656),r=n(3363),a=n(4848);function d(){const e=(0,i.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(s.A,{children:(0,a.jsx)(r.A,{})})]})}},3363:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var i=n(4164),o=n(1312),s=n(1107),r=n(4848);function a({className:e}){return(0,r.jsx)("main",{className:(0,i.A)("container margin-vert--xl",e),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); -------------------------------------------------------------------------------- /online-feature-store/pkg/circuitbreaker/cb_factory.go: -------------------------------------------------------------------------------- 1 | package circuitbreaker 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/online-feature-store/pkg/circuitbreaker/manualcb" 5 | "github.com/rs/zerolog/log" 6 | ) 7 | 8 | func GetManualCircuitBreaker(config *Config) ManualCircuitBreaker { 9 | if config == nil { 10 | return nil 11 | } 12 | 13 | if !config.Enabled { 14 | return manualcb.NewPassThroughBreaker() 15 | } 16 | 17 | switch config.Version { 18 | case 1: 19 | return manualFailSafeCB(config) 20 | default: 21 | log.Panic().Msgf("Circuit breaker version %d not supported", config.Version) 22 | } 23 | return nil 24 | } 25 | 26 | func manualFailSafeCB(config *Config) ManualCircuitBreaker { 27 | cbConfig := &manualcb.CBConfig{ 28 | CBName: config.Name, 29 | FailureRateThreshold: config.FailureRateThreshold, 30 | FailureExecutionThreshold: config.FailureRateMinimumWindow, 31 | FailureThresholdingPeriodInMS: config.FailureRateWindowInMs, 32 | SuccessRatioThreshold: config.SuccessCountThreshold, 33 | SuccessThresholdingCapacity: config.SuccessCountWindow, 34 | WithDelayInMS: config.WithDelayInMS, 35 | } 36 | return manualcb.NewManualFailsafeBreaker(cbConfig) 37 | } 38 | -------------------------------------------------------------------------------- /online-feature-store/pkg/ds/sync_map_with_ttl.go: -------------------------------------------------------------------------------- 1 | package ds 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | type SyncMapWithTtl[K comparable, V any] struct { 8 | Map SyncMap[K, valueWithTtl[V]] 9 | } 10 | 11 | type valueWithTtl[V any] struct { 12 | value V 13 | expires time.Time 14 | } 15 | 16 | const ( 17 | sweepInterval = 5 * time.Minute 18 | ) 19 | 20 | func NewSyncMapWithTtl[K comparable, V any]() *SyncMapWithTtl[K, V] { 21 | sm := &SyncMapWithTtl[K, V]{ 22 | Map: *NewSyncMap[K, valueWithTtl[V]](), 23 | } 24 | go sm.startJanitor() 25 | return sm 26 | } 27 | 28 | func (sm *SyncMapWithTtl[K, V]) Set(key K, value V, ttl time.Duration) { 29 | sm.Map.Set(key, valueWithTtl[V]{value: value, expires: time.Now().Add(ttl)}) 30 | } 31 | 32 | func (sm *SyncMapWithTtl[K, V]) Get(key K) (V, bool) { 33 | value, ok := sm.Map.Get(key) 34 | if !ok { 35 | return value.value, false 36 | } 37 | return value.value, true 38 | } 39 | 40 | // startJanitor periodically deletes expired cache entries 41 | func (sm *SyncMapWithTtl[K, V]) startJanitor() { 42 | ticker := time.NewTicker(sweepInterval) 43 | defer ticker.Stop() 44 | for now := range ticker.C { 45 | sm.Map.DeleteIf(func(k K, e valueWithTtl[V]) bool { 46 | return now.After(e.expires) 47 | }) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /quick-start/db-init/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11-slim 2 | 3 | LABEL description="BharatML Stack Database Initialization Container" 4 | LABEL version="1.0" 5 | LABEL purpose="Initializes ScyllaDB, MySQL, etcd for BharatML Stack" 6 | 7 | # Install required system packages 8 | RUN apt-get update && apt-get install -y --no-install-recommends \ 9 | # ScyllaDB client dependencies 10 | git gcc g++ libffi-dev libssl-dev libpython3-dev \ 11 | # MySQL client 12 | default-mysql-client \ 13 | # Redis client 14 | redis-tools \ 15 | # General utilities 16 | curl netcat-openbsd \ 17 | && rm -rf /var/lib/apt/lists/* 18 | 19 | # Install ScyllaDB CQL shell 20 | RUN pip install --no-cache-dir git+https://github.com/scylladb/scylla-cqlsh.git 21 | 22 | # Install etcdctl 23 | RUN curl -L https://github.com/etcd-io/etcd/releases/download/v3.5.12/etcd-v3.5.12-linux-amd64.tar.gz | \ 24 | tar xz --strip-components=1 -C /usr/local/bin etcd-v3.5.12-linux-amd64/etcdctl 25 | 26 | # Create initialization scripts directory 27 | WORKDIR /init-scripts 28 | 29 | # Copy initialization scripts 30 | COPY scripts/ ./ 31 | 32 | # Make scripts executable 33 | RUN chmod +x *.sh 34 | 35 | # Default entrypoint runs the main initialization 36 | ENTRYPOINT ["./main-init.sh"] -------------------------------------------------------------------------------- /trufflebox-ui/env.example: -------------------------------------------------------------------------------- 1 | # Horizon Backend Service URLs 2 | # Base URL for Horizon API service (development/staging) 3 | REACT_APP_HORIZON_BASE_URL=http://localhost:8082 4 | 5 | # Production Horizon API service URL (used for promotion workflows) 6 | REACT_APP_HORIZON_PROD_BASE_URL=http://localhost:8085 7 | 8 | # Skye Service URL 9 | REACT_APP_SKYE_BASE_URL=http://localhost:8083 10 | 11 | # Model Inference Service URL 12 | REACT_APP_MODEL_INFERENCE_BASE_URL=http://localhost:8084 13 | 14 | # Application Environment 15 | # Options: production, staging, development 16 | REACT_APP_ENVIRONMENT=production 17 | 18 | # Service-wise Feature Flags 19 | # Enable/disable specific services (true/false or 1/0) 20 | # Online Feature Store - Default: enabled 21 | REACT_APP_ONLINE_FEATURE_STORE_ENABLED=true 22 | 23 | # InferFlow (Model Proxy) - Default: disabled 24 | REACT_APP_INFERFLOW_ENABLED=true 25 | 26 | # Numerix - Default: enabled 27 | REACT_APP_NUMERIX_ENABLED=true 28 | 29 | # Predator - Default: disabled 30 | REACT_APP_PREDATOR_ENABLED=true 31 | 32 | # Embedding Platform - Default: disabled 33 | REACT_APP_EMBEDDING_PLATFORM_ENABLED=false 34 | 35 | # Public Base URL 36 | # Base path for React Router (used when app is deployed under a subpath) 37 | PUBLIC_USER_BASE_URL=/ 38 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/apiresolver/sql.go: -------------------------------------------------------------------------------- 1 | package apiresolver 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/Meesho/BharatMLStack/horizon/pkg/infra" 7 | "gorm.io/gorm" 8 | ) 9 | 10 | type Repository interface { 11 | GetResolver(method, path string) (ApiResolver, error) 12 | CreateResolver(resolver *ApiResolver) (uint, error) 13 | } 14 | 15 | type ServiceDiscoveryRepository struct { 16 | db *gorm.DB 17 | } 18 | 19 | func NewRepository(connection *infra.SQLConnection) (Repository, error) { 20 | if connection == nil { 21 | return nil, errors.New("connection cannot be nil") 22 | } 23 | session, err := connection.GetConn() 24 | if err != nil { 25 | return nil, err 26 | } 27 | 28 | return &ServiceDiscoveryRepository{ 29 | db: session.(*gorm.DB), 30 | }, nil 31 | } 32 | 33 | func (s ServiceDiscoveryRepository) GetResolver(method, path string) (ApiResolver, error) { 34 | var resolver ApiResolver 35 | result := s.db.Where("method = ? AND api_path = ?", method, path).First(&resolver) 36 | return resolver, result.Error 37 | } 38 | 39 | func (s ServiceDiscoveryRepository) CreateResolver(resolver *ApiResolver) (uint, error) { 40 | result := s.db.Create(resolver) 41 | if result.Error != nil { 42 | return 0, result.Error 43 | } 44 | return resolver.ID, nil 45 | } 46 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/features/table.go: -------------------------------------------------------------------------------- 1 | package features 2 | 3 | import ( 4 | "encoding/json" 5 | "time" 6 | 7 | "gorm.io/gorm" 8 | ) 9 | 10 | const ( 11 | tableName = "features" 12 | createdAt = "CreatedAt" 13 | updatedAt = "UpdatedAt" 14 | ) 15 | 16 | type Table struct { 17 | RequestId uint `gorm:"primaryKey;autoIncrement"` 18 | EntityLabel string `gorm:"not null"` 19 | FeatureGroupLabel string `gorm:"not null"` 20 | Payload json.RawMessage `gorm:"type:jsonb"` 21 | CreatedBy string `gorm:"not null"` 22 | ApprovedBy string `gorm:"not null"` 23 | Status string `gorm:"not null"` 24 | RequestType string `gorm:"not null"` 25 | Service string `gorm:"not null"` 26 | RejectReason string `gorm:"not null"` 27 | CreatedAt time.Time 28 | UpdatedAt time.Time 29 | } 30 | 31 | func (Table) TableName() string { 32 | return tableName 33 | } 34 | 35 | func (Table) BeforeCreate(tx *gorm.DB) (err error) { 36 | tx.Statement.SetColumn(createdAt, time.Now()) 37 | return 38 | } 39 | 40 | func (Table) BeforeUpdate(tx *gorm.DB) (err error) { 41 | tx.Statement.SetColumn(updatedAt, time.Now()) 42 | return 43 | } 44 | -------------------------------------------------------------------------------- /horizon/internal/repositories/sql/featuregroup/table.go: -------------------------------------------------------------------------------- 1 | package featuregroup 2 | 3 | import ( 4 | "encoding/json" 5 | "time" 6 | 7 | "gorm.io/gorm" 8 | ) 9 | 10 | const ( 11 | tableName = "feature_group" 12 | createdAt = "CreatedAt" 13 | updatedAt = "UpdatedAt" 14 | ) 15 | 16 | type Table struct { 17 | RequestId uint `gorm:"primaryKey;autoIncrement"` 18 | EntityLabel string `gorm:"not null"` 19 | FeatureGroupLabel string `gorm:"not null"` 20 | Payload json.RawMessage `gorm:"type:jsonb"` 21 | CreatedBy string `gorm:"not null"` 22 | ApprovedBy string `gorm:"not null"` 23 | Status string `gorm:"not null"` 24 | RequestType string `gorm:"not null"` 25 | Service string `gorm:"not null"` 26 | RejectReason string `gorm:"not null"` 27 | CreatedAt time.Time 28 | UpdatedAt time.Time 29 | } 30 | 31 | func (Table) TableName() string { 32 | return tableName 33 | } 34 | 35 | func (Table) BeforeCreate(tx *gorm.DB) (err error) { 36 | tx.Statement.SetColumn(createdAt, time.Now()) 37 | return 38 | } 39 | 40 | func (Table) BeforeUpdate(tx *gorm.DB) (err error) { 41 | tx.Statement.SetColumn(updatedAt, time.Now()) 42 | return 43 | } 44 | -------------------------------------------------------------------------------- /horizon/pkg/api/http/header.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | // Header constants 4 | const ( 5 | HeaderContentType = "Content-Type" 6 | HeaderAuthorization = "Authorization" 7 | HeaderAuthentication = "Authentication" 8 | HeaderMeeshoCountry = "MEESHO-ISO-COUNTRY-CODE" 9 | HeaderMeeshoLanguage = "MEESHO-ISO-LANGUAGE-CODE" 10 | HeaderMeeshoUserId = "MEESHO-USER-ID" 11 | HeaderMeeshoUserContext = "MEESHO-USER-CONTEXT" 12 | HeaderAppVersionCode = "APP-VERSION-CODE" 13 | HeaderMeeshoUserCity = "MEESHO-USER-CITY" 14 | HeaderMeeshoUserPincode = "MEESHO-USER-PINCODE" 15 | HeaderMeeshoUserLatitude = "MEESHO-USER-LATITUDE" 16 | HeaderMeeshoUserLongitude = "MEESHO-USER-LONGITUDE" 17 | HeaderMeeshoUserAddressId = "MEESHO-USER-ADDRESS-ID" 18 | HeaderMeeshoUserStateCode = "MEESHO-USER-STATE-CODE" 19 | HeaderMeeshoParentCatalogId = "MEESHO-PARENT-CATALOG-ID" 20 | HeaderRealEstate = "REAL-ESTATE" 21 | HeaderUpstream = "UPSTREAM" 22 | HeaderMeeshoClpId = "MEESHO-CLP-ID" 23 | HeaderMeeshoClientId = "MEESHO-CLIENT-ID" 24 | HeaderTenantContext = "TENANT-CONTEXT" 25 | HeaderValueApplicationJson = "application/json" 26 | HeaderRankingHoldoutAudience = "RANKING-HOLDOUT-AUDIENCE" 27 | ) 28 | -------------------------------------------------------------------------------- /numerix/src/pkg/rust_matrix_frame/vector.rs: -------------------------------------------------------------------------------- 1 | use std::ops::{Index, IndexMut}; 2 | 3 | #[derive(Debug, Clone)] 4 | pub struct Vector { 5 | data: Vec, 6 | } 7 | 8 | impl Vector { 9 | pub fn new(size: usize) -> Self 10 | where 11 | T: Default + Clone, 12 | { 13 | Vector { 14 | data: vec![T::default(); size], 15 | } 16 | } 17 | 18 | pub fn from_vec(data: Vec) -> Self { 19 | Vector { data } 20 | } 21 | 22 | pub fn len(&self) -> usize { 23 | self.data.len() 24 | } 25 | 26 | pub fn is_empty(&self) -> bool { 27 | self.data.is_empty() 28 | } 29 | 30 | pub fn as_slice(&self) -> &[T] { 31 | &self.data 32 | } 33 | } 34 | 35 | impl Index for Vector { 36 | type Output = T; 37 | 38 | fn index(&self, index: usize) -> &Self::Output { 39 | &self.data[index] 40 | } 41 | } 42 | 43 | impl IndexMut for Vector { 44 | fn index_mut(&mut self, index: usize) -> &mut Self::Output { 45 | &mut self.data[index] 46 | } 47 | } 48 | 49 | impl<'a, T> IntoIterator for &'a Vector { 50 | type Item = &'a T; 51 | type IntoIter = std::slice::Iter<'a, T>; 52 | 53 | fn into_iter(self) -> Self::IntoIter { 54 | self.data.iter() 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /online-feature-store/internal/data/repositories/provider/init.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | "sync" 5 | 6 | "github.com/Meesho/BharatMLStack/online-feature-store/internal/config" 7 | "github.com/Meesho/BharatMLStack/online-feature-store/pkg/etcd" 8 | "github.com/spf13/viper" 9 | ) 10 | 11 | var ( 12 | mut sync.Mutex 13 | ) 14 | 15 | const ( 16 | inMemoryActiveConfIds = "IN_MEM_CACHE_ACTIVE_CONFIG_IDS" 17 | p2PActiveConfIds = "P2P_CACHE_ACTIVE_CONFIG_IDS" 18 | ) 19 | 20 | func InitProvider(configManager config.Manager, etcD etcd.Etcd) { 21 | mut.Lock() 22 | defer mut.Unlock() 23 | if StorageProviderImpl == nil { 24 | err := InitStorageProvider(configManager, etcD) 25 | if err != nil { 26 | panic(err) 27 | } 28 | } 29 | 30 | if DistributedCacheProviderImpl == nil && viper.IsSet(distributedCacheConfIds) { 31 | err := InitializeDistributedCacheProvider(configManager, etcD) 32 | if err != nil { 33 | panic(err) 34 | } 35 | } 36 | 37 | if InMemoryCacheProviderImpl == nil && viper.IsSet(inMemoryActiveConfIds) { 38 | err := InitializeInMemoryCacheProvider(configManager, etcD) 39 | if err != nil { 40 | panic(err) 41 | } 42 | } 43 | 44 | if P2PCacheProviderImpl == nil && viper.IsSet(p2PActiveConfIds) { 45 | err := InitializeP2PCacheProvider(configManager, etcD) 46 | if err != nil { 47 | panic(err) 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /quick-start/db-init/scripts/verify-init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | echo "✅ Verifying all database initialization..." 6 | 7 | # Verify ScyllaDB 8 | echo -n " 🗃️ ScyllaDB keyspace 'onfs'... " 9 | if cqlsh scylla 9042 -e "DESCRIBE KEYSPACE onfs;" > /dev/null 2>&1; then 10 | echo "✅" 11 | else 12 | echo "❌" 13 | exit 1 14 | fi 15 | 16 | # Verify MySQL 17 | echo -n " 🗂️ MySQL admin user... " 18 | ADMIN_COUNT=$(mysql -hmysql -uroot -proot --skip-ssl testdb -sN -e "SELECT COUNT(*) FROM users WHERE email='admin@admin.com';" 2>/dev/null || echo "0") 19 | if [ "$ADMIN_COUNT" -eq 1 ]; then 20 | echo "✅" 21 | else 22 | echo "❌" 23 | exit 1 24 | fi 25 | 26 | # Verify etcd 27 | echo -n " 🔧 etcd configuration key... " 28 | if etcdctl --endpoints=http://etcd:2379 get /config/onfs > /dev/null 2>&1; then 29 | echo "✅" 30 | else 31 | echo "❌" 32 | exit 1 33 | fi 34 | 35 | # Test Redis connectivity 36 | echo -n " 🗄️ Redis connectivity... " 37 | if redis-cli -h redis ping > /dev/null 2>&1; then 38 | echo "✅" 39 | else 40 | echo "❌" 41 | exit 1 42 | fi 43 | 44 | echo "" 45 | echo "🎉 All database services initialized and verified successfully!" 46 | echo "" 47 | echo "📋 Summary:" 48 | echo " • ScyllaDB: 'onfs' keyspace ready" 49 | echo " • MySQL: All tables created, admin user: admin@admin.com" 50 | echo " • etcd: Configuration keys set" 51 | echo " • Redis: Ready for caching" -------------------------------------------------------------------------------- /go-sdk/pkg/proto/onfs/retrieve.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package retrieve; 3 | 4 | option go_package = "../retrieve"; 5 | 6 | message Keys { 7 | repeated string cols = 1; 8 | } 9 | 10 | message Query { 11 | string entity_label = 1; 12 | repeated FeatureGroup feature_groups = 2; 13 | repeated string keys_schema = 3; 14 | repeated Keys keys = 4; 15 | } 16 | 17 | message Feature { 18 | string label = 1; 19 | int32 column_idx = 2; 20 | } 21 | 22 | message FeatureSchema { 23 | string feature_group_label = 1; 24 | repeated Feature features = 2; 25 | } 26 | 27 | message Row { 28 | repeated string keys = 1; 29 | repeated bytes columns = 2; 30 | } 31 | 32 | message Result { 33 | string entity_label = 1; 34 | repeated string keys_schema = 2; 35 | repeated FeatureSchema feature_schemas = 3; 36 | repeated Row rows = 4; 37 | } 38 | 39 | message DecodedResult { 40 | repeated string keys_schema = 1; 41 | repeated FeatureSchema feature_schemas = 2; 42 | repeated DecodedRow rows = 3; 43 | } 44 | 45 | message DecodedRow { 46 | repeated string keys = 1; 47 | repeated string columns = 2; 48 | } 49 | 50 | message FeatureGroup { 51 | string label = 1; 52 | repeated string feature_labels = 2; 53 | } 54 | 55 | service FeatureService { 56 | rpc RetrieveFeatures(Query) returns (Result) {}; 57 | rpc RetrieveDecodedResult(Query) returns (DecodedResult) {}; 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /online-feature-store/internal/quantization/quantization.go: -------------------------------------------------------------------------------- 1 | package quantization 2 | 3 | import ( 4 | "github.com/Meesho/BharatMLStack/online-feature-store/internal/types" 5 | ) 6 | 7 | // quantize processes a 3D byte matrix and converts its elements based on the specified source and requested data types for each column. 8 | // 9 | // Parameters: 10 | // - matrix: 3D matrix containing all the feature values 11 | // - columnSourceDatatypeMap: A map where the key is the column name and the value is the source data type for that column. 12 | // - columnRequestedDatatypeMap: A map where the key is the column name and the value is the requested data type for that column. 13 | // - matrixColumnIndexMap: A map where the key is the column name and the value is the index of that column in the matrix. 14 | func quantize(matrix [][][]byte, 15 | columnSourceDatatypeMap map[string]types.DataType, 16 | columnRequestedDatatypeMap map[string]types.DataType, matrixColumnIndexMap map[string]int) { 17 | 18 | rows := len(matrix) 19 | 20 | for columnName, requiredDataType := range columnRequestedDatatypeMap { 21 | 22 | columnIndex := matrixColumnIndexMap[columnName] 23 | 24 | quantizeByteSlice, _ := GetQuantizationFunction(columnSourceDatatypeMap[columnName], requiredDataType) 25 | 26 | for i := 0; i < rows; i++ { 27 | matrix[i][columnIndex] = quantizeByteSlice(matrix[i][columnIndex]) 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/bharatml_commons/proto/retrieve.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package retrieve; 3 | 4 | option go_package = "../retrieve"; 5 | 6 | message Keys { 7 | repeated string cols = 1; 8 | } 9 | 10 | message Query { 11 | string entity_label = 1; 12 | repeated FeatureGroup feature_groups = 2; 13 | repeated string keys_schema = 3; 14 | repeated Keys keys = 4; 15 | } 16 | 17 | message Feature { 18 | string label = 1; 19 | int32 column_idx = 2; 20 | } 21 | 22 | message FeatureSchema { 23 | string feature_group_label = 1; 24 | repeated Feature features = 2; 25 | } 26 | 27 | message Row { 28 | repeated string keys = 1; 29 | repeated bytes columns = 2; 30 | } 31 | 32 | message Result { 33 | string entity_label = 1; 34 | repeated string keys_schema = 2; 35 | repeated FeatureSchema feature_schemas = 3; 36 | repeated Row rows = 4; 37 | } 38 | 39 | message DecodedResult { 40 | repeated string keys_schema = 1; 41 | repeated FeatureSchema feature_schemas = 2; 42 | repeated DecodedRow rows = 3; 43 | } 44 | 45 | message DecodedRow { 46 | repeated string keys = 1; 47 | repeated string columns = 2; 48 | } 49 | 50 | message FeatureGroup { 51 | string label = 1; 52 | repeated string feature_labels = 2; 53 | } 54 | 55 | service FeatureService { 56 | rpc RetrieveFeatures(Query) returns (Result) {}; 57 | rpc RetrieveDecodedResult(Query) returns (DecodedResult) {}; 58 | } -------------------------------------------------------------------------------- /.github/workflows/horizon.yml: -------------------------------------------------------------------------------- 1 | name: Horizon CI 2 | 3 | on: 4 | pull_request: 5 | branches: [master, develop] 6 | paths: ['horizon/**'] 7 | push: 8 | branches: [master, develop] 9 | paths: ['horizon/**'] 10 | 11 | jobs: 12 | build-horizon: 13 | runs-on: ubuntu-latest 14 | defaults: 15 | run: 16 | working-directory: ./horizon 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v4 20 | 21 | - name: Set up Go 22 | uses: actions/setup-go@v4 23 | with: 24 | go-version: '1.23' 25 | cache: false 26 | 27 | - name: Cache Go modules 28 | uses: actions/cache@v3 29 | with: 30 | path: | 31 | ~/.cache/go-build 32 | ~/go/pkg/mod 33 | key: ${{ runner.os }}-go-horizon-${{ hashFiles('horizon/go.sum') }} 34 | restore-keys: | 35 | ${{ runner.os }}-go-horizon- 36 | 37 | - name: Download dependencies 38 | run: go mod download 39 | 40 | - name: Run tests 41 | run: go test -v ./... 42 | 43 | - name: Build application 44 | run: go build -v ./... 45 | 46 | - name: Run go vet 47 | run: go vet ./... 48 | 49 | - name: Install staticcheck 50 | run: go install honnef.co/go/tools/cmd/staticcheck@latest 51 | 52 | - name: Run staticcheck 53 | run: staticcheck ./... -------------------------------------------------------------------------------- /online-feature-store/pkg/proto/retrieve.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package retrieve; 3 | 4 | option go_package = "../retrieve"; 5 | 6 | message Keys { 7 | repeated string cols = 1; 8 | } 9 | 10 | message Query { 11 | string entity_label = 1; 12 | repeated FeatureGroup feature_groups = 2; 13 | repeated string keys_schema = 3; 14 | repeated Keys keys = 4; 15 | } 16 | 17 | message Feature { 18 | string label = 1; 19 | int32 column_idx = 2; 20 | } 21 | 22 | message FeatureSchema { 23 | string feature_group_label = 1; 24 | repeated Feature features = 2; 25 | } 26 | 27 | message Row { 28 | repeated string keys = 1; 29 | repeated bytes columns = 2; 30 | } 31 | 32 | message Result { 33 | string entity_label = 1; 34 | repeated string keys_schema = 2; 35 | repeated FeatureSchema feature_schemas = 3; 36 | repeated Row rows = 4; 37 | } 38 | 39 | message DecodedResult { 40 | repeated string keys_schema = 1; 41 | repeated FeatureSchema feature_schemas = 2; 42 | repeated DecodedRow rows = 3; 43 | } 44 | 45 | message DecodedRow { 46 | repeated string keys = 1; 47 | repeated string columns = 2; 48 | } 49 | 50 | message FeatureGroup { 51 | string label = 1; 52 | repeated string feature_labels = 2; 53 | } 54 | 55 | service FeatureService { 56 | rpc RetrieveFeatures(Query) returns (Result) {}; 57 | rpc RetrieveDecodedResult(Query) returns (DecodedResult) {}; 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /docs/assets/js/393be207.81b456e5.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4134],{591:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>c,default:()=>l,frontMatter:()=>s,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"type":"mdx","permalink":"/BharatMLStack/markdown-page","source":"@site/src/pages/markdown-page.md","title":"Markdown page example","description":"You don\'t need React to write simple standalone pages.","frontMatter":{"title":"Markdown page example"},"unlisted":false}');var o=n(4848),r=n(8453);const s={title:"Markdown page example"},c="Markdown page example",p={},d=[];function i(e){const t={h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"markdown-page-example",children:"Markdown page example"})}),"\n",(0,o.jsx)(t.p,{children:"You don't need React to write simple standalone pages."})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>c});var a=n(6540);const o={},r=a.createContext(o);function s(e){const t=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(r.Provider,{value:t},e.children)}}}]); -------------------------------------------------------------------------------- /helix-client/pkg/httpframework/httpframework.go: -------------------------------------------------------------------------------- 1 | package httpframework 2 | 3 | import ( 4 | "os" 5 | "sync" 6 | 7 | "github.com/Meesho/BharatMLStack/helix-client/pkg/middleware" 8 | "github.com/gin-gonic/gin" 9 | "github.com/rs/zerolog/log" 10 | "github.com/spf13/viper" 11 | ) 12 | 13 | var ( 14 | router *gin.Engine 15 | once sync.Once 16 | ) 17 | 18 | // Init initializes gin engine with the given middlewares 19 | // It sets the gin mode to release if the environment is production and use the middleware logger and recovery 20 | func Init(middlewares ...gin.HandlerFunc) { 21 | once.Do(func() { 22 | env := os.Getenv("APP_ENV") 23 | if env == "prod" || env == "production" { 24 | gin.SetMode(gin.ReleaseMode) 25 | } 26 | appName := viper.GetString("APP_NAME") 27 | if appName == "" { 28 | log.Fatal().Msg("APP_NAME cannot be empty!!!") 29 | } 30 | router = gin.New() 31 | middlewares = append(middlewares, middleware.HTTPLogger(), middleware.HTTPRecovery()) 32 | router.Use(middlewares...) 33 | }) 34 | } 35 | 36 | // Instance returns the httpframework instance 37 | func Instance() *gin.Engine { 38 | if router == nil { 39 | log.Fatal().Msg("Router not initialized") 40 | } 41 | return router 42 | } 43 | 44 | // ResetForTesting resets the global state for testing purposes 45 | // This function should only be used in tests 46 | func ResetForTesting() { 47 | router = nil 48 | once = sync.Once{} 49 | } 50 | -------------------------------------------------------------------------------- /go-sdk/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/Meesho/BharatMLStack/go-sdk 2 | 3 | go 1.24.4 4 | 5 | require ( 6 | github.com/rs/zerolog v1.34.0 7 | github.com/stretchr/testify v1.10.0 8 | go.etcd.io/etcd/client/v3 v3.5.17 9 | google.golang.org/grpc v1.68.2 10 | google.golang.org/protobuf v1.36.6 11 | ) 12 | 13 | require ( 14 | github.com/coreos/go-semver v0.3.0 // indirect 15 | github.com/coreos/go-systemd/v22 v22.5.0 // indirect 16 | github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect 17 | github.com/gogo/protobuf v1.3.2 // indirect 18 | github.com/golang/protobuf v1.5.4 // indirect 19 | github.com/mattn/go-colorable v0.1.13 // indirect 20 | github.com/mattn/go-isatty v0.0.19 // indirect 21 | github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect 22 | github.com/stretchr/objx v0.5.2 // indirect 23 | go.etcd.io/etcd/api/v3 v3.5.17 // indirect 24 | go.etcd.io/etcd/client/pkg/v3 v3.5.17 // indirect 25 | go.uber.org/atomic v1.9.0 // indirect 26 | go.uber.org/multierr v1.9.0 // indirect 27 | go.uber.org/zap v1.21.0 // indirect 28 | golang.org/x/net v0.32.0 // indirect 29 | golang.org/x/sys v0.28.0 // indirect 30 | golang.org/x/text v0.21.0 // indirect 31 | google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect 32 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect 33 | gopkg.in/yaml.v3 v3.0.1 // indirect 34 | ) 35 | -------------------------------------------------------------------------------- /.github/workflows/inferflow.yml: -------------------------------------------------------------------------------- 1 | name: Inferflow CI 2 | 3 | on: 4 | pull_request: 5 | branches: [master, develop] 6 | paths: ['inferflow/**'] 7 | push: 8 | branches: [master, develop] 9 | paths: ['inferflow/**'] 10 | 11 | jobs: 12 | build-inferflow: 13 | runs-on: ubuntu-latest 14 | defaults: 15 | run: 16 | working-directory: ./inferflow 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v4 20 | 21 | - name: Set up Go 22 | uses: actions/setup-go@v4 23 | with: 24 | go-version: '1.24' 25 | cache: false 26 | 27 | - name: Cache Go modules 28 | uses: actions/cache@v3 29 | with: 30 | path: | 31 | ~/.cache/go-build 32 | ~/go/pkg/mod 33 | key: ${{ runner.os }}-go-inferflow-${{ hashFiles('inferflow/go.sum') }} 34 | restore-keys: | 35 | ${{ runner.os }}-go-inferflow- 36 | 37 | - name: Download dependencies 38 | run: go mod download 39 | 40 | - name: Run tests 41 | run: go test -v ./... 42 | 43 | - name: Build application 44 | run: go build -v ./... 45 | 46 | - name: Run go vet 47 | run: go vet ./... 48 | 49 | - name: Install staticcheck 50 | run: go install honnef.co/go/tools/cmd/staticcheck@latest 51 | 52 | - name: Run staticcheck 53 | run: staticcheck ./... 54 | 55 | -------------------------------------------------------------------------------- /py-sdk/bharatml_commons/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["hatchling"] 3 | build-backend = "hatchling.build" 4 | 5 | [project] 6 | name = "bharatml_commons" 7 | dynamic = ["version"] 8 | authors = [ 9 | { name="Jaya Kommuru", email="jaya.kommuru@meesho.com"}, 10 | { name="BharatML Stack Team", email="bharatml@meesho.com"} 11 | ] 12 | 13 | description = "Common utilities and protobuf definitions for BharatML Stack" 14 | license = { text = "BharatMLStack Business Source License 1.1" } 15 | readme = "README.md" 16 | requires-python = ">=3.7" 17 | dependencies = [ 18 | "protobuf>=4.24.1", 19 | "requests>=2.25.0" 20 | ] 21 | 22 | classifiers = [ 23 | "Programming Language :: Python :: 3", 24 | "License :: Other/Proprietary License", 25 | "Operating System :: OS Independent", 26 | ] 27 | 28 | [project.urls] 29 | "Homepage" = "https://github.com/Meesho/BharatMLStack" 30 | "Bug Tracker" = "https://github.com/Meesho/BharatMLStack/issues" 31 | "Source" = "https://github.com/Meesho/BharatMLStack/tree/main/py-sdk/bharatml_commons" 32 | 33 | [tool.hatch.version] 34 | path = "VERSION" 35 | pattern = "(?P[^\\s]+)" 36 | 37 | [tool.hatch.build.targets.wheel] 38 | packages = ["bharatml_commons"] 39 | 40 | [project.optional-dependencies] 41 | dev = ["pytest>=6.0", "black", "isort", "mypy", "flake8"] 42 | 43 | [tool.flake8] 44 | exclude = [ 45 | "proto", 46 | "build", 47 | "dist", 48 | "*.egg-info" 49 | ] 50 | -------------------------------------------------------------------------------- /py-sdk/grpc_feature_client/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["hatchling"] 3 | build-backend = "hatchling.build" 4 | 5 | [project] 6 | name = "grpc_feature_client" 7 | dynamic = ["version"] 8 | authors = [ 9 | { name="Jaya Kommuru", email="jaya.kommuru@meesho.com"}, 10 | { name="BharatML Stack Team", email="bharatml@meesho.com"} 11 | ] 12 | 13 | description = "High-performance gRPC client for BharatML Stack real-time feature operations" 14 | license = { text = "BharatMLStack Business Source License 1.1" } 15 | readme = "README.md" 16 | requires-python = ">=3.7" 17 | dependencies = [ 18 | "bharatml_commons>=1.0.1", 19 | "grpcio>=1.50.0", 20 | "grpcio-tools>=1.50.0" 21 | ] 22 | 23 | classifiers = [ 24 | "Programming Language :: Python :: 3", 25 | "License :: Other/Proprietary License", 26 | "Operating System :: OS Independent", 27 | ] 28 | 29 | [project.urls] 30 | "Homepage" = "https://github.com/Meesho/BharatMLStack" 31 | "Bug Tracker" = "https://github.com/Meesho/BharatMLStack/issues" 32 | "Source" = "https://github.com/Meesho/BharatMLStack/tree/main/py-sdk/grpc_feature_client" 33 | 34 | [tool.hatch.version] 35 | path = "VERSION" 36 | pattern = "(?P[^\\s]+)" 37 | 38 | [tool.hatch.build.targets.wheel] 39 | packages = ["grpc_feature_client"] 40 | 41 | [project.optional-dependencies] 42 | dev = ["pytest>=6.0", "black", "isort", "mypy", "flake8"] 43 | 44 | [tool.flake8] 45 | exclude = [ 46 | "build", 47 | "dist", 48 | "*.egg-info" 49 | ] -------------------------------------------------------------------------------- /horizon/pkg/etcd/init.go: -------------------------------------------------------------------------------- 1 | package etcd 2 | 3 | import ( 4 | "github.com/rs/zerolog/log" 5 | "github.com/spf13/viper" 6 | ) 7 | 8 | var ( 9 | instances map[string]Etcd 10 | ) 11 | 12 | // Init initializes the Etcd client, to be called from main.go 13 | func Init(config interface{}) { 14 | appName := viper.GetString("APP_NAME") 15 | if instances == nil { 16 | instances = make(map[string]Etcd) 17 | if instances[appName] == nil { 18 | instances[appName] = newV1Etcd(config) 19 | } 20 | } 21 | } 22 | 23 | // InitFromAppName initializes the Etcd client, to be called from main.go 24 | func InitFromAppName(config interface{}, appName string) { 25 | if instances == nil { 26 | instances = make(map[string]Etcd) 27 | } 28 | 29 | if instances[appName] == nil { 30 | instances[appName] = newV1EtcdFromAppName(config, appName) 31 | } 32 | } 33 | 34 | // InitV1 initializes the Etcd client with version 1 35 | func InitV1(config interface{}) { 36 | Init(config) 37 | } 38 | 39 | // Instance returns the Etcd client instance. Ensure that Init is called before calling this function 40 | func Instance() map[string]Etcd { 41 | if instances == nil { 42 | log.Panic().Msg("etcd client not initialized, call Init first") 43 | } 44 | return instances 45 | } 46 | 47 | // SetMockInstance sets the mock instance of Etcd client 48 | // This would be handy in places where we are directly using Etcd as etcd.Instance() 49 | func SetMockInstance(mock map[string]Etcd) { 50 | instances = mock 51 | } 52 | -------------------------------------------------------------------------------- /helix-client/pkg/api/http_grpc_error_mapper.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | "google.golang.org/grpc/codes" 5 | "google.golang.org/grpc/status" 6 | "net/http" 7 | ) 8 | 9 | // ConvertHttpErrorToGrpc maps an HTTP error to a corresponding gRPC error. 10 | func ConvertHttpErrorToGrpc(httpError *Error) error { 11 | switch httpError.StatusCode { 12 | case http.StatusBadRequest: 13 | return status.New(codes.InvalidArgument, httpError.Message).Err() 14 | case http.StatusUnauthorized: 15 | return status.New(codes.Unauthenticated, httpError.Message).Err() 16 | case http.StatusForbidden: 17 | return status.New(codes.PermissionDenied, httpError.Message).Err() 18 | case http.StatusNotFound: 19 | return status.New(codes.NotFound, httpError.Message).Err() 20 | case http.StatusConflict: 21 | return status.New(codes.AlreadyExists, httpError.Message).Err() 22 | case http.StatusTooManyRequests: 23 | return status.New(codes.ResourceExhausted, httpError.Message).Err() 24 | case http.StatusInternalServerError: 25 | return status.New(codes.Internal, httpError.Message).Err() 26 | case http.StatusNotImplemented: 27 | return status.New(codes.Unimplemented, httpError.Message).Err() 28 | case http.StatusServiceUnavailable: 29 | return status.New(codes.Unavailable, httpError.Message).Err() 30 | case http.StatusGatewayTimeout: 31 | return status.New(codes.DeadlineExceeded, httpError.Message).Err() 32 | default: 33 | return status.New(codes.Unknown, "Unknown error").Err() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /py-sdk/spark_feature_push_client/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["hatchling"] 3 | build-backend = "hatchling.build" 4 | 5 | [project] 6 | name = "spark_feature_push_client" 7 | dynamic = ["version"] 8 | authors = [ 9 | { name="Jaya Kommuru", email="jaya.kommuru@meesho.com"}, 10 | { name="BharatML Stack Team", email="bharatml@meesho.com"} 11 | ] 12 | 13 | description = "Apache Spark-based client for BharatML Stack data pipeline operations" 14 | license = { text = "BharatMLStack Business Source License 1.1" } 15 | readme = "README.md" 16 | requires-python = ">=3.7" 17 | dependencies = [ 18 | "bharatml_commons>=1.0.1", 19 | "pyspark>=3.0.0", 20 | "numpy>=1.19.0" 21 | ] 22 | 23 | classifiers = [ 24 | "Programming Language :: Python :: 3", 25 | "License :: Other/Proprietary License", 26 | "Operating System :: OS Independent", 27 | ] 28 | 29 | [project.urls] 30 | "Homepage" = "https://github.com/Meesho/BharatMLStack" 31 | "Bug Tracker" = "https://github.com/Meesho/BharatMLStack/issues" 32 | "Source" = "https://github.com/Meesho/BharatMLStack/tree/main/py-sdk/spark_feature_push_client" 33 | 34 | [tool.hatch.version] 35 | path = "VERSION" 36 | pattern = "(?P[^\\s]+)" 37 | 38 | [tool.hatch.build.targets.wheel] 39 | packages = ["spark_feature_push_client"] 40 | 41 | [project.optional-dependencies] 42 | dev = ["pytest>=6.0", "black", "isort", "mypy", "flake8"] 43 | 44 | [tool.flake8] 45 | exclude = [ 46 | "build", 47 | "dist", 48 | "*.egg-info" 49 | ] -------------------------------------------------------------------------------- /helix-client/pkg/api/http/header.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | // Header constants 4 | const ( 5 | HeaderContentType = "Content-Type" 6 | HeaderAuthorization = "Authorization" 7 | HeaderAuthentication = "Authentication" 8 | HeaderCountry = "ISO-COUNTRY-CODE" 9 | HeaderLanguage = "ISO-LANGUAGE-CODE" 10 | HeaderUserId = "USER-ID" 11 | HeaderUserContext = "USER-CONTEXT" 12 | HeaderAppVersionCode = "APP-VERSION-CODE" 13 | HeaderUserCity = "USER-CITY" 14 | HeaderUserPincode = "USER-PINCODE" 15 | HeaderUserLatitude = "USER-LATITUDE" 16 | HeaderUserLongitude = "USER-LONGITUDE" 17 | HeaderUserAddressId = "USER-ADDRESS-ID" 18 | HeaderUserStateCode = "USER-STATE-CODE" 19 | HeaderParentCatalogId = "PARENT-CATALOG-ID" 20 | HeaderRealEstate = "REAL-ESTATE" 21 | HeaderUpstream = "UPSTREAM" 22 | HeaderClpId = "CLP-ID" 23 | HeaderClientId = "CLIENT-ID" 24 | HeaderTenantContext = "TENANT-CONTEXT" 25 | HeaderValueApplicationJson = "application/json" 26 | HeaderRankingHoldoutAudience = "RANKING-HOLDOUT-AUDIENCE" 27 | HeaderFeedSession = "FEED-SESSION-ID" 28 | HeaderAppSession = "APP-SESSION-ID" 29 | HeaderInstanceId = "INSTANCE-ID" 30 | HeaderSessionId = "SESSION-ID" 31 | HeaderAppUserLocation = "APP-USER-LOCATION" 32 | ) 33 | -------------------------------------------------------------------------------- /.github/workflows/trufflebox-ui.yml: -------------------------------------------------------------------------------- 1 | name: Trufflebox UI CI 2 | 3 | on: 4 | pull_request: 5 | branches: [master, develop] 6 | paths: ['trufflebox-ui/**'] 7 | push: 8 | branches: [master, develop] 9 | paths: ['trufflebox-ui/**'] 10 | 11 | jobs: 12 | build-trufflebox-ui: 13 | runs-on: ubuntu-latest 14 | defaults: 15 | run: 16 | working-directory: ./trufflebox-ui 17 | steps: 18 | - name: Checkout code 19 | uses: actions/checkout@v4 20 | 21 | - name: Set up Node.js 22 | uses: actions/setup-node@v4 23 | with: 24 | node-version: '24' 25 | 26 | - name: Cache yarn dependencies 27 | uses: actions/cache@v3 28 | with: 29 | path: | 30 | ~/.cache/yarn 31 | trufflebox-ui/node_modules 32 | key: ${{ runner.os }}-yarn-${{ hashFiles('trufflebox-ui/yarn.lock') }} 33 | restore-keys: | 34 | ${{ runner.os }}-yarn- 35 | 36 | - name: Install dependencies 37 | run: | 38 | yarn install 39 | 40 | - name: Run linter 41 | run: yarn run lint --if-present 42 | 43 | - name: Run tests 44 | run: yarn test -- --passWithNoTests --watchAll=false || echo "No tests found or test command not available" 45 | 46 | - name: Build application 47 | run: yarn run build --if-present 48 | 49 | - name: Test Docker build 50 | run: | 51 | docker build -t trufflebox-ui:test -f DockerFile . -------------------------------------------------------------------------------- /horizon/cmd/horizon/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "strconv" 5 | 6 | authRouter "github.com/Meesho/BharatMLStack/horizon/internal/auth/router" 7 | middlewares "github.com/Meesho/BharatMLStack/horizon/internal/middlewares" 8 | numerixConfig "github.com/Meesho/BharatMLStack/horizon/internal/numerix/config" 9 | numerixRouter "github.com/Meesho/BharatMLStack/horizon/internal/numerix/router" 10 | ofsConfig "github.com/Meesho/BharatMLStack/horizon/internal/online-feature-store/config" 11 | ofsRouter "github.com/Meesho/BharatMLStack/horizon/internal/online-feature-store/router" 12 | "github.com/Meesho/BharatMLStack/horizon/pkg/config" 13 | "github.com/Meesho/BharatMLStack/horizon/pkg/etcd" 14 | "github.com/Meesho/BharatMLStack/horizon/pkg/httpframework" 15 | "github.com/Meesho/BharatMLStack/horizon/pkg/infra" 16 | "github.com/Meesho/BharatMLStack/horizon/pkg/logger" 17 | "github.com/Meesho/BharatMLStack/horizon/pkg/metric" 18 | "github.com/spf13/viper" 19 | ) 20 | 21 | func main() { 22 | config.InitEnv() 23 | infra.InitDBConnectors() 24 | logger.Init() 25 | metric.Init() 26 | httpframework.Init(middlewares.NewMiddleware().GetMiddleWares()...) 27 | etcd.InitFromAppName(&ofsConfig.FeatureRegistry{}, viper.GetString("ONLINE_FEATURE_STORE_APP_NAME")) 28 | etcd.InitFromAppName(&numerixConfig.NumerixConfig{}, viper.GetString("NUMERIX_APP_NAME")) 29 | authRouter.Init() 30 | ofsRouter.Init() 31 | numerixRouter.Init() 32 | httpframework.Instance().Run(":" + strconv.Itoa(viper.GetInt("APP_PORT"))) 33 | } 34 | -------------------------------------------------------------------------------- /cli-tools/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/Meesho/BharatMLStack/cli-tools 2 | 3 | go 1.24.10 4 | 5 | require ( 6 | github.com/coreos/go-semver v0.3.0 // indirect 7 | github.com/coreos/go-systemd/v22 v22.3.2 // indirect 8 | github.com/go-sql-driver/mysql v1.7.0 // indirect 9 | github.com/gocql/gocql v1.7.0 // indirect 10 | github.com/gogo/protobuf v1.3.2 // indirect 11 | github.com/golang/protobuf v1.5.4 // indirect 12 | github.com/golang/snappy v0.0.3 // indirect 13 | github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect 14 | github.com/jinzhu/inflection v1.0.0 // indirect 15 | github.com/jinzhu/now v1.1.5 // indirect 16 | go.etcd.io/etcd/api/v3 v3.5.17 // indirect 17 | go.etcd.io/etcd/client/pkg/v3 v3.5.17 // indirect 18 | go.etcd.io/etcd/client/v3 v3.5.17 // indirect 19 | go.uber.org/atomic v1.7.0 // indirect 20 | go.uber.org/multierr v1.6.0 // indirect 21 | go.uber.org/zap v1.17.0 // indirect 22 | golang.org/x/net v0.23.0 // indirect 23 | golang.org/x/sys v0.18.0 // indirect 24 | golang.org/x/text v0.14.0 // indirect 25 | google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect 26 | google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect 27 | google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect 28 | google.golang.org/grpc v1.59.0 // indirect 29 | google.golang.org/protobuf v1.33.0 // indirect 30 | gopkg.in/inf.v0 v0.9.1 // indirect 31 | gorm.io/driver/mysql v1.5.6 // indirect 32 | gorm.io/gorm v1.25.10 // indirect 33 | ) 34 | --------------------------------------------------------------------------------