Snorkel

一个在监督弱化的情况下快速生成训练数据的系统。「A system for quickly generating training data with weak supervision」

Github星跟蹤圖

Snorkel

以编程方式构建和管理训练数据。

公告

Snorkel 团队现在将工作重点放在 Snorkel Flow,这是一个基于 Snorkel 背后核心思想的端到端 AI 应用程序开发平台,请在此处查看。

2016年,斯坦福大学(Stanford)启动了 Snorkel 项目,当时有一个简单的技术押注:决定机器学习项目成功或失败的是越来越多的训练数据,而不是模型、算法或基础设施。在此前提下,我们着手探索一个激进的想法,即将数学和系统结构引入到混乱的、通常完全手工的训练数据创建和管理过程,允许用户以编程方式标记、构建和管理训练数据。

要说 Snorkel 项目成功了并且超出了我们的预期,那就轻描淡写了。像 Snorkel 这样的研究仓库的基本目标是为测试和验证假设提供一个最小的可行框架。四年后,我们不仅幸运地做到了这一点,而且还与 Google、英特尔、斯坦福大学等世界领先组织合作开发和部署了早期版本的 Snorkel;在超过 36 个经同行评审的出版物上发表有关我们在 Snorkel 方面的发现以及弱监督建模、数据增强、多任务学习等方面的相关创新的文章;包括在一流大学的课程中;在你最近几个小时可能用到的系统中支持生产部署;与来自工业界、医学界、政府、学术界及其他领域的研究人员和从业人员组成的一个了不起的社区一起工作。

然而,从每周的办公时间、研讨会、在线讨论和行业合作伙伴与用户的对话中,我们越来越意识到,Snorkel 项目只是第一步。 Snorkel 背后的理念不仅改变了如何标记训练数据,而且改变了构建、部署和管理 ML 的整个生命周期和管道:用户如何注入知识;如何构建、训练、检查、版本控制和监视模型;如何迭代开发整个管道;以及如何将任何 ML 部署中的全部涉众(从主题专家到 ML 工程师)整合到流程中。

在过去的一年里,我们一直在构建平台来支持这个更广阔的愿景:Snorkel Flow,一个用于开发和部署 AI 应用程序的端到端机器学习平台。在过去的一年中,我们一直在构建一个平台来支持更广阔的视野:Snorkel Flow,这是一个用于开发和部署AI应用程序的端到端机器学习平台。 Snorkel Flow 将 Snorkel 项目的许多概念与一系列新技术结合在一起,这些新技术围绕弱监督模型、数据增强、多任务学习、数据切片和结构化、监视和分析等等,所有这些以一种方式集成在一起它比其各个部分的总和还大,并且我们认为它使ML真正比以往任何时候都更快、更灵活、更实用。

展望未来,我们将专注于 Snorkel Flow。我们非常感谢为Snorkel项目做出贡献的所有人,并很高兴您在这里查看我们的下一章。

快速链接

入门

熟悉 Snorkel 库的最快方法是浏览 Snorkel 网站上的“入门”页面,然后浏览 Snorkel 教程存储库中的完整教程。 这些教程演示了将 Snorkel 应用于自己的应用程序时可以用作模板的各种任务、领域、标记技术和集成。

安装

Snorkel 需要 Python 3.6 或更高版本。 要安装 Snorkel,我们建议使用 pip:

pip install snorkel

或 conda:

conda install snorkel -c conda-forge

有关从源安装和对 Snorkel 进行贡献的信息,请参阅我们的贡献准则。

使用 conda 安装的详细信息

以下示例命令为使用 conda 安装提供了更多颜色。 这些命令假定您的 conda 安装是 Python 3.6,并且您要使用一个称为 snorkel-env 的虚拟环境。

# [OPTIONAL] Activate a virtual environment called "snorkel"
conda create --yes -n snorkel-env python=3.6
conda activate snorkel-env
# We specify PyTorch here to ensure compatibility, but it may not be necessary.
conda install pytorch==1.1.0 -c pytorch
conda install snorkel==0.9.0 -c conda-forge

Windows 用户快速注意事项

如果您使用的是 Windows,我们强烈建议您使用 Docker(您可以在我们的教程存储库中找到一个示例)或 Linux 子系统。我们已经在 Windows 上进行了有限的测试,因此,如果您想提供说明或改进,请随时打开 PR!

讨论区

问题

我们使用 GitHub Issues 发布 bug 和功能请求-任何与代码相关的内容。只要确保您首先搜索相关问题并使用我们的问题模板即可。如果即时解决方案不适合核心开发团队的近期规划,我们可能会要求您提供帮助。

贡献

我们欢迎来自 Snorkel 社区的贡献!这可能是可以将您想看到的更改放入库中最快的方式。

少量贡献可以直接在拉取请求(PR)中进行。如果您想提供更大的功能,我们建议您先创建一个带有建议设计的问题进行讨论。有关如何处理的想法,我们将特定问题标记为 help wanted

要设置开发环境以向 Snorkel 做出贡献,请参阅我们的贡献准则。所有 PR 都必须通过持续集成测试,并获得 Snorkel 开发团队成员的批准,然后才能合并。

社区论坛

有关更广泛的问答,有关使用 Snorkel 的讨论,教程要求等,请使用 Spectrum 上托管的 Snorkel 社区论坛。我们希望这将是您与其他 Snorkel 用户进行交互的场所 -- 请不要羞于发布!

公告内容

要了解有关 Snorkel 的最新公告(例如版本发布,即将举行的研讨会),请订阅 Snorkel 邮件列表。我们承诺尊重您的收件箱 -- 交流将非常稀少!

推特

在 Twitter @SnorkelML 上关注我们。

(The first version translated by vz on 2020.07.18)

(The first version translated by vz on 2020.07.19)

主要指標

概覽
名稱與所有者snorkel-team/snorkel
主編程語言Python
編程語言Python (語言數: 1)
平台Linux, Mac, Windows, Docker
許可證Apache License 2.0
所有者活动
創建於2016-02-26 05:52:45
推送於2024-05-02 18:39:42
最后一次提交2022-04-08 20:12:43
發布數20
最新版本名稱v0.10.0 (發布於 2024-02-27 14:28:51)
第一版名稱v0.4.alpha (發布於 2016-08-29 14:16:34)
用户参与
星數5.9k
關注者數164
派生數857
提交數2.7k
已啟用問題?
問題數980
打開的問題數16
拉請求數644
打開的拉請求數0
關閉的拉請求數102
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

PyPI - Python Version
PyPI
Conda
build
docs
coverage
license
Join the community on Spectrum

Programmatically Build and Manage Training Data

Quick Links

Getting Started

The quickest way to familiarize yourself with the Snorkel library is to walk through the Get Started page on the Snorkel website, followed by the full-length tutorials in the Snorkel tutorials repository.
These tutorials demonstrate a variety of tasks, domains, labeling techniques, and integrations that can serve as templates as you apply Snorkel to your own applications.

Installation

Snorkel requires Python 3.6 or later. To install Snorkel, we recommend using pip:

pip install snorkel

or conda:

conda install snorkel -c conda-forge

For information on installing from source and contributing to Snorkel, see our
contributing guidelines.

The following example commands give some more color on installing with conda.
These commands assume that your conda installation is Python 3.6,
and that you want to use a virtual environment called snorkel-env.

# [OPTIONAL] Activate a virtual environment called "snorkel"
conda create --yes -n snorkel-env python=3.6
conda activate snorkel-env

# We specify PyTorch here to ensure compatibility, but it may not be necessary.
conda install pytorch==1.1.0 -c pytorch
conda install snorkel==0.9.0 -c conda-forge

If you're using Windows, we highly recommend using Docker
(you can find an example in our
tutorials repo)
or the Linux subsystem.
We've done limited testing on Windows, so if you want to contribute instructions
or improvements, feel free to open a PR!

Discussion

Issues

We use GitHub Issues for posting bugs and feature requests — anything code-related.
Just make sure you search for related issues first and use our Issues templates.
We may ask for contributions if a prompt fix doesn't fit into the immediate roadmap of the core development team.

Contributions

We welcome contributions from the Snorkel community!
This is likely the fastest way to get a change you'd like to see into the library.

Small contributions can be made directly in a pull request (PR).
If you would like to contribute a larger feature, we recommend first creating an issue with a proposed design for discussion.
For ideas about what to work on, we've labeled specific issues as help wanted.

To set up a development environment for contributing back to Snorkel, see our contributing guidelines.
All PRs must pass the continuous integration tests and receive approval from a member of the Snorkel development team before they will be merged.

Community Forum

For broader Q&A, discussions about using Snorkel, tutorial requests, etc., use the Snorkel community forum hosted on Spectrum.
We hope this will be a venue for you to interact with other Snorkel users — please don't be shy about posting!

Announcements

To stay up-to-date on Snorkel-related announcements (e.g. version releases, upcoming workshops), subscribe to the Snorkel mailing list. We promise to respect your inboxes — communication will be sparse!

Twitter

Follow us on Twitter @SnorkelML.