48 Star 362 Fork 82

GVP第四范式 / OpenMLDB

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

openmldb_logo

build status docker pulls slack discuss release license gitee maven central maven central pypi

English | 中文

目录

  1. 设计理念
  2. 生产级机器学习特征平台
  3. 核心特性
  4. FAQ
  5. 下载和安装
  6. QuickStart
  7. 使用案例
  8. OpenMLDB 文档
  9. Roadmap
  10. 社区贡献
  11. 加入社区
  12. 学术论文
  13. 用户列表

OpenMLDB 是一个开源机器学习数据库,提供线上线下一致的生产级特征平台。

1. 设计理念

在人工智能工程化落地过程中,企业的数据和工程化团队 95% 的时间精力会被数据处理、数据校验等相关工作所消耗。为了解决该痛点,头部企业会花费上千小时自研构建数据与特征平台,来解决诸如线上线下一致性、数据穿越、特征回填、高并发低延迟等工程挑战;其他中小企业则需要采购高昂的 SaaS 工具和数据治理服务。

OpenMLDB 致力于解决 AI 工程化落地的数据治理难题,并且已经在上百个企业级人工智能场景中得到落地。OpenMLDB 优先开源了特征数据治理能力,依托 SQL 的开发能力,为企业级机器学习应用提供线上线下计算一致、高性能低门槛的生产级特征平台。

2. 生产级机器学习特征平台

在机器学习的很多应用场景中,为了获得高业务价值的模型,对于实时特征有很强的需求,比如实时的个性化推荐、风控、反欺诈等。但是,由数据科学家所构建的特征计算脚本(一般基于 Python 开发),由于无法满足低延迟、高吞吐、高可用等生产级特性,因此无法直接上线。为了在生产环境中上线特征脚本用于模型推理,并且满足实时计算的性能要求,往往需要工程化团队进行代码重构和优化。那么,由于两个团队、两套系统参与了从离线开发到部署上线的全流程,线上线下一致性校验成为一个必不可少的步骤,其往往需要耗费大量的沟通成本、开发成本,和测试成本。

OpenMLDB 的整体架构设计是为了达到特征平台从开发到部署的流程优化目标:开发即上线 ,以此来大幅降低人工智能的落地成本。其完成从特征的离线开发到上线部署,只需要三个步骤:

  • 步骤一:使用 SQL 进行离线特征脚本开发,用于模型训练
  • 步骤二:SQL 特征脚本一键部署上线,由线下模式切换为线上模式
  • 步骤三:接入实时数据,进行线上实时特征计算,用于模型推理

workflow_cn

为了可以达到开发即上线的优化目标,OpenMLDB 的架构基于线上线下一致性的理念所设计。上图显示了 OpenMLDB 的抽象架构,包含了四个重要的设计组件:(1)统一的 SQL 编程语言;(2)具备毫秒级延迟的高性能实时 SQL 引擎;(3)基于 OpenMLDB Spark 发行版批处理 SQL 引擎;(4)串联实时和批处理 SQL 引擎,保证线上线下一致性的一致性执行计划生成器

关于 OpenMLDB 的设计核心理念和详细架构,请参考我们的开发团队博客 - 实时特征计算平台架构方法论和实践

3. 核心特性

  • 线上线下一致性: 离线和实时特征计算引擎使用统一的执行计划生成器,线上线下计算一致性得到了天然的保证。
  • 毫秒级超低延迟的实时 SQL 引擎:线上实时 SQL 引擎基于完全自研的高性能时序数据库,对于实时特征计算可以达到毫秒级别的延迟,性能远超出流行商业内存数据库(Figures 9 & 10 of the VLDB 2021 paper ),充分满足高并发、低延迟的实时计算性能需求。
  • 基于 SQL 定义特征: 基于 SQL 进行特征定义和管理,并且针对特征计算,对标准 SQL 进行了增强,引入了诸如 LAST JOINWINDOW UNION 等定制化语法和功能扩充。
  • 生产级特性: 为大规模企业应用而设计,整合诸多生产级特性,包括分布式存储和计算、灾备恢复、高可用、可无缝扩缩容、可平滑升级、可监控、异构内存架构支持等。

4. FAQ

  1. 主要使用场景是什么?

    目前主要面向人工智能应用,提供高效的线上线下一致性的特征平台,特别针对实时特征需求做了深度优化,达到毫秒级的计算延迟。此外,OpenMLDB 本身也包含了一个高效且功能完备的时序数据库,使用于金融、IoT、数据标注等领域。

  2. OpenMLDB 是如何发展起来的?

    OpenMLDB 起源于领先的人工智能平台提供商第四范式的商业软件。其研发团队在 2021 年将商业产品中作为特征工程的核心组件进行了抽象、增强、以及社区友好化,将它们形成了一个系统的开源产品,以帮助更多的企业低成本实现人工智能转型。在开源之前,OpenMLDB 已经作为第四范式的商业化组件之一在上百个场景中得到了部署和上线。

  3. OpenMLDB 是否是一个 feature store?

    OpenMLDB 认为是目前普遍定义的 feature store 类产品的一个超集。除了可以同时在线下和线上供给正确的特征以外,其主要优势在于提供毫秒级的实时特征。我们看到,今天在市场上大部分的 feature store 是将离线异步计算好的特征同步到线上,但是并不具备毫秒级的实时特征计算能力。而保证线上线下一致性的高性能实时特征计算,正是 OpenMLDB 所擅长的场景。

  4. OpenMLDB 为什么选择 SQL 作为开发语言?

    SQL 具备表达语法简洁且功能强大的特点,选用 SQL 和数据库开发体验一方面降低开发门槛,另一方面更易于跨部门之间的协作和共享。此外,基于 OpenMLDB 的实践经验表明,经过优化过的 SQL 在特征计算的表达上功能完备,已经经历了长时间的实践考验。

5. 下载和安装

6. QuickStart

OpenMLDB 快速上手指南

7. 使用案例

我们正在搜集一个 OpenMLDB 用于实际案例的列表,为 OpenMLDB 如何在你的业务中发挥价值提供参考。

应用 所用工具 简介
出租车行程时间预测 OpenMLDB, LightGBM 这是个来自 Kaggle 的挑战,用于预测纽约市的出租车行程时间。你可以从这里阅读更多关于该应用场景的描述。本案例展示使用 OpenMLDB + LightGBM 的开源方案,快速搭建完整的机器学习应用。
使用 Pulsar connector 接入实时数据流 OpenMLDB, Pulsar, OpenMLDB-Pulsar connector Apache Pulsar 是一个高性能的云原生的消息队列平台,基于 OpenMLDB-Pulsar connector,我们可以高效的将 Pulsar 的数据流作为 OpenMLDB 的在线数据源,实现两者的无缝整合。
使用 Kafka connector 接入实时数据流 OpenMLDB, Kafka, OpenMLDB-Kafka connector Apache Kafka 是一个分布式消息流平台。基于 OpenMLDB-Kafka connector,实时数据流可以被简单的引入到 OpenMLDB 作为在线数据源。
使用 RocketMQ 接入实时数据流 OpenMLDB, RocketMQ, OpenMLDB-RocketMQ connector Apache RocketMQ 是一个云原生“消息、事件、流”实时数据处理平台,使用 OpenMLDB-RocketMQ connector,可以将实时数据从 RocketMQ 高效的引入到 OpenMLDB,进行实时计算。
在 DolphinScheduler 中构建端到端的机器学习工作流 OpenMLDB, DolphinScheduler, OpenMLDB task plugin 这个案例新演示了基于 OpenMLDB 和 DolphinScheduler(一个开源的工作流任务调度平台)来构建一个完整的机器学习工作流,包括了特征工程、模型训练,以及部署上线。
在线广告点击欺诈检测 OpenMLDB, XGBoost 该案例演示了基于 OpenMLDB 以及 XGBoost 去构建一个在线广告反欺诈的应用
基于 SQL 构建机器学习全流程 OpenMLDB, Byzer, OpenMLDB Plugin for Byzer Byzer 是一门面向 Data 和 AI 的低代码、云原生的开源编程语言。Byzer 已经把 OpenMLDB 整合在内,用来一起构建完整的机器学习应用全流程。
在 Airflow 中构建机器学习应用 OpenMLDB, Airflow, Airflow OpenMLDB Provider, XGBoost Airflow 是一个流行的工作流编排和管理软件。该案例展示了如何在 Airflow 内,通过提供的 provder package,来方便的编排基于 OpenMLDB 的机器学习任务。
精准营销 OpenMLDB, OneFlow OneFlow 是一个用户友好、可扩展、高效的深度学习框架。改案例展示了如何使用 OpenMLDB 做特征工程,串联 OneFlow 进行模型训练和预测,来构造一个用于精准营销的机器学习应用

8. OpenMLDB 文档

9. Roadmap

请参照我们公开的 Roadmap

此外,OpenMLDB 有一些规划中的重要功能演进,但是尚未具体排期,欢迎给我们任何反馈:

  • Cloud-native 版本
  • 整合自动特征生成
  • 基于异构存储和异构计算资源进行优化
  • 轻量级 edge 版本

10. 社区贡献

我们非常感谢来自社区的贡献。

  • 如果你对于加入 OpenMLDB 开发者感兴趣,请在提交代码之前阅读我们的 Contribution Guideline
  • 如果你是一位新加入的贡献者,你可以从我们的这个 good first issue 列表开始。
  • 如果你是有一定的开发经验,可以查找 call-for-contributions 标签的 issues。
  • 也可以阅读我们这个文档来了解不同层级的开发任务,参与和开发者讨论

Open in Gitpod

11. 加入社区

12. 学术论文

13. 用户列表

我们创建了一个用于搜集用户使用反馈意见的用户列表。我们非常感激我们的社区用户可以留下基于 OpenMLDB 的使用案例、意见、或者任何反馈。我们非常期待听到你的声音!

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

OpenMLDB是一个开源机器学习数据库,面向机器学习应用提供正确、高效数据供给。 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/paradigm4/OpenMLDB.git
git@gitee.com:paradigm4/OpenMLDB.git
paradigm4
OpenMLDB
OpenMLDB
main

搜索帮助

14c37bed 8189591 565d56ea 8189591