Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #309798 from GaetanLepage/rlcard

python311Packages.rlcard: init at 1.0.7

authored by Pol Dellaiera and committed by GitHub b8a489ab b5c90bbe

+79
+77
pkgs/development/python-modules/rlcard/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , setuptools 5 + , wheel 6 + , numpy 7 + , pip 8 + , termcolor 9 + , pytestCheckHook 10 + , torch 11 + , pythonAtLeast 12 + }: 13 + 14 + buildPythonPackage rec { 15 + pname = "rlcard"; 16 + version = "1.0.7"; 17 + pyproject = true; 18 + 19 + src = fetchFromGitHub { 20 + owner = "datamllab"; 21 + repo = "rlcard"; 22 + rev = "refs/tags/${version}"; 23 + hash = "sha256-SWj6DBItQzSM+nioV54a350Li7tbBaVXsQxNAqVgB0k="; 24 + }; 25 + 26 + build-system = [ 27 + setuptools 28 + wheel 29 + ]; 30 + 31 + dependencies = [ 32 + numpy 33 + # pip is required at runtime (https://github.com/datamllab/rlcard/blob/1.0.7/rlcard/utils/utils.py#L10) 34 + pip 35 + termcolor 36 + ]; 37 + 38 + pythonImportsCheck = [ 39 + "rlcard" 40 + ]; 41 + 42 + nativeCheckInputs = [ 43 + pytestCheckHook 44 + torch 45 + ]; 46 + 47 + disabledTests = [ 48 + # AttributeError: module 'numpy' has no attribute 'int'. 49 + # https://github.com/datamllab/rlcard/issues/266 50 + "test_decode_action" 51 + "test_get_legal_actions" 52 + "test_get_perfect_information" 53 + "test_get_player_id" 54 + "test_init_game" 55 + "test_is_deterministic" 56 + "test_proceed_game" 57 + "test_reset_and_extract_state" 58 + "test_run" 59 + "test_step" 60 + "test_step" 61 + "test_step_back" 62 + "test_step_back" 63 + 64 + # ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 3 dimensions. The detected shape was (1, 1, 5) + inhomogeneous part. 65 + "test_reorganize" 66 + ]; 67 + 68 + meta = with lib; { 69 + description = "Reinforcement Learning / AI Bots in Card (Poker) Games - Blackjack, Leduc, Texas, DouDizhu, Mahjong, UNO"; 70 + homepage = "https://github.com/datamllab/rlcard"; 71 + changelog = "https://github.com/datamllab/rlcard/releases/tag/${version}"; 72 + license = licenses.mit; 73 + maintainers = with maintainers; [ GaetanLepage ]; 74 + # Relies on deprecated distutils 75 + broken = pythonAtLeast "3.12"; 76 + }; 77 + }
+2
pkgs/top-level/python-packages.nix
··· 13285 13285 13286 13286 rlax = callPackage ../development/python-modules/rlax { }; 13287 13287 13288 + rlcard = callPackage ../development/python-modules/rlcard { }; 13289 + 13288 13290 rlp = callPackage ../development/python-modules/rlp { }; 13289 13291 13290 13292 rmcl = callPackage ../development/python-modules/rmcl { };