2022-04-27 09:35:20 +00:00
{ lib
, stdenv
2023-02-02 18:25:31 +00:00
, appdirs
2022-04-27 09:35:20 +00:00
, azure-core
2022-02-10 20:34:41 +00:00
, bokeh
2023-04-29 16:46:19 +00:00
, boto3
2022-01-13 20:06:32 +00:00
, buildPythonPackage
, click
, docker_pycreds
, fetchFromGitHub
, flask
, git
2022-12-17 10:02:37 +00:00
, gitpython
2023-04-29 16:46:19 +00:00
, google-cloud-compute
, google-cloud-storage
, hypothesis
2022-01-13 20:06:32 +00:00
, jsonref
, jsonschema
2023-04-29 16:46:19 +00:00
, keras
, kubernetes
2022-01-13 20:06:32 +00:00
, matplotlib
2023-04-29 16:46:19 +00:00
, mlflow
2022-05-18 14:49:53 +00:00
, nbclient
2022-02-10 20:34:41 +00:00
, nbformat
2022-01-13 20:06:32 +00:00
, pandas
2023-04-29 16:46:19 +00:00
, parameterized
2022-01-13 20:06:32 +00:00
, pathtools
, promise
, protobuf
, psutil
, pydantic
, pytest-mock
, pytest-xdist
, pytestCheckHook
2022-04-27 09:35:20 +00:00
, pythonOlder
2022-10-06 18:32:54 +00:00
, pythonRelaxDepsHook
2022-01-13 20:06:32 +00:00
, pyyaml
, requests
2023-04-29 16:46:19 +00:00
, responses
2022-01-13 20:06:32 +00:00
, scikit-learn
, sentry-sdk
2022-03-05 16:20:37 +00:00
, setproctitle
2022-01-13 20:06:32 +00:00
, setuptools
, shortuuid
2022-06-16 17:23:12 +00:00
, substituteAll
2023-04-29 16:46:19 +00:00
, tensorflow
, torch
2022-01-13 20:06:32 +00:00
, tqdm
} :
buildPythonPackage rec {
pname = " w a n d b " ;
2023-04-29 16:46:19 +00:00
version = " 0 . 1 5 . 0 " ;
2022-04-27 09:35:20 +00:00
format = " s e t u p t o o l s " ;
disabled = pythonOlder " 3 . 6 " ;
2022-01-13 20:06:32 +00:00
src = fetchFromGitHub {
owner = pname ;
2022-10-30 15:09:59 +00:00
repo = pname ;
2022-06-26 10:26:21 +00:00
rev = " r e f s / t a g s / v ${ version } " ;
2023-04-29 16:46:19 +00:00
hash = " s h a 2 5 6 - U U L s v v k 9 B s W U r J 8 e D 7 u D 2 U n U J q m P r m j r J v C A 7 W R C / C w = " ;
2022-01-13 20:06:32 +00:00
} ;
2022-06-16 17:23:12 +00:00
patches = [
2022-10-06 18:32:54 +00:00
# Replace git paths
2022-06-16 17:23:12 +00:00
( substituteAll {
src = ./hardcode-git-path.patch ;
git = " ${ lib . getBin git } / b i n / g i t " ;
} )
] ;
2022-10-06 18:32:54 +00:00
nativeBuildInputs = [
pythonRelaxDepsHook
] ;
2022-01-13 20:06:32 +00:00
# setuptools is necessary since pkg_resources is required at runtime.
propagatedBuildInputs = [
2023-02-02 18:25:31 +00:00
appdirs
2022-01-13 20:06:32 +00:00
click
docker_pycreds
2022-12-17 10:02:37 +00:00
gitpython
2022-01-13 20:06:32 +00:00
pathtools
promise
protobuf
psutil
pyyaml
requests
sentry-sdk
2022-03-05 16:20:37 +00:00
setproctitle
2022-01-13 20:06:32 +00:00
setuptools
shortuuid
] ;
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2022-04-27 09:35:20 +00:00
azure-core
bokeh
2023-04-29 16:46:19 +00:00
boto3
2022-04-27 09:35:20 +00:00
flask
2023-04-29 16:46:19 +00:00
google-cloud-compute
google-cloud-storage
hypothesis
2022-04-27 09:35:20 +00:00
jsonref
jsonschema
2023-04-29 16:46:19 +00:00
keras
kubernetes
2022-04-27 09:35:20 +00:00
matplotlib
2023-04-29 16:46:19 +00:00
mlflow
2022-05-18 14:49:53 +00:00
nbclient
2022-04-27 09:35:20 +00:00
nbformat
pandas
2023-04-29 16:46:19 +00:00
parameterized
2022-04-27 09:35:20 +00:00
pydantic
pytest-mock
pytest-xdist
pytestCheckHook
2023-04-29 16:46:19 +00:00
responses
2022-04-27 09:35:20 +00:00
scikit-learn
2023-04-29 16:46:19 +00:00
tensorflow
torch
2022-04-27 09:35:20 +00:00
tqdm
] ;
2023-02-02 18:25:31 +00:00
# Set BOKEH_CDN_VERSION to stop bokeh throwing an exception in tests
2022-10-06 18:32:54 +00:00
preCheck = ''
export HOME = $ ( mktemp - d )
2023-02-22 10:55:15 +00:00
export BOKEH_CDN_VERSION = $ { bokeh . version }
2022-10-06 18:32:54 +00:00
'' ;
pythonRelaxDeps = [ " p r o t o b u f " ] ;
2022-01-13 20:06:32 +00:00
disabledTestPaths = [
# Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment.
2023-04-29 16:46:19 +00:00
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ c l i . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ d a t a _ t y p e s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ f i l e _ s t r e a m . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ f i l e _ u p l o a d . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ f o o t e r . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ i n t e r n a l _ a p i . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ k e r a s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ l o g g i n g . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ m e t r i c _ i n t e r n a l . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ p u b l i c _ a p i . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ r u n t i m e . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ s e n d e r . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ s u m m a r y . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ t b _ w a t c h e r . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ t i m e _ r e s o l u t i o n . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ w a n d b _ a g e n t . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ w a n d b _ a r t i f a c t s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ w a n d b _ i n t e g r a t i o n . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ w a n d b _ r u n . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t _ w a n d b . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ l a u n c h _ a w s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ l a u n c h _ c l i . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ l a u n c h _ d o c k e r . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ l a u n c h _ k u b e r n e t e s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ l a u n c h . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ s _ n b / t e s t _ n o t e b o o k s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ c l i . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ d a t a _ t y p e s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ i n t e r n a l _ a p i . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ m o d e _ d i s a b l e d . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ m o d e l _ w o r k f l o w s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ p l o t s . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ p u b l i c _ a p i . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ s e n d e r . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ u t i l . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ w a n d b _ v e r i f y . p y "
# Requires docker access
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ a r t i f a c t s / t e s t _ a r t i f a c t _ s a v e r . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ a r t i f a c t s / t e s t _ w a n d b _ a r t i f a c t s _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ a r t i f a c t s / t e s t _ w a n d b _ a r t i f a c t s . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ c l i _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ d a t a _ t y p e s _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ f i l e _ s t r e a m _ i n t e r n a l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ f i l e _ u p l o a d . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ f o o t e r . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ k e r a s _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ l a b e l _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ m e t r i c _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ m e t r i c _ i n t e r n a l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ m o d e _ d i s a b l e d _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ m o d e l _ w o r k f l o w . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ m p _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ p u b l i c _ a p i . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ r e d i r _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ r e p o r t _ a p i . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ r u n t i m e . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ s a v e _ p o l i c i e s . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ s e n d e r . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ s t a r t _ m e t h o d . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ s y s t e m _ i n f o . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ t b _ w a t c h e r . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ t e l e m e t r y _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ t i m e _ r e s o l u t i o n . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ t o r c h _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ v a l i d a t i o n _ d a t a _ l o g g e r . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ w a n d b _ i n t e g r a t i o n . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ w a n d b _ r u n . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ w a n d b _ s e t t i n g s . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ w a n d b _ t e n s o r f l o w . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ w a n d b _ v e r i f y . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ w a n d b . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ i m p o r t e r s / t e s t _ i m p o r t _ m l f l o w . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ s w e e p / t e s t _ p u b l i c _ a p i . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ s w e e p / t e s t _ s w e e p _ s c h e d u l e r . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ s w e e p / t e s t _ w a n d b _ a g e n t _ f u l l . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ s w e e p / t e s t _ w a n d b _ a g e n t . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ s w e e p / t e s t _ w a n d b _ s w e e p . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ g i t h u b _ r e f e r e n c e . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ j o b . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ l a u n c h _ a d d . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ l a u n c h _ c l i . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ l a u n c h _ k u b e r n e t e s . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ l a u n c h _ l o c a l _ c o n t a i n e r . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ l a u n c h _ r u n . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ l a u n c h _ s w e e p . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ l a u n c h . p y "
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t s _ l a u n c h / t e s t _ w a n d b _ r e f e r e n c e . p y "
2022-02-10 20:34:41 +00:00
# Tries to access /homeless-shelter
2023-04-29 16:46:19 +00:00
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ t a b l e s . p y "
# E AssertionError: assert 'Cannot use both --async and --queue with wandb launch' in 'wandb: ERROR Find detailed error logs at: /build/source/wandb/debug-cli.nixbld.log\nError: The wandb service process exited with 1. Ensure that `sys.executable` is a valid python interpreter. You can override it with the `_executable` setting or with the `WANDB__EXECUTABLE` environment variable.\n'
# E + where 'wandb: ERROR Find detailed error logs at: /build/source/wandb/debug-cli.nixbld.log\nError: The wandb service process exited with 1. Ensure that `sys.executable` is a valid python interpreter. You can override it with the `_executable` setting or with the `WANDB__EXECUTABLE` environment variable.\n' = <Result SystemExit(1)>.output
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ l a u n c h _ j o b s . p y "
# Requires google-cloud-aiplatform which is not packaged as of 2023-04-25.
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ l a u n c h _ g c p . p y "
# Requires google-cloud-artifact-registry which is not packaged as of 2023-04-25.
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s _ o l d / t e s t s _ l a u n c h / t e s t _ k a n i k o _ b u i l d . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ l a u n c h / t e s t _ r e g i s t r y / t e s t _ g c p _ a r t i f a c t _ r e g i s t r y . p y "
# Requires kfp which is not packaged as of 2023-04-25.
" t e s t s / p y t e s t _ t e s t s / s y s t e m _ t e s t s / t e s t _ c o r e / t e s t _ k f p . p y "
# Requires metaflow which is not packaged as of 2023-04-25.
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ m e t a f l o w . p y "
# See https://github.com/wandb/wandb/issues/5423
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ d o c k e r . p y "
" t e s t s / p y t e s t _ t e s t s / u n i t _ t e s t s / t e s t _ l i b r a r y _ p u b l i c . p y "
2022-01-13 20:06:32 +00:00
] ;
2022-04-15 01:41:22 +00:00
# Disable test that fails on darwin due to issue with python3Packages.psutil:
# https://github.com/giampaolo/psutil/issues/1219
2022-10-30 15:09:59 +00:00
disabledTests = lib . optionals stdenv . isDarwin [
2022-04-27 09:35:20 +00:00
" t e s t _ t p u _ s y s t e m _ s t a t s "
2022-01-13 20:06:32 +00:00
] ;
2022-04-27 09:35:20 +00:00
pythonImportsCheck = [
" w a n d b "
] ;
2022-01-13 20:06:32 +00:00
meta = with lib ; {
description = " A C L I a n d l i b r a r y f o r i n t e r a c t i n g w i t h t h e W e i g h t s a n d B i a s e s A P I " ;
2022-08-12 12:06:08 +00:00
homepage = " h t t p s : / / g i t h u b . c o m / w a n d b / w a n d b " ;
changelog = " h t t p s : / / g i t h u b . c o m / w a n d b / w a n d b / r a w / v ${ version } / C H A N G E L O G . m d " ;
2022-01-13 20:06:32 +00:00
license = licenses . mit ;
maintainers = with maintainers ; [ samuela ] ;
} ;
}