at 25.11-pre 2.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 gymnasium, 11 numpy, 12 packaging, 13 typer, 14 typing-extensions, 15 16 # optional-dependencies 17 pyarrow, 18 jax, 19 google-cloud-storage, 20 tqdm, 21 h5py, 22 huggingface-hub, 23 mktestdocs, 24 pytest, 25 scikit-image, 26 27 # tests 28 jaxlib, 29 pytestCheckHook, 30}: 31 32buildPythonPackage rec { 33 pname = "minari"; 34 version = "0.5.3"; 35 pyproject = true; 36 37 src = fetchFromGitHub { 38 owner = "Farama-Foundation"; 39 repo = "Minari"; 40 tag = "v${version}"; 41 hash = "sha256-LvJwp2dZdGPazJPWQtrk+v7zaPjOlomBu5j9avVdCcA="; 42 }; 43 44 build-system = [ 45 setuptools 46 ]; 47 48 dependencies = [ 49 gymnasium 50 numpy 51 packaging 52 typer 53 typing-extensions 54 ]; 55 56 optional-dependencies = { 57 arrow = [ pyarrow ]; 58 create = [ jax ]; 59 gcs = [ 60 google-cloud-storage 61 tqdm 62 ]; 63 hdf5 = [ h5py ]; 64 hf = [ huggingface-hub ]; 65 integrations = [ 66 # agilerl 67 # d3rlpy 68 ]; 69 testing = [ 70 # gymnasium-robotics 71 mktestdocs 72 pytest 73 scikit-image 74 ]; 75 }; 76 77 pythonImportsCheck = [ "minari" ]; 78 79 nativeCheckInputs = [ 80 jaxlib 81 pytestCheckHook 82 ] ++ lib.flatten (lib.attrValues optional-dependencies); 83 84 disabledTests = [ 85 # Require internet access 86 "test_download_namespace_dataset" 87 "test_download_namespace_metadata" 88 "test_markdown" 89 90 # Attempts at installing minari using pip (impossible in the sandbox) 91 "test_readme" 92 ]; 93 94 disabledTestPaths = [ 95 # Require internet access 96 "tests/dataset/test_dataset_download.py" 97 "tests/test_cli.py" 98 ]; 99 100 meta = { 101 description = "Standard format for offline reinforcement learning datasets, with popular reference datasets and related utilities"; 102 homepage = "https://github.com/Farama-Foundation/Minari"; 103 changelog = "https://github.com/Farama-Foundation/Minari/releases/tag/v${version}"; 104 license = with lib.licenses; [ 105 asl20 106 mit 107 ]; 108 maintainers = with lib.maintainers; [ GaetanLepage ]; 109 mainProgram = "minari"; 110 }; 111}