Skip to main content

fundata

一批用于下载/管理机器学习常见公开数据集的脚本:数据集的名称、分类、下载地址等元信息存入本地 SQLite(fundata.manage.core.DatasetManage),实际数据文件从蓝奏网盘下载。收录的数据集包括 iris、MovieLens(100k/1m/10m/20m/25m)、Criteo(sample/kaggle)、Amazon Electronics 评论、adult、porto-seguro、bitly-usagov、COCO(val2017/annotations)以及 YOLOv3/v4 权重等。

fundata.work、fundata.manage、fundata.tables_bak 可以正常 import 和使用。DatasetManage.download() 中蓝奏云下载分支会抛出 NotImplementedError:当前 fundrive 的蓝奏云 API 是基于类的 fundrive.drives.lanzou.LanZouDrive,需要已认证的实例,没有免认证的下载函数可用。

fundata.dataset(dataset/datas.py)默认无法独立 import:它直接依赖 demjson、tensorflow、scikit-learn、notekeras。其中 tensorflow、scikit-learn、funkeras(提供 notekeras)已收录进 pyproject.toml 的 dataset extra,默认不随主依赖安装。需要特别说明两点:

  • notekeras:PyPI 上的 funkeras 包实际发布的顶层可 import 模块名仍然是 notekeras(pip install funkeras 装出来的目录是 notekeras/),因此代码里 from notekeras.features.feature_parse import ... 这一行即使装了 funkeras 也必须保持 notekeras 这个导入名不变,才能正确工作。
  • demjson:PyPI 上唯一的 demjson==2.2.4 是 Python 2 时代遗留的包,其 setup.py 使用了 setuptools>=58 已移除的 use_2to3 参数,在任何现代构建工具链下都会构建失败,因此没有声明进 dataset extra(声明了会导致 uv lock/pip install fundata[dataset] 直接失败)。这是上游包已废弃导致的已知限制,需要用到 CriteoData._create_criteo_dataset 里 demjson.encode(...) 那部分功能时,需自行想办法安装/替换 demjson。

安装

已发布到 PyPI:

pip install fundata

需要用到 fundata.dataset 下具体数据集处理类时,额外装上 dataset extra:

pip install "fundata[dataset]"

pyproject.toml 中已声明的 dependencies 为 pandas、funshell、farlog、tqdm,安装后 fundata(顶层)、fundata.work、fundata.manage、fundata.tables_bak 均可正常使用。fundata.dataset 需要额外的 dataset extra(tensorflow、scikit-learn、funkeras),demjson 因上游已废弃需自行处理(见上文说明)。

用法示例

维护一份数据集索引,并按需从蓝奏云下载:

from fundata.manage.core import DatasetManage
from fundata.manage.library import insert_library

dataset = DatasetManage()
dataset.create()
insert_library()  # 把 iris/movielens/criteo/coco/yolo 权重等的下载地址写入本地 sqlite

dataset.download("movielens-100k", path_root="./download/")

管理数据落盘目录(数据库/日志/公共文件),默认落在 /opt/farfarfun/apps/fundata:

from fundata.work import WorkApp

app = WorkApp()  # app_name 默认为 "fundata",dir_app 默认为 /opt/farfarfun/apps/fundata
app.create()

fundata.dataset 下还有针对具体数据集的处理类,例如 ElectronicsData(Amazon 评论数据的下载、清洗、构建训练集)和 CriteoData(Criteo 数据集的特征处理),但如上文所述,它们依赖未声明的第三方包,当前无法独立运行。

现状说明

fundata.work / fundata.manage / fundata.tables_bak 可正常使用;fundata.dataset 需要额外安装 dataset extra 才能独立运行,不建议在装上这个 extra 之前作为正式依赖引入新项目。


关于 farfarfun

farfarfun 是一个专注于实用工具库的开源组织, 涵盖云存储、数据处理、AI、多媒体与开发工具链等方向。

本项目基于 MIT 协议开源。

Metadata

Release files for fundata 1.0.3

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

Source distribution (sdist)

Source distribution for fundata 1.0.3
File Size Uploaded
fundata-1.0.3.tar.gz 151.8 kB Details

Built distribution (wheel)

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

Total release size: 172.3 kB

Release files / fundata-1.0.3.tar.gz

Download URL fundata-1.0.3.tar.gz
Size 151.8 kB
Tags Source
SHA-256 checksum
How to use checksums
833e468250aaacfeedd3d3727bc07301bcc0f0a21846b21abee3b0cbfdbad36a
BLAKE2b-256 checksum
How to use checksums
19305b6f3f360aa80614e98d0d7c62fa7dcdcf5e25150e587b392cb6d62fa312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / fundata-1.0.3-py3-none-any.whl

Download URL fundata-1.0.3-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed48754c90d5fc4ffea2f04d3bbf7bc3d403a02e4398a7221d7957416fc0cd5b
BLAKE2b-256 checksum
How to use checksums
7f845fe7c8349cfadbb90d9167ce88ffdb086a977fe61e7538c6dd2aa90a5e41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

1.0.5

1 release file

1.0.4

2 release files

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

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