{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch2, # build system setuptools, # dependencies absl-py, array-record, dm-tree, etils, immutabledict, importlib-resources, numpy, promise, protobuf, psutil, pyarrow, requests, simple-parsing, tensorflow-metadata, termcolor, toml, tqdm, wrapt, # tests apache-beam, beautifulsoup4, click, cloudpickle, datasets, dill, ffmpeg, imagemagick, jax, jaxlib, jinja2, langdetect, lxml, matplotlib, mlcroissant, mwparserfromhell, mwxml, networkx, nltk, opencv4, pandas, pillow, pycocotools, pydub, pytest-xdist, pytestCheckHook, scikit-image, scipy, sortedcontainers, tensorflow, tifffile, zarr, }: buildPythonPackage (finalAttrs: { pname = "tensorflow-datasets"; version = "4.9.9"; pyproject = true; src = fetchFromGitHub { owner = "tensorflow"; repo = "datasets"; tag = "v${finalAttrs.version}"; hash = "sha256-ZXaPYmj8aozfe6ygzKybId8RZ1TqPuIOSpd8XxnRHus="; }; patches = [ # TypeError: Cannot handle this data type: (1, 1, 4), might be related # to the differences in some of the dependencies? "tensorflow_datasets/rl_unplugged/rlu_atari/rlu_atari_test.py" # Fails with `ValueError: setting an array element with a sequence` "tensorflow_datasets/core/dataset_utils_test.py" "tensorflow_datasets/core/features/sequence_feature_test.py" # Requires `tensorflow_docs` which is not packaged in `nixpkgs` and the test is for documentation anyway. "tensorflow_datasets/scripts/documentation/build_api_docs_test.py" # Not a test, should not be executed. "tensorflow_datasets/testing/test_utils.py" # Require `gcld3` and `nltk.punkt` which are not packaged in `nixpkgs`. "tensorflow_datasets/text/c4_test.py" "tensorflow_datasets/text/c4_utils_test.py" # AttributeError: 'NoneType' object has no attribute 'Table' "tensorflow_datasets/core/file_adapters_test.py::test_read_write" "tensorflow_datasets/text/c4_wsrs/c4_wsrs_test.py::C4WSRSTest" ]; meta = { description = "Library of datasets ready to use with TensorFlow"; homepage = "https://www.tensorflow.org/datasets/overview"; changelog = "https://github.com/tensorflow/datasets/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ ndl ]; }; })