2021-04-26 19:14:03 +00:00
|
|
|
{ boto3
|
|
|
|
, buildPythonPackage
|
|
|
|
, crc32c
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, matplotlib
|
|
|
|
, moto
|
|
|
|
, numpy
|
2022-10-06 18:32:54 +00:00
|
|
|
, protobuf
|
2021-04-26 19:14:03 +00:00
|
|
|
, pytestCheckHook
|
2022-09-09 14:08:57 +00:00
|
|
|
, torch
|
2023-08-22 20:05:09 +00:00
|
|
|
, setuptools-scm
|
2021-04-26 19:14:03 +00:00
|
|
|
, soundfile
|
2023-07-15 17:15:38 +00:00
|
|
|
, stdenv
|
2022-04-15 01:41:22 +00:00
|
|
|
, tensorboard
|
2021-04-26 19:14:03 +00:00
|
|
|
, torchvision
|
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tensorboardx";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "2.6.2";
|
2022-10-06 18:32:54 +00:00
|
|
|
format = "setuptools";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lanpa";
|
|
|
|
repo = "tensorboardX";
|
2022-10-06 18:32:54 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-m7RLDOMuRNLacnIudptBGjhcTlMk8+v/onz6Amqxb90=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
protobuf
|
2023-08-22 20:05:09 +00:00
|
|
|
setuptools-scm
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
# required to make tests deterministic
|
2023-08-22 20:05:09 +00:00
|
|
|
env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
crc32c
|
|
|
|
numpy
|
|
|
|
];
|
2020-11-12 09:05:59 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
pythonImportsCheck = [ "tensorboardX" ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-26 19:14:03 +00:00
|
|
|
boto3
|
|
|
|
matplotlib
|
|
|
|
moto
|
|
|
|
pytestCheckHook
|
2023-08-22 20:05:09 +00:00
|
|
|
soundfile
|
2022-09-09 14:08:57 +00:00
|
|
|
torch
|
2022-04-15 01:41:22 +00:00
|
|
|
tensorboard
|
2021-04-26 19:14:03 +00:00
|
|
|
torchvision
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# ImportError: Visdom visualization requires installation of Visdom
|
|
|
|
"test_TorchVis"
|
|
|
|
# Requires network access (FileNotFoundError: [Errno 2] No such file or directory: 'wget')
|
|
|
|
"test_onnx_graph"
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# Fails with a mysterious error in pytorch:
|
|
|
|
# RuntimeError: required keyword attribute 'name' has the wrong type
|
|
|
|
"test_pytorch_graph"
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# we are not interested in linting errors
|
|
|
|
"tests/test_lint.py"
|
2024-04-21 15:54:59 +00:00
|
|
|
# ImportError: cannot import name 'mock_s3' from 'moto'
|
|
|
|
"tests/test_embedding.py"
|
|
|
|
"tests/test_record_writer.py"
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for writing tensorboard-compatible logs";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://tensorboardx.readthedocs.io";
|
|
|
|
downloadPage = "https://github.com/lanpa/tensorboardX";
|
|
|
|
changelog = "https://github.com/lanpa/tensorboardX/blob/${src.rev}/HISTORY.rst";
|
2020-07-18 16:06:22 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lebastr akamaus ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|