summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2026-01-29 21:00:18 +0100
committerRicardo Wurmus <rekado@elephly.net>2026-02-03 22:53:40 +0100
commit2e944d8948cfc019a92e5d226d9e0467a64adadf (patch)
treec2cd64e5be481d3c7c25eaa1700f17cf7ba72d37 /gnu
parent6d97c3f30fd920e344a55aa628163292613d0f0a (diff)
gnu: Add python-burr.
* gnu/packages/machine-learning.scm (python-burr): New variable. Change-Id: Iae8cb383ae1528abc96f961e4a9d1436b913d61a
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/machine-learning.scm72
1 files changed, 72 insertions, 0 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index ba132b4c369..f9b3778c4f7 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -278,6 +278,78 @@ learning models with just a fraction of the examples and compute.")
278family of functions.") 278family of functions.")
279 (license license:expat))) 279 (license license:expat)))
280 280
281(define-public python-burr
282 (package
283 (name "python-burr")
284 (version "0.40.2")
285 (source
286 (origin
287 (method git-fetch)
288 (uri (git-reference
289 (url "https://github.com/apache/burr/")
290 (commit (string-append "burr-" version))))
291 (file-name (git-file-name name version))
292 (sha256
293 (base32 "0scdfdn2dkan5rkrh5ngai8j4i01rj6d6ncrhvab62r43c0h042q"))))
294 (build-system pyproject-build-system)
295 (arguments
296 (list
297 #:phases
298 '(modify-phases %standard-phases
299 ;; Avoid "async def functions are not natively supported." with 70+
300 ;; test failures. This hack triggers a bunch of warnings, because
301 ;; now also synchronous tests are marked with @pytest.mark.asyncio,
302 ;; but at least the tests run successfully.
303 (add-after 'unpack 'patch-tests
304 (lambda _
305 (substitute* "tests/common/test_async_utils.py"
306 (("from typing.*" m)
307 (string-append m "\
308import asyncio
309import pytest
310pytestmark = pytest.mark.asyncio\n")))
311 (substitute* '("tests/visibility/test_tracing.py"
312 "tests/core/test_parallelism.py"
313 "tests/core/test_action.py"
314 "tests/core/test_application.py"
315 "tests/test_end_to_end.py")
316 (("^import asyncio.*" m)
317 (string-append m "\
318import pytest
319pytestmark = pytest.mark.asyncio\n"))))))
320 ;; There are integration tests and examples comparing Burr to and
321 ;; interfacing with alternatives, such as the overly complex langchain.
322 ;; We should not add them here just to run these tests.
323 #:test-flags
324 #~(list "--ignore-glob=tests/integration**"
325 "--ignore-glob=examples/**"
326 "--ignore-glob=burr/examples/**"
327 "--ignore=tests/core/test_graphviz_display.py"
328 "--ignore=tests/core/test_persistence.py")))
329 (native-inputs
330 (list python-flit-core
331 python-anyio
332 python-pytest
333 python-pytest-asyncio
334 python-setuptools))
335 ;; Burr has very few hard dependencies. Including these optional packages
336 ;; makes it more useful, though.
337 (propagated-inputs
338 (list python-pydantic ;optional
339 python-pydantic-settings ;optional
340 python-loguru
341 python-requests))
342 (home-page "https://burr.apache.org/")
343 (synopsis "Build applications that make decisions")
344 (description
345 "Apache Burr makes it easy to develop applications that make
346decisions (chatbots, agents, simulations, etc...) from simple Python building
347blocks. Apache Burr works well for any application that uses LLMs, and can
348integrate with any of your favorite frameworks. Burr includes a UI that can
349track/monitor/trace your system in real time, along with pluggable
350persisters (e.g. for memory) to save and load application state.")
351 (license license:asl2.0)))
352
281(define-public python-faster-whisper 353(define-public python-faster-whisper
282 (package 354 (package
283 (name "python-faster-whisper") 355 (name "python-faster-whisper")