Skip to main content

FERN

Pypi

Fern用于NLP的模型开发结构控制。通过它可以控制文本预处理、模型搭建、训练器:

  1. 文本预处理:数据下载、数据清洗、数据转换和数据分割
  2. 模型搭建:模型保存与加载、模型架构打印
  3. 模型训练:单步/epoch训练与评估、评估函数设置、损失函数设置、label权重设置

Fern的设计目的主要为了解决不同NLP工程中重复代码过多问题,减少流程性代码,从而避免数据交互过程中的随机bug出现

安装

  1. 从 pypi 安装

    $ pip install Fern2
    
  2. 从源码安装

    $ pip install -e git+https://github.com/Jasonsey/Fern.git
    

使用教程

建议查看源码中函数的使用说明

变量命名规则

为了方便定义,对容易分歧变量命名做如下约定:

  1. 对于数据变量,同类型变量书写规则:

    • data_train, data_val
    • label_train, label_val
  2. 对于指标变量,同类型变量书写规则:

    • val_loss, val_acc, val_binary_acc
    • train_loss, train_acc
  3. 对于其他变量,按照首先它属于a, 其次它属于b规则命名变量名:a_b

    • path_dataset

TODO

  • BERT预训练模型直接调用
  • BERT重现训练代码直接调用

版本变更日志

CHANGE LOG

Metadata

Release files for Fern2 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Fern2 1.4.1
File Size Uploaded Provenance Actions
Fern2-1.4.1.tar.gz 27.2 kB Without provenance Details for Fern2-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Fern2 1.4.1
File Interpreter ABI Platform Actions
Fern2-1.4.1-py3-none-any.whl Python 3 none any Details for Fern2-1.4.1-py3-none-any.whl

Total release size: 60.4 kB

Release files / Fern2-1.4.1.tar.gz

Download URL Fern2-1.4.1.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a851e6849fa4025169c551d0849f0c7fda63aa6512e70cc04aa8d34c39bbb746
BLAKE2b-256 checksum
How to use checksums
892577a290f3c85fc27a5cf610d33a47afab8fa4275331b65322d5f4f20d87ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / Fern2-1.4.1-py3-none-any.whl

Download URL Fern2-1.4.1-py3-none-any.whl
Size 33.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af1396cc1fe99cafe2b0ce1a3776f2a02948fae73b889902a01de1d172bed41a
BLAKE2b-256 checksum
How to use checksums
ca232407cd2d4db261571b9966da66ad1993c69e6a077ecf8ac8396f046f595f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for Fern2 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page