==>(B Building on charcadet(B ==>(B Checking for remote environment...(B ==>(B Syncing package to remote host...(B sending incremental file list created directory packages/python-langsmith ./ .SRCINFO 2,189 100% 0.00kB/s 0:00:00 2,189 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=7/9) .nvchecker.toml 54 100% 52.73kB/s 0:00:00 54 100% 52.73kB/s 0:00:00 (xfr#2, to-chk=6/9) LICENSE 646 100% 630.86kB/s 0:00:00 646 100% 630.86kB/s 0:00:00 (xfr#3, to-chk=5/9) PKGBUILD 4,112 100% 3.92MB/s 0:00:00 4,112 100% 3.92MB/s 0:00:00 (xfr#4, to-chk=4/9) REUSE.toml 375 100% 366.21kB/s 0:00:00 375 100% 366.21kB/s 0:00:00 (xfr#5, to-chk=3/9) python-langsmith-0.11.2-1.2.log 752 100% 734.38kB/s 0:00:00 752 100% 734.38kB/s 0:00:00 (xfr#6, to-chk=2/9) LICENSES/ LICENSES/0BSD.txt -> ../LICENSE sent 3,706 bytes received 192 bytes 1,559.20 bytes/sec total size is 7,594 speedup is 1.95 ==>(B Applying RISC-V patches...(B sending incremental file list ./ relax-async-evaluation-timing.patch 428 100% 0.00kB/s 0:00:00 428 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3) riscv64.patch 659 100% 643.55kB/s 0:00:00 659 100% 643.55kB/s 0:00:00 (xfr#2, to-chk=0/3) sent 910 bytes received 57 bytes 644.67 bytes/sec total size is 1,087 speedup is 1.12 patching file PKGBUILD Hunk #1 succeeded at 65 with fuzz 2 (offset -1 lines). Hunk #2 succeeded at 110 (offset -4 lines). ==>(B Running pkgctl build --arch riscv64 on remote host...(B ==> WARNING:(B invalid architecture: riscv64(B ==>(B Updating pacman database cache(B [?25l:: Synchronizing package databases... core downloading... extra downloading... multilib downloading... [?25h==>(B Building python-langsmith(B  ->(B repo: extra(B  ->(B arch: riscv64(B  ->(B worker: felix-0(B ==>(B Building python-langsmith for [extra] (riscv64)(B ]3008;start=18ff7518b0404f34b0026824c67a5c97;user=felix;hostname=charcadet.felixc.at;machineid=968bd06e338144c2820b75d3a81e8189;bootid=a9929ba7c80b42e38f234e5e324cb512;pid=2821150;comm=sudo;targetuser=root;type=session\Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file. ]3008;start=6c68572f24b34bcc83cc48de84247bd3;user=root;hostname=charcadet.felixc.at;machineid=968bd06e338144c2820b75d3a81e8189;bootid=a9929ba7c80b42e38f234e5e324cb512;pid=2821196;comm=systemd-nspawn;container=arch-nspawn-2821196;type=container\]11;?\]2;🔵 Container arch-nspawn-2821196 on charcadet.felixc.at\[?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... there is nothing to do [?25h[!p]104\[?7h]3008;end=6c68572f24b34bcc83cc48de84247bd3\==>(B Building in chroot for [extra] (riscv64)...(B ==>(B Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix-0]...(Bdone(B ]3008;start=84d69a25874f4c6a85926cd7403a9c05;user=root;hostname=charcadet.felixc.at;machineid=968bd06e338144c2820b75d3a81e8189;bootid=a9929ba7c80b42e38f234e5e324cb512;pid=2821346;comm=sudo;targetuser=felix;type=session\==>(B Making package: python-langsmith 0.11.2-1.2 (Sat Sep 26 08:55:36 2026)(B ==>(B Retrieving sources...(B  ->(B Cloning langsmith-sdk git repo...(B Cloning into bare repository '/home/felix/packages/python-langsmith/langsmith-sdk'... remote: Enumerating objects: 86808, done. remote: Counting objects: 0% (1/359) remote: Counting objects: 1% (4/359) remote: Counting objects: 2% (8/359) remote: Counting objects: 3% (11/359) remote: Counting objects: 4% (15/359) remote: Counting objects: 5% (18/359) remote: Counting objects: 6% (22/359) remote: Counting objects: 7% (26/359) remote: Counting objects: 8% (29/359) remote: Counting objects: 9% (33/359) remote: Counting objects: 10% (36/359) remote: Counting objects: 11% (40/359) remote: Counting objects: 12% (44/359) remote: Counting objects: 13% (47/359) remote: Counting objects: 14% (51/359) remote: Counting objects: 15% (54/359) remote: Counting objects: 16% (58/359) remote: Counting objects: 17% (62/359) remote: Counting objects: 18% (65/359) remote: Counting objects: 19% (69/359) remote: Counting objects: 20% (72/359) remote: Counting objects: 21% (76/359) remote: Counting objects: 22% (79/359) remote: Counting objects: 23% (83/359) remote: Counting objects: 24% (87/359) remote: Counting objects: 25% (90/359) remote: Counting objects: 26% (94/359) remote: Counting objects: 27% (97/359) remote: Counting objects: 28% (101/359) remote: Counting objects: 29% (105/359) remote: Counting objects: 30% (108/359) remote: Counting objects: 31% (112/359) remote: Counting objects: 32% (115/359) remote: Counting objects: 33% (119/359) remote: Counting objects: 34% (123/359) remote: Counting objects: 35% (126/359) remote: Counting objects: 36% (130/359) remote: Counting objects: 37% (133/359) remote: Counting objects: 38% (137/359) remote: Counting objects: 39% (141/359) remote: Counting objects: 40% (144/359) remote: Counting objects: 41% (148/359) remote: Counting objects: 42% (151/359) remote: Counting objects: 43% (155/359) remote: Counting objects: 44% (158/359) remote: Counting objects: 45% (162/359) remote: Counting objects: 46% (166/359) remote: Counting objects: 47% (169/359) remote: Counting objects: 48% (173/359) remote: Counting objects: 49% (176/359) remote: Counting objects: 50% (180/359) remote: Counting objects: 51% (184/359) remote: Counting objects: 52% (187/359) remote: Counting objects: 53% (191/359) remote: Counting objects: 54% (194/359) remote: Counting objects: 55% (198/359) remote: Counting objects: 56% (202/359) remote: Counting objects: 57% (205/359) remote: Counting objects: 58% (209/359) remote: Counting objects: 59% (212/359) remote: Counting objects: 60% (216/359) remote: Counting objects: 61% (219/359) remote: Counting objects: 62% (223/359) remote: Counting objects: 63% (227/359) remote: Counting objects: 64% (230/359) remote: Counting objects: 65% (234/359) remote: Counting objects: 66% (237/359) remote: Counting objects: 67% (241/359) remote: Counting objects: 68% (245/359) remote: Counting objects: 69% (248/359) remote: Counting objects: 70% (252/359) remote: Counting objects: 71% (255/359) remote: Counting objects: 72% (259/359) remote: Counting objects: 73% (263/359) remote: Counting objects: 74% (266/359) remote: Counting objects: 75% (270/359) remote: Counting objects: 76% (273/359) remote: Counting objects: 77% (277/359) remote: Counting objects: 78% (281/359) remote: Counting objects: 79% (284/359) remote: Counting objects: 80% (288/359) remote: Counting objects: 81% (291/359) remote: Counting objects: 82% (295/359) remote: Counting objects: 83% (298/359) remote: Counting objects: 84% (302/359) remote: Counting objects: 85% (306/359) remote: Counting objects: 86% (309/359) remote: Counting objects: 87% (313/359) remote: Counting objects: 88% (316/359) remote: Counting objects: 89% (320/359) remote: Counting objects: 90% (324/359) remote: Counting objects: 91% (327/359) remote: Counting objects: 92% (331/359) remote: Counting objects: 93% (334/359) remote: Counting objects: 94% (338/359) remote: Counting objects: 95% (342/359) remote: Counting objects: 96% (345/359) remote: Counting objects: 97% (349/359) remote: Counting objects: 98% (352/359) remote: Counting objects: 99% (356/359) remote: Counting objects: 100% (359/359) remote: Counting objects: 100% (359/359), done. remote: Compressing objects: 0% (1/111) remote: Compressing objects: 1% (2/111) remote: Compressing objects: 2% (3/111) remote: Compressing objects: 3% (4/111) remote: Compressing objects: 4% (5/111) remote: Compressing objects: 5% (6/111) remote: Compressing objects: 6% (7/111) remote: Compressing objects: 7% (8/111) remote: Compressing objects: 8% (9/111) remote: Compressing objects: 9% (10/111) remote: Compressing objects: 10% (12/111) remote: Compressing objects: 11% (13/111) remote: Compressing objects: 12% (14/111) remote: Compressing objects: 13% (15/111) remote: Compressing objects: 14% (16/111) remote: Compressing objects: 15% (17/111) remote: Compressing objects: 16% (18/111) remote: Compressing objects: 17% (19/111) remote: Compressing objects: 18% (20/111) remote: Compressing objects: 19% (22/111) remote: Compressing objects: 20% (23/111) remote: Compressing objects: 21% (24/111) remote: Compressing objects: 22% (25/111) remote: Compressing objects: 23% (26/111) remote: Compressing objects: 24% (27/111) remote: Compressing objects: 25% (28/111) remote: Compressing objects: 26% (29/111) remote: Compressing objects: 27% (30/111) remote: Compressing objects: 28% (32/111) remote: Compressing objects: 29% (33/111) remote: Compressing objects: 30% (34/111) remote: Compressing objects: 31% (35/111) remote: Compressing objects: 32% (36/111) remote: Compressing objects: 33% (37/111) remote: Compressing objects: 34% (38/111) remote: Compressing objects: 35% (39/111) remote: Compressing objects: 36% (40/111) remote: Compressing objects: 37% (42/111) remote: Compressing objects: 38% (43/111) remote: Compressing objects: 39% (44/111) remote: Compressing objects: 40% (45/111) remote: Compressing objects: 41% (46/111) remote: Compressing objects: 42% (47/111) remote: Compressing objects: 43% (48/111) remote: Compressing objects: 44% (49/111) remote: Compressing objects: 45% (50/111) remote: Compressing objects: 46% (52/111) remote: Compressing objects: 47% (53/111) remote: Compressing objects: 48% (54/111) remote: Compressing objects: 49% (55/111) remote: Compressing objects: 50% (56/111) remote: Compressing objects: 51% (57/111) remote: Compressing objects: 52% (58/111) remote: Compressing objects: 53% (59/111) remote: Compressing objects: 54% (60/111) remote: Compressing objects: 55% (62/111) remote: Compressing objects: 56% (63/111) remote: Compressing objects: 57% (64/111) remote: Compressing objects: 58% (65/111) remote: Compressing objects: 59% (66/111) remote: Compressing objects: 60% (67/111) remote: Compressing objects: 61% (68/111) remote: Compressing objects: 62% (69/111) remote: Compressing objects: 63% (70/111) remote: Compressing objects: 64% (72/111) remote: Compressing objects: 65% (73/111) remote: Compressing objects: 66% (74/111) remote: Compressing objects: 67% (75/111) remote: Compressing objects: 68% (76/111) remote: Compressing objects: 69% (77/111) remote: Compressing objects: 70% (78/111) remote: Compressing objects: 71% (79/111) remote: Compressing objects: 72% (80/111) remote: Compressing objects: 73% (82/111) remote: Compressing objects: 74% (83/111) remote: Compressing objects: 75% (84/111) remote: Compressing objects: 76% (85/111) remote: Compressing objects: 77% (86/111) remote: Compressing objects: 78% (87/111) remote: Compressing objects: 79% (88/111) remote: Compressing objects: 80% (89/111) remote: Compressing objects: 81% (90/111) remote: Compressing objects: 82% (92/111) remote: Compressing objects: 83% (93/111) remote: Compressing objects: 84% (94/111) remote: Compressing objects: 85% (95/111) remote: Compressing objects: 86% (96/111) remote: Compressing objects: 87% (97/111) remote: Compressing objects: 88% (98/111) remote: Compressing objects: 89% (99/111) remote: Compressing objects: 90% (100/111) remote: Compressing objects: 91% (102/111) remote: Compressing objects: 92% (103/111) remote: Compressing objects: 93% (104/111) remote: Compressing objects: 94% (105/111) remote: Compressing objects: 95% (106/111) remote: Compressing objects: 96% (107/111) remote: Compressing objects: 97% (108/111) remote: Compressing objects: 98% (109/111) remote: Compressing objects: 99% (110/111) remote: Compressing objects: 100% (111/111) remote: Compressing objects: 100% (111/111), done. Receiving objects: 0% (1/86808) Receiving objects: 1% (869/86808) Receiving objects: 2% (1737/86808) Receiving objects: 3% (2605/86808) Receiving objects: 4% (3473/86808) Receiving objects: 5% (4341/86808) Receiving objects: 6% (5209/86808) Receiving objects: 7% (6077/86808), 3.12 MiB | 6.06 MiB/s Receiving objects: 8% (6945/86808), 3.12 MiB | 6.06 MiB/s Receiving objects: 9% (7813/86808), 3.12 MiB | 6.06 MiB/s Receiving objects: 9% (8664/86808), 7.69 MiB | 7.50 MiB/s Receiving objects: 10% (8681/86808), 7.69 MiB | 7.50 MiB/s Receiving objects: 11% (9549/86808), 7.69 MiB | 7.50 MiB/s Receiving objects: 12% (10417/86808), 7.69 MiB | 7.50 MiB/s Receiving objects: 13% (11286/86808), 12.77 MiB | 8.37 MiB/s Receiving objects: 14% (12154/86808), 12.77 MiB | 8.37 MiB/s Receiving objects: 15% (13022/86808), 12.77 MiB | 8.37 MiB/s Receiving objects: 15% (13250/86808), 12.77 MiB | 8.37 MiB/s Receiving objects: 16% (13890/86808), 17.85 MiB | 8.81 MiB/s Receiving objects: 17% (14758/86808), 17.85 MiB | 8.81 MiB/s Receiving objects: 18% (15626/86808), 17.85 MiB | 8.81 MiB/s Receiving objects: 19% (16494/86808), 17.85 MiB | 8.81 MiB/s Receiving objects: 20% (17362/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 21% (18230/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 22% (19098/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 23% (19966/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 24% (20834/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 24% (20929/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 25% (21702/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 26% (22571/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 27% (23439/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 28% (24307/86808), 22.45 MiB | 8.25 MiB/s Receiving objects: 29% (25175/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 30% (26043/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 31% (26911/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 32% (27779/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 33% (28647/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 34% (29515/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 35% (30383/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 36% (31251/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 37% (32119/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 38% (32988/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 39% (33856/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 40% (34724/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 41% (35592/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 42% (36460/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 43% (37328/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 44% (38196/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 45% (39064/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 46% (39932/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 47% (40800/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 48% (41668/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 49% (42536/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 50% (43404/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 51% (44273/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 52% (45141/86808), 28.96 MiB | 8.70 MiB/s Receiving objects: 53% (46009/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 54% (46877/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 55% (47745/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 56% (48613/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 57% (49481/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 58% (50349/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 58% (50758/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 59% (51217/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 60% (52085/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 61% (52953/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 62% (53821/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 63% (54690/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 64% (55558/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 65% (56426/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 66% (57294/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 67% (58162/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 68% (59030/86808), 35.09 MiB | 9.17 MiB/s Receiving objects: 69% (59898/86808), 39.86 MiB | 9.20 MiB/s Receiving objects: 70% (60766/86808), 39.86 MiB | 9.20 MiB/s Receiving objects: 71% (61634/86808), 39.86 MiB | 9.20 MiB/s Receiving objects: 72% (62502/86808), 39.86 MiB | 9.20 MiB/s Receiving objects: 73% (63370/86808), 39.86 MiB | 9.20 MiB/s Receiving objects: 74% (64238/86808), 39.86 MiB | 9.20 MiB/s Receiving objects: 75% (65106/86808), 43.38 MiB | 8.98 MiB/s Receiving objects: 76% (65975/86808), 43.38 MiB | 8.98 MiB/s Receiving objects: 77% (66843/86808), 43.38 MiB | 8.98 MiB/s Receiving objects: 77% (66940/86808), 43.38 MiB | 8.98 MiB/s Receiving objects: 78% (67711/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 79% (68579/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 80% (69447/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 81% (70315/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 82% (71183/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 83% (72051/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 84% (72919/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 85% (73787/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 86% (74655/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 87% (75523/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 88% (76392/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 89% (77260/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 90% (78128/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 91% (78996/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 92% (79864/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 93% (80732/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 94% (81600/86808), 47.32 MiB | 9.16 MiB/s Receiving objects: 95% (82468/86808), 53.01 MiB | 9.41 MiB/s Receiving objects: 96% (83336/86808), 53.01 MiB | 9.41 MiB/s Receiving objects: 97% (84204/86808), 53.01 MiB | 9.41 MiB/s Receiving objects: 97% (84919/86808), 53.01 MiB | 9.41 MiB/s Receiving objects: 98% (85072/86808), 53.01 MiB | 9.41 MiB/s Receiving objects: 99% (85940/86808), 53.01 MiB | 9.41 MiB/s remote: Total 86808 (delta 318), reused 248 (delta 248), pack-reused 86449 (from 3) Receiving objects: 100% (86808/86808), 53.01 MiB | 9.41 MiB/s Receiving objects: 100% (86808/86808), 55.46 MiB | 8.94 MiB/s, done. Resolving deltas: 0% (0/64125) Resolving deltas: 1% (642/64125) Resolving deltas: 2% (1283/64125) Resolving deltas: 3% (1924/64125) Resolving deltas: 4% (2565/64125) Resolving deltas: 5% (3207/64125) Resolving deltas: 6% (3848/64125) Resolving deltas: 7% (4489/64125) Resolving deltas: 8% (5130/64125) Resolving deltas: 9% (5772/64125) Resolving deltas: 10% (6413/64125) Resolving deltas: 11% (7054/64125) Resolving deltas: 12% (7695/64125) Resolving deltas: 13% (8337/64125) Resolving deltas: 14% (8978/64125) Resolving deltas: 15% (9619/64125) Resolving deltas: 16% (10260/64125) Resolving deltas: 17% (10902/64125) Resolving deltas: 17% (10971/64125) Resolving deltas: 18% (11543/64125) Resolving deltas: 18% (11752/64125) Resolving deltas: 19% (12184/64125) Resolving deltas: 20% (12825/64125) Resolving deltas: 21% (13467/64125) Resolving deltas: 22% (14108/64125) Resolving deltas: 23% (14749/64125) Resolving deltas: 24% (15390/64125) Resolving deltas: 24% (15958/64125) Resolving deltas: 25% (16032/64125) Resolving deltas: 26% (16673/64125) Resolving deltas: 27% (17314/64125) Resolving deltas: 28% (17955/64125) Resolving deltas: 29% (18597/64125) Resolving deltas: 30% (19238/64125) Resolving deltas: 31% (19879/64125) Resolving deltas: 32% (20520/64125) Resolving deltas: 33% (21162/64125) Resolving deltas: 34% (21803/64125) Resolving deltas: 35% (22444/64125) Resolving deltas: 36% (23085/64125) Resolving deltas: 37% (23727/64125) Resolving deltas: 37% (24068/64125) Resolving deltas: 38% (24368/64125) Resolving deltas: 39% (25009/64125) Resolving deltas: 40% (25650/64125) Resolving deltas: 41% (26292/64125) Resolving deltas: 42% (26933/64125) Resolving deltas: 43% (27574/64125) Resolving deltas: 44% (28215/64125) Resolving deltas: 44% (28753/64125) Resolving deltas: 45% (28857/64125) Resolving deltas: 46% (29498/64125) Resolving deltas: 47% (30139/64125) Resolving deltas: 48% (30780/64125) Resolving deltas: 49% (31422/64125) Resolving deltas: 50% (32063/64125) Resolving deltas: 51% (32704/64125) Resolving deltas: 52% (33345/64125) Resolving deltas: 53% (33987/64125) Resolving deltas: 54% (34628/64125) Resolving deltas: 55% (35269/64125) Resolving deltas: 56% (35910/64125) Resolving deltas: 57% (36552/64125) Resolving deltas: 58% (37193/64125) Resolving deltas: 59% (37834/64125) Resolving deltas: 60% (38475/64125) Resolving deltas: 61% (39117/64125) Resolving deltas: 62% (39758/64125) Resolving deltas: 63% (40399/64125) Resolving deltas: 64% (41040/64125) Resolving deltas: 65% (41682/64125) Resolving deltas: 66% (42323/64125) Resolving deltas: 67% (42964/64125) Resolving deltas: 68% (43605/64125) Resolving deltas: 69% (44247/64125) Resolving deltas: 70% (44888/64125) Resolving deltas: 71% (45529/64125) Resolving deltas: 72% (46170/64125) Resolving deltas: 73% (46812/64125) Resolving deltas: 74% (47453/64125) Resolving deltas: 75% (48094/64125) Resolving deltas: 76% (48735/64125) Resolving deltas: 77% (49377/64125) Resolving deltas: 78% (50018/64125) Resolving deltas: 79% (50659/64125) Resolving deltas: 80% (51300/64125) Resolving deltas: 81% (51942/64125) Resolving deltas: 81% (52101/64125) Resolving deltas: 82% (52583/64125) Resolving deltas: 83% (53224/64125) Resolving deltas: 84% (53865/64125) Resolving deltas: 85% (54507/64125) Resolving deltas: 86% (55148/64125) Resolving deltas: 87% (55789/64125) Resolving deltas: 88% (56430/64125) Resolving deltas: 89% (57072/64125) Resolving deltas: 90% (57713/64125) Resolving deltas: 91% (58354/64125) Resolving deltas: 92% (58995/64125) Resolving deltas: 93% (59637/64125) Resolving deltas: 94% (60278/64125) Resolving deltas: 95% (60919/64125) Resolving deltas: 96% (61560/64125) Resolving deltas: 97% (62202/64125) Resolving deltas: 98% (62843/64125) Resolving deltas: 99% (63484/64125) Resolving deltas: 100% (64125/64125) Resolving deltas: 100% (64125/64125), done.  ->(B Found relax-async-evaluation-timing.patch(B ==>(B Validating source files with sha512sums...(B langsmith-sdk ... Passed relax-async-evaluation-timing.patch ... Passed ]3008;end=84d69a25874f4c6a85926cd7403a9c05\Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file. ]3008;start=3de6ac746d9544e2a75d0574add0174b;user=root;hostname=charcadet.felixc.at;machineid=968bd06e338144c2820b75d3a81e8189;bootid=a9929ba7c80b42e38f234e5e324cb512;pid=2822335;comm=systemd-nspawn;container=arch-nspawn-2822335;type=container\]11;?\]2;🔵 Container arch-nspawn-2822335 on charcadet.felixc.at\]3008;start=c71e458d19f24898aefbfd542a235321;user=root;hostname=arch-nspawn-2822335;machineid=aa430f795cdd4706ac9a110cf21969f9;bootid=33a8153ca060472283c2a63137558d66;pid=14;comm=sudo;targetuser=builduser;type=session\==>(B Making package: python-langsmith 0.11.2-1.2 (Sat Sep 26 08:56:17 2026)(B ==>(B Checking runtime dependencies...(B ==>(B Installing missing dependencies...(B ]3008;start=cc1302efe46349bca30ed4bbaab43d2a;user=builduser;hostname=arch-nspawn-2822335;machineid=aa430f795cdd4706ac9a110cf21969f9;bootid=33a8153ca060472283c2a63137558d66;pid=890;comm=sudo;targetuser=root;type=session\[?25lresolving dependencies... looking for conflicting packages... Package (23) New Version Net Change Download Size extra/python-annotated-types 0.8.0-1 0.12 MiB extra/python-certifi 2026.07.22-1 0.02 MiB extra/python-charset-normalizer 3.5.1-1 0.63 MiB extra/python-h11 0.16.0-2 0.29 MiB extra/python-httpcore 1.0.9-3 1.04 MiB extra/python-idna 3.20-1 0.68 MiB 0.09 MiB extra/python-pydantic-core 3:2.46.5-1 5.35 MiB extra/python-typing-inspection 0.4.4-1 0.13 MiB extra/python-urllib3 2.6.3-1 1.44 MiB extra/python-anyio 4.15.1-1 2.24 MiB extra/python-distro 1.9.0-4 0.20 MiB extra/python-httpx 0.28.1-7 2.83 MiB extra/python-orjson 3.12.0-1 0.68 MiB extra/python-packaging 26.3-1 1.58 MiB extra/python-pydantic 2.13.5-1 6.05 MiB extra/python-requests 2.34.2-1 0.76 MiB extra/python-requests-toolbelt 1.0.0-6 0.44 MiB 0.08 MiB extra/python-sniffio 1.3.1-5 0.04 MiB 0.01 MiB extra/python-typing_extensions 4.16.0-1 0.53 MiB extra/python-uuid-utils 1.0.0-1 0.69 MiB 0.26 MiB extra/python-websockets 16.1.1-1 2.02 MiB 0.28 MiB extra/python-xxhash 4.0.1-1 0.08 MiB 0.02 MiB extra/python-zstandard 0.25.0-3 1.45 MiB 0.45 MiB Total Download Size: 1.21 MiB Total Installed Size: 29.27 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-zstandard-0.25.0-3-riscv64 downloading... python-websockets-16.1.1-1-riscv64 downloading... python-uuid-utils-1.0.0-1-riscv64 downloading... python-idna-3.20-1-any downloading... python-requests-toolbelt-1.0.0-6-any downloading... python-xxhash-4.0.1-1-riscv64 downloading... python-sniffio-1.3.1-5-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-idna... installing python-anyio... Optional dependencies for python-anyio python-trio: trio backend python-outcome: trio backend python-uvloop: use uvloop for asyncio backend python-pytest: pytest plugin installing python-distro... installing python-certifi... installing python-h11... installing python-httpcore... Optional dependencies for python-httpcore python-h2: for HTTP/2 support python-socksio: for SOCKS support python-anyio: for asyncio backend [installed] python-trio: for trio backend python-sniffio: for async support [pending] installing python-httpx... Optional dependencies for python-httpx python-brotli: for brotli response decompression python-brotlicffi: for brotli response decompression python-zstandard: for zstd response decompression [pending] python-h2: HTTP/2 support python-socksio: SOCKS proxy support python-click: command line client support python-rich: command line client support python-pygments: command line client support python-trio: alternative async library installing python-orjson... installing python-packaging... installing python-annotated-types... installing python-typing_extensions... installing python-typing-inspection... installing python-pydantic-core... installing python-pydantic... Optional dependencies for python-pydantic mypy: for type validation with mypy python-dotenv: for .env file support python-email-validator: for email validation python-hypothesis: for hypothesis plugin when using legacy v1 installing python-charset-normalizer... installing python-urllib3... Optional dependencies for python-urllib3 python-brotli: Brotli support python-brotlicffi: Brotli support python-h2: HTTP/2 support python-pysocks: SOCKS support installing python-requests... Optional dependencies for python-requests python-chardet: alternative character encoding library python-pysocks: SOCKS proxy support installing python-requests-toolbelt... installing python-sniffio... installing python-uuid-utils... installing python-websockets... installing python-xxhash... installing python-zstandard... Optional dependencies for python-zstandard python-cffi :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [?25h]3008;end=cc1302efe46349bca30ed4bbaab43d2a\==>(B Checking buildtime dependencies...(B ==>(B Installing missing dependencies...(B ]3008;start=6994d81ff96b418eb641bbfdaea7218c;user=builduser;hostname=arch-nspawn-2822335;machineid=aa430f795cdd4706ac9a110cf21969f9;bootid=33a8153ca060472283c2a63137558d66;pid=1027;comm=sudo;targetuser=root;type=session\[?25lresolving dependencies... looking for conflicting packages... warning: insufficient columns available for table display Packages (54) abseil-cpp-20260817.0-2 gtest-1.18.0-1 libyaml-0.2.5-3 perl-error-0.17030-3 perl-mailtools-2.22-3 perl-timedate-2.35-1 protobuf-36.1-1 python-editables-0.6-1 python-googleapis-common-protos-1.75.3-1 python-iniconfig-2.3.0-1 python-jsonpatch-1.33-6 python-jsonpointer-3.1.1-1 python-langchain-protocol-0.0.19-1 python-langsmith-0.11.2-1.1 python-markdown-it-py-4.2.0-1 python-marshmallow-4.3.1-1 python-mdurl-0.1.2-9 python-mypy_extensions-1.1.0-2 python-opentelemetry-exporter-otlp-proto-common-1.45.0-1 python-opentelemetry-proto-1.44.0-1 python-opentelemetry-semantic-conventions-1.45.0-1 python-pathspec-1.1.1-1 python-pluggy-1.6.0-3.1 python-protobuf-36.1-1 python-pygments-2.21.0-1 python-pyproject-hooks-1.3.3-1 python-tenacity-9.2.0-1 python-trove-classifiers-2026.9.21.13-1 python-typing_inspect-0.9.0-6 python-wrapt-2.4.1-1 python-yaml-6.0.3-2 zlib-ng-2.3.3-1 git-2.55.0-1 python-attrs-26.1.0-1 python-build-1.6.0-1 python-cachetools-7.2.0-1 python-dataclasses-json-0.6.7-1 python-hatchling-1.30.1-1 python-installer-1.0.1-1 python-langchain-core-1.6.2-1 python-multipart-2.0.1-1 python-opentelemetry-api-1.44.0-1.1 python-opentelemetry-exporter-otlp-proto-http-1.44.0-1 python-opentelemetry-sdk-1.44.0-1.1 python-pytest-1:9.1.1-1 python-pytest-asyncio-1.4.0-1 python-pytest-httpx-0.36.2-1 python-pytest-rerunfailures-16.7-1 python-pytest-retry-1.7.0-1 python-pytest-socket-0.8.1-1 python-pytest-timeout-2.5.0-1 python-rich-15.0.0-1 python-vcrpy-8.3.0-1 python-wheel-0.48.0-1 Total Download Size: 4.41 MiB Total Installed Size: 123.99 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-langsmith-0.11.2-1.1-any downloading... python-langchain-core-1.6.2-1-any downloading... python-protobuf-36.1-1-riscv64 downloading... python-opentelemetry-sdk-1.44.0-1.1-any downloading... python-opentelemetry-semantic-conventions-1.45.0-1-any downloading... python-googleapis-common-protos-1.75.3-1-any downloading... python-wrapt-2.4.1-1-riscv64 downloading... python-marshmallow-4.3.1-1-any downloading... python-opentelemetry-api-1.44.0-1.1-any downloading... python-vcrpy-8.3.0-1-any downloading... python-tenacity-9.2.0-1-any downloading... python-dataclasses-json-0.6.7-1-any downloading... python-opentelemetry-proto-1.44.0-1-any downloading... python-pytest-rerunfailures-16.7-1-any downloading... python-cachetools-7.2.0-1-any downloading... python-multipart-2.0.1-1-any downloading... python-pytest-httpx-0.36.2-1-any downloading... python-opentelemetry-exporter-otlp-proto-http-1.44.0-1-any downloading... python-jsonpatch-1.33-6-any downloading... python-opentelemetry-exporter-otlp-proto-common-1.45.0-1-any downloading... python-pytest-retry-1.7.0-1-any downloading... python-typing_inspect-0.9.0-6-any downloading... python-langchain-protocol-0.0.19-1-any downloading... python-pytest-socket-0.8.1-1-any downloading... python-jsonpointer-3.1.1-1-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing perl-error... installing perl-timedate... installing perl-mailtools... installing zlib-ng... installing git... Optional dependencies for git git-zsh-completion: upstream zsh completion tk: gitk and git gui openssh: ssh transport and crypto man: show help with `git command --help` perl-libwww: git svn perl-term-readkey: git svn and interactive.singlekey setting perl-io-socket-ssl: git send-email TLS support perl-authen-sasl: git send-email TLS support perl-cgi: gitweb (web interface) support python: git svn & git p4 [installed] subversion: git svn org.freedesktop.secrets: keyring credential helper libsecret: libsecret credential helper [installed] less: the default pager for git installing python-pyproject-hooks... installing python-build... Optional dependencies for python-build python-pip: to use as the Python package installer (default) python-uv: to use as the Python package installer python-virtualenv: to use virtualenv for build isolation installing python-editables... installing python-pathspec... Optional dependencies for python-pathspec python-google-re2: re2 backend installing python-pluggy... installing python-trove-classifiers... installing python-hatchling... installing python-installer... installing python-wheel... Optional dependencies for python-wheel python-keyring: for wheel.signatures python-xdg: for wheel.signatures python-setuptools: for legacy bdist_wheel subcommand installing python-attrs... installing python-cachetools... installing python-marshmallow... installing python-mypy_extensions... installing python-typing_inspect... installing python-dataclasses-json... installing python-jsonpointer... installing python-jsonpatch... installing python-langchain-protocol... installing python-langsmith... Optional dependencies for python-langsmith python-langchain-core: LangChain runnable integration support [pending] python-cachetools: LiveKit and Pipecat tracing support [installed] python-pytest: LangSmith pytest plugin support [pending] python-rich: enhanced pytest output support [pending] python-vcrpy: VCR support [pending] python-opentelemetry-api: OpenTelemetry tracing support [pending] python-opentelemetry-sdk: OpenTelemetry tracing support [pending] python-opentelemetry-exporter-otlp-proto-http: OpenTelemetry export support [pending] installing python-tenacity... Optional dependencies for python-tenacity python-tornado: for Tornado coroutines support installing libyaml... installing python-yaml... installing python-langchain-core... installing python-multipart... installing python-opentelemetry-api... installing gtest... Optional dependencies for gtest python: gmock generator [installed] installing abseil-cpp... installing protobuf... installing python-protobuf... installing python-googleapis-common-protos... Optional dependencies for python-googleapis-common-protos python-grpcio: for grpc support installing python-opentelemetry-proto... installing python-opentelemetry-exporter-otlp-proto-common... installing python-opentelemetry-semantic-conventions... installing python-opentelemetry-sdk... installing python-opentelemetry-exporter-otlp-proto-http... installing python-iniconfig... installing python-pygments... installing python-pytest... installing python-pytest-asyncio... installing python-pytest-httpx... installing python-pytest-rerunfailures... Optional dependencies for python-pytest-rerunfailures python-pytest-xdist: for recovering from crashes installing python-pytest-retry... installing python-pytest-socket... installing python-pytest-timeout... installing python-mdurl... installing python-markdown-it-py... Optional dependencies for python-markdown-it-py python-mdit_py_plugins: core plugins python-linkify-it-py: linkify extension installing python-rich... installing python-wrapt... installing python-vcrpy... :: Running post-transaction hooks... (1/4) Creating system user accounts... Creating group 'git' with GID 968. Creating user 'git' (git daemon user) with UID 968 and GID 968. (2/4) Reloading system manager configuration... Skipped: Current root is not booted. (3/4) Arming ConditionNeedsUpdate... (4/4) Checking for old perl modules... [?25h]3008;end=6994d81ff96b418eb641bbfdaea7218c\==>(B Retrieving sources...(B  ->(B Found relax-async-evaluation-timing.patch(B ==> WARNING:(B Skipping all source file integrity checks.(B ==>(B Extracting sources...(B  ->(B Creating working copy of langsmith-sdk git repo...(B Cloning into 'langsmith-sdk'... done. Switched to a new branch 'makepkg' ==>(B Starting prepare()...(B patching file tests/unit_tests/evaluation/test_runner.py ==>(B Starting build()...(B * Getting build dependencies for wheel... * Building wheel... Successfully built langsmith-0.11.2-py3-none-any.whl ==>(B Starting check()...(B ============================= test session starts ============================== platform linux -- Python 3.14.7, pytest-9.1.1, pluggy-1.6.0 rootdir: /build/python-langsmith/src/langsmith-sdk/python configfile: pyproject.toml plugins: anyio-4.15.1, langsmith-0.11.2, asyncio-1.4.0, httpx-0.36.2, rerunfailures-16.7, retry-1.7.0, socket-0.8.1, timeout-2.4.0 asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function timeout: 120.0s timeout method: thread timeout func_only: False collected 2021 items / 9 deselected / 2 skipped / 2012 selected tests/unit_tests/evaluation/test_async_experiment_results.py ....... [ 0%] tests/unit_tests/evaluation/test_evaluator.py ....................... [ 1%] tests/unit_tests/evaluation/test_key_extraction.py ........... [ 2%] tests/unit_tests/evaluation/test_runner.py FFFFFFFFFF.FFFFFFFF.......... [ 3%] .........F.............................................................. [ 7%] ... [ 7%] tests/unit_tests/evaluation/test_sync_experiment_results.py ........ [ 7%] tests/unit_tests/sandbox/test_async_client.py .......................... [ 8%] .................................. [ 10%] tests/unit_tests/sandbox/test_async_sandbox.py ......................... [ 11%] ........ [ 12%] tests/unit_tests/sandbox/test_async_ws_execute.py ...................... [ 13%] ...................... [ 14%] tests/unit_tests/sandbox/test_client.py ................................ [ 16%] ....................................................... [ 18%] tests/unit_tests/sandbox/test_command_handle.py .... [ 18%] tests/unit_tests/sandbox/test_command_id_retry.py ............ [ 19%] tests/unit_tests/sandbox/test_exceptions.py ...................... [ 20%] tests/unit_tests/sandbox/test_helpers.py .... [ 20%] tests/unit_tests/sandbox/test_models.py .......................... [ 22%] tests/unit_tests/sandbox/test_proxy_config.py .......................... [ 23%] ....................... [ 24%] tests/unit_tests/sandbox/test_sandbox.py ............................... [ 26%] ... [ 26%] tests/unit_tests/sandbox/test_sync_async_conversion.py ......... [ 26%] tests/unit_tests/sandbox/test_transport.py ............................. [ 28%] ................. [ 28%] tests/unit_tests/sandbox/test_tunnel.py ................................ [ 30%] . [ 30%] tests/unit_tests/sandbox/test_ws_execute.py ............................ [ 32%] .................................. [ 33%] tests/unit_tests/sandbox/test_yamux.py ....................... [ 34%] tests/unit_tests/test_anonymizer.py ...F................................ [ 36%] ..........F [ 37%] tests/unit_tests/test_async_client.py .......................... [ 38%] tests/unit_tests/test_beta_evals.py . [ 38%] tests/unit_tests/test_client.py ........................................ [ 40%] ........................................................................ [ 44%] ........................................................................ [ 47%] ........................................................................ [ 51%] ....................FFFFFFF.............sss. [ 53%] tests/unit_tests/test_custom_headers.py ...... [ 53%] tests/unit_tests/test_env.py ............... [ 54%] tests/unit_tests/test_expect.py . [ 54%] tests/unit_tests/test_experiment_metadata.py .......... [ 55%] tests/unit_tests/test_hub_methods.py ................................... [ 56%] ........... [ 57%] tests/unit_tests/test_insights_report.py .... [ 57%] tests/unit_tests/test_ls_agent_type.py ....... [ 57%] tests/unit_tests/test_multipart_retry_matrix.py ........................ [ 59%] ...x [ 59%] tests/unit_tests/test_multiple_endpoints.py ..F....... [ 59%] tests/unit_tests/test_oauth_refresh_lock.py ......... [ 60%] tests/unit_tests/test_operations.py .... [ 60%] tests/unit_tests/test_otel_exporter.py ............ [ 60%] tests/unit_tests/test_otel_url.py ................. [ 61%] tests/unit_tests/test_profiles_oauth_discovery.py ........... [ 62%] tests/unit_tests/test_prompt_cache.py .................................. [ 64%] ................................... [ 65%] tests/unit_tests/test_pytest_plugin.py .... [ 66%] tests/unit_tests/test_replica_endpoints.py ............................. [ 67%] .....FFFFFF....F....... [ 68%] tests/unit_tests/test_replica_run_ids.py .F.. [ 68%] tests/unit_tests/test_replica_serialization.py . [ 68%] tests/unit_tests/test_run_helpers.py ..............FFFFFFFFFF.F.F....ssF [ 70%] ........FFFFFFFFFFFFFFFF..F.FFFFFF......F.RRRF....FFFF..FF....F..FFFF.FF [ 74%] ..FFFFFFFFFFF.FFFF [ 74%] tests/unit_tests/test_run_tree_gc_leak.py FFFFF [ 75%] tests/unit_tests/test_run_trees.py FFF.FFFFFFFFFFF.......FFFFFFFFFFFFFFF [ 76%] F [ 77%] tests/unit_tests/test_runtime_overrides.py .........FF. [ 77%] tests/unit_tests/test_span_utils.py .. [ 77%] tests/unit_tests/test_testing.py .... [ 77%] tests/unit_tests/test_utils.py .F............... [ 78%] tests/unit_tests/test_uuid_v7.py FFFF..... [ 79%] tests/unit_tests/test_v2_migration_utils.py ............................ [ 80%] ........ [ 81%] tests/unit_tests/wrappers/test_anthropic_processing.py ................. [ 81%] ...... [ 82%] tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py EE.EEEEEEE...FF [ 82%] FFF [ 83%] tests/unit_tests/wrappers/test_gemini_live.py ........FFFFFFF [ 83%] tests/unit_tests/wrappers/test_gemini_processing.py .................... [ 84%] ..................... [ 85%] tests/unit_tests/wrappers/test_google_adk_live.py ...................... [ 86%] ............................... [ 88%] tests/unit_tests/wrappers/test_livekit.py .............................. [ 89%] ................................................... [ 92%] tests/unit_tests/wrappers/test_openai_processing.py .................... [ 93%] .. [ 93%] tests/unit_tests/wrappers/test_openai_realtime.py .......FFFFFF [ 94%] tests/unit_tests/wrappers/test_openai_realtime_agents.py ......FFFFFFFFF [ 94%] FFF.FF [ 95%] tests/unit_tests/wrappers/test_pipecat.py .............................. [ 96%] ...................................... [ 98%] tests/unit_tests/wrappers/test_voice_helpers.py ........ [ 99%] tests/unit_tests/wrappers/test_voice_session.py FFFFFFFFFFFFFFFFFFF [100%] ==================================== ERRORS ==================================== __________ ERROR at setup of TestToolUseSuccessFlow.test_success_flow __________ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:55: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413293099713024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ ERROR at setup of TestToolUseFailureFlow.test_failure_flow __________ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413293374825984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___ ERROR at setup of TestSubagentFlow.test_subagent_nested_under_agent_tool ___ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413293663260928 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ ERROR at setup of TestSubagentFlow.test_tool_inside_subagent_nests_under_subagent _ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413293955779072 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____ ERROR at setup of TestSubagentFlow.test_subagent_findable_after_stop _____ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413294227581952 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ ERROR at setup of TestSubagentFlow.test_subagent_stop_and_post_tool_use_set_outputs _ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413294491260160 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ ERROR at setup of TestTranscriptPathCapture.test_captures_transcript_path_from_first_hook _ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413294760321024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ ERROR at setup of TestTranscriptPathCapture.test_does_not_overwrite_on_subsequent_hooks _ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413295030471936 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ ERROR at setup of TestTranscriptPathCapture.test_clear_active_tool_runs_resets_transcript_path _ self = @pytest.fixture(autouse=True) def _set_parent(self): from langsmith.integrations.claude_agent_sdk import _tools > _tools.set_parent_run_tree(_make_parent_run()) ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413295296228864 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError =================================== FAILURES =================================== ___ test_evaluate_feedback_includes_experiment_session_id_and_run_start_time ___ def test_evaluate_feedback_includes_experiment_session_id_and_run_start_time() -> None: example, example_payload = _create_example(0) client, fake_request = _fake_client_for_examples( [example_payload], str(example.dataset_id), "my-dataset" ) def predict(inputs: dict) -> dict: return {"output": inputs["in"] + 1} def score(run, example): return {"key": "quality", "score": 1} results = evaluate( predict, data=[example], evaluators=[score], client=client, blocking=True, max_concurrency=0, ) > assert len(list(results)) == 1 ^^^^^^^^^^^^^ tests/unit_tests/evaluation/test_runner.py:219: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:610: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1767: in _score yield context.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [] current_results = {'run': None, 'example': (id=ee1cbd9f-aa52-4e38-81f7-00e9f801a5d6, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'shiny-level-37' at: http://localhost/o/4eebd445-aba6-4721-9411-e456e134a135/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=c34a5a24-e1c4-42b1-aab8-2b961983c56b ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: LangSmithError("Failed to GET /info in LangSmith API. 'NoneType' object is not subscriptable\n") WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ________ test_aevaluate_feedback_includes_experiment_id_and_start_time _________ @pytest.mark.asyncio async def test_aevaluate_feedback_includes_experiment_id_and_start_time() -> None: example, example_payload = _create_example(0) client, fake_request = _fake_client_for_examples( [example_payload], str(example.dataset_id), "my-dataset" ) async def predict(inputs: dict) -> dict: return {"output": inputs["in"] + 1} async def score(run, example): return {"key": "quality", "score": 1} results = await aevaluate( predict, data=[example], evaluators=[score], client=client, blocking=True, max_concurrency=0, ) assert len([row async for row in results]) == 1 _wait_until(lambda: len(fake_request.feedbacks) == 1) feedback = fake_request.feedbacks[0] > _wait_until(lambda: feedback["run_id"] in fake_request.runs) tests/unit_tests/evaluation/test_runner.py:254: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/evaluation/test_runner.py:160: in _wait_until if condition(): ^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _wait_until(lambda: feedback["run_id"] in fake_request.runs) ^^^^^^^^^^^^^^^^^^ E KeyError: 'run_id' tests/unit_tests/evaluation/test_runner.py:254: KeyError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'warm-backpack-8' at: http://localhost/o/a480a617-9655-4475-a5f0-2b9bccb4e17e/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=94e3a61e-7b09-4449-b5ad-0a5f8637e5eb ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: LangSmithError("Failed to GET /info in LangSmith API. 'NoneType' object is not subscriptable\n") WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_evaluate_results[False-False-False] ___________________ self = def __iter__(self) -> Iterator[ExperimentResultRow]: ix = 0 while ( not self._processing_complete.is_set() or not self._queue.empty() or ix < len(self._results) ): try: if ix < len(self._results): yield self._results[ix] ix += 1 else: > self._queue.get(block=True, timeout=0.1) langsmith/evaluation/_runner.py:604: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , block = True, timeout = 0.1 def get(self, block=True, timeout=None): '''Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a non-negative number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case). Raises ShutDown if the queue has been shut down and is empty, or if the queue has been shut down immediately. ''' with self.not_empty: if self.is_shutdown and not self._qsize(): raise ShutDown if not block: if not self._qsize(): raise Empty elif timeout is None: while not self._qsize(): self.not_empty.wait() if self.is_shutdown and not self._qsize(): raise ShutDown elif timeout < 0: raise ValueError("'timeout' must be a non-negative number") else: endtime = time() + timeout while not self._qsize(): remaining = endtime - time() if remaining <= 0.0: > raise Empty E _queue.Empty /usr/lib/python3.14/queue.py:209: Empty During handling of the above exception, another exception occurred: blocking = False, as_runnable = False, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start > for _ in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:406: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:607: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=7402104e-18df-48c4-960e-2ecb76f6642e, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s respectful-passenger-20 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_evaluate_results[False-False-True] ____________________ blocking = True, as_runnable = False, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start for _ in results: now = time.time() deltas.append((now - last) if last is not None else 0) # type: ignore last = now assert now - start > 1.5 # Essentially we want to check that 1 delay is > 1.5s and the rest are < 0.1s assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS assert slow_index is not None total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance > for r in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:421: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:610: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=406863c1-0b3e-4dc6-8475-d42c866ba1e9, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s mealy-suggestion-22 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_evaluate_results[False-True-False] ____________________ self = def __iter__(self) -> Iterator[ExperimentResultRow]: ix = 0 while ( not self._processing_complete.is_set() or not self._queue.empty() or ix < len(self._results) ): try: if ix < len(self._results): yield self._results[ix] ix += 1 else: > self._queue.get(block=True, timeout=0.1) langsmith/evaluation/_runner.py:604: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , block = True, timeout = 0.1 def get(self, block=True, timeout=None): '''Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a non-negative number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case). Raises ShutDown if the queue has been shut down and is empty, or if the queue has been shut down immediately. ''' with self.not_empty: if self.is_shutdown and not self._qsize(): raise ShutDown if not block: if not self._qsize(): raise Empty elif timeout is None: while not self._qsize(): self.not_empty.wait() if self.is_shutdown and not self._qsize(): raise ShutDown elif timeout < 0: raise ValueError("'timeout' must be a non-negative number") else: endtime = time() + timeout while not self._qsize(): remaining = endtime - time() if remaining <= 0.0: > raise Empty E _queue.Empty /usr/lib/python3.14/queue.py:209: Empty During handling of the above exception, another exception occurred: blocking = False, as_runnable = True, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start > for _ in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:406: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:607: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=dd551b81-5843-4235-a78f-9f5d42e2187b, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s large-street-23 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ____________________ test_evaluate_results[False-True-True] ____________________ blocking = True, as_runnable = True, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start for _ in results: now = time.time() deltas.append((now - last) if last is not None else 0) # type: ignore last = now assert now - start > 1.5 # Essentially we want to check that 1 delay is > 1.5s and the rest are < 0.1s assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS assert slow_index is not None total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance > for r in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:421: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:610: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=3bec163f-2887-4456-84fb-2c8cb67817f2, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s pertinent-coal-16 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_evaluate_results[True-False-False] ____________________ self = def __iter__(self) -> Iterator[ExperimentResultRow]: ix = 0 while ( not self._processing_complete.is_set() or not self._queue.empty() or ix < len(self._results) ): try: if ix < len(self._results): yield self._results[ix] ix += 1 else: > self._queue.get(block=True, timeout=0.1) langsmith/evaluation/_runner.py:604: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , block = True, timeout = 0.1 def get(self, block=True, timeout=None): '''Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a non-negative number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case). Raises ShutDown if the queue has been shut down and is empty, or if the queue has been shut down immediately. ''' with self.not_empty: if self.is_shutdown and not self._qsize(): raise ShutDown if not block: if not self._qsize(): raise Empty elif timeout is None: while not self._qsize(): self.not_empty.wait() if self.is_shutdown and not self._qsize(): raise ShutDown elif timeout < 0: raise ValueError("'timeout' must be a non-negative number") else: endtime = time() + timeout while not self._qsize(): remaining = endtime - time() if remaining <= 0.0: > raise Empty E _queue.Empty /usr/lib/python3.14/queue.py:209: Empty During handling of the above exception, another exception occurred: blocking = False, as_runnable = False, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start > for _ in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:406: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:607: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=d4bf7844-c0a4-4281-a3ca-eb28d9a8e7ba, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'back-pain-54' at: http://localhost/o/99812f4e-b3d9-4258-9611-1bc8d47d87a6/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=f0d67a8a-e91f-4371-bceb-e09e36f073b8 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ____________________ test_evaluate_results[True-False-True] ____________________ blocking = True, as_runnable = False, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start for _ in results: now = time.time() deltas.append((now - last) if last is not None else 0) # type: ignore last = now assert now - start > 1.5 # Essentially we want to check that 1 delay is > 1.5s and the rest are < 0.1s assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS assert slow_index is not None total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance > for r in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:421: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:610: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=267b2a89-c7d1-4158-8f5d-9fa9901c0917, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'kind-tray-98' at: http://localhost/o/7faa2731-c18d-4f5e-963a-9e953901295a/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=ded28325-c556-406f-9508-81e04b20db78 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ____________________ test_evaluate_results[True-True-False] ____________________ self = def __iter__(self) -> Iterator[ExperimentResultRow]: ix = 0 while ( not self._processing_complete.is_set() or not self._queue.empty() or ix < len(self._results) ): try: if ix < len(self._results): yield self._results[ix] ix += 1 else: > self._queue.get(block=True, timeout=0.1) langsmith/evaluation/_runner.py:604: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , block = True, timeout = 0.1 def get(self, block=True, timeout=None): '''Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a non-negative number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case). Raises ShutDown if the queue has been shut down and is empty, or if the queue has been shut down immediately. ''' with self.not_empty: if self.is_shutdown and not self._qsize(): raise ShutDown if not block: if not self._qsize(): raise Empty elif timeout is None: while not self._qsize(): self.not_empty.wait() if self.is_shutdown and not self._qsize(): raise ShutDown elif timeout < 0: raise ValueError("'timeout' must be a non-negative number") else: endtime = time() + timeout while not self._qsize(): remaining = endtime - time() if remaining <= 0.0: > raise Empty E _queue.Empty /usr/lib/python3.14/queue.py:209: Empty During handling of the above exception, another exception occurred: blocking = False, as_runnable = True, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start > for _ in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:406: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:607: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=a5af5e38-c6ed-46fd-823a-cb5e40a6a6bc, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'advanced-experience-27' at: http://localhost/o/1d960914-a70f-45da-8e43-4dcc653cfe32/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=bbeb117a-bc32-42d7-adc2-914181498b2e ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ____________________ test_evaluate_results[True-True-True] _____________________ blocking = True, as_runnable = True, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) def test_evaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = Lock() slow_index = None def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True time.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_inputs_outputs_reference(inputs, outputs, reference_outputs): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return [{"score": len([x["in"] for x in inputs])}] def summary_eval_outputs_reference(outputs, reference_outputs): return len([x["answer"] for x in reference_outputs]) evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = evaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas = [] last = None start = time.time() now = start for _ in results: now = time.time() deltas.append((now - last) if last is not None else 0) # type: ignore last = now assert now - start > 1.5 # Essentially we want to check that 1 delay is > 1.5s and the rest are < 0.1s assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS assert slow_index is not None total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance > for r in results: ^^^^^^^ tests/unit_tests/evaluation/test_runner.py:421: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:610: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1788: in _score yield future.result() ^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:447: in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/_base.py:396: in __get_result raise self._exception /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, , , , , ...] current_results = {'run': None, 'example': (id=cc1b07d3-6f27-48fc-beb7-13a593c4d18d, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'puzzled-route-64' at: http://localhost/o/2e947815-ec1a-47c9-910c-56095c3a25a0/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=4392601f-67a2-411e-946c-7d8681a2726a ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' __________________ test_aevaluate_results[False-False-False] ___________________ blocking = False, as_runnable = False, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore > assert 4 > total > 1.5 E assert 0.16566014289855957 > 1.5 tests/unit_tests/evaluation/test_runner.py:709: AssertionError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s enchanted-guide-100 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fddd1e6c0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fddd1e8d0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fddd1eae0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_aevaluate_results[False-False-True] ___________________ blocking = True, as_runnable = False, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore assert 4 > total > 1.5 # Essentially we want to check that most calls were very fast. assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance assert max(deltas) > (total / 3) async for r in results: > assert r["run"].outputs["output"] == r["example"].inputs["in"] + 1 # type: ignore ^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'outputs' tests/unit_tests/evaluation/test_runner.py:722: AttributeError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s weary-tendency-11 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fddc5ef00>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fddc5fed0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fddc5fb60>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_aevaluate_results[False-True-False] ___________________ blocking = False, as_runnable = True, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore > assert 4 > total > 1.5 E assert 0.17834186553955078 > 1.5 tests/unit_tests/evaluation/test_runner.py:709: AssertionError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s excellent-water-44 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fdda416f0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdda41220>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdda41010>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_aevaluate_results[False-True-True] ____________________ blocking = True, as_runnable = True, upload_results = False @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore assert 4 > total > 1.5 # Essentially we want to check that most calls were very fast. assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance assert max(deltas) > (total / 3) async for r in results: > assert r["run"].outputs["output"] == r["example"].inputs["in"] + 1 # type: ignore ^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'outputs' tests/unit_tests/evaluation/test_runner.py:722: AttributeError ----------------------------- Captured stdout call ----------------------------- Starting evaluation of experiment: %s impressionable-plant-98 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fdda42a30>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdda40a90>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdda40510>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_aevaluate_results[True-False-False] ___________________ blocking = False, as_runnable = False, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore > assert 4 > total > 1.5 E assert 0.5593819618225098 > 1.5 tests/unit_tests/evaluation/test_runner.py:709: AssertionError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'memorable-stop-40' at: http://localhost/o/e522b2d7-2efd-46f6-87dc-f586747625fa/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=5253803d-12b4-4104-a146-110b75dfe964 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fdde6c5c0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdde6c7d0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdde6c9e0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_aevaluate_results[True-False-True] ____________________ blocking = True, as_runnable = False, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore assert 4 > total > 1.5 # Essentially we want to check that most calls were very fast. assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance assert max(deltas) > (total / 3) async for r in results: > assert r["run"].outputs["output"] == r["example"].inputs["in"] + 1 # type: ignore ^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'outputs' tests/unit_tests/evaluation/test_runner.py:722: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'timely-society-17' at: http://localhost/o/4ff634a6-d980-411b-a236-c1f9c952a25a/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=47f9679f-2557-41a7-8b8d-ad21b1fd8960 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fdde6d4e0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdde6d9b0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdde6d590>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ___________________ test_aevaluate_results[True-True-False] ____________________ blocking = False, as_runnable = True, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore > assert 4 > total > 1.5 E assert 0.5992860794067383 > 1.5 tests/unit_tests/evaluation/test_runner.py:709: AssertionError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'elderly-spring-31' at: http://localhost/o/b0c46775-ba2c-4e64-9b6f-5af032a89c7f/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=c03dfd64-22d6-42fc-8e3b-39867c17aec3 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fdde6fcc0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdde6fb60>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fdde6c1a0>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ____________________ test_aevaluate_results[True-True-True] ____________________ blocking = True, as_runnable = True, upload_results = True @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher") @pytest.mark.parametrize("blocking", [False, True]) @pytest.mark.parametrize("as_runnable", [False, True]) @pytest.mark.parametrize("upload_results", [False, True]) async def test_aevaluate_results( blocking: bool, as_runnable: bool, upload_results: bool ) -> None: session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" SPLIT_SIZE = 3 NUM_REPETITIONS = 4 ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] dev_split = random.sample(ds_examples, SPLIT_SIZE) tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client( api_url="http://localhost:1984", api_key="123", session=session, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) client._tenant_id = uuid.UUID(tenant_id) ordering_of_stuff: List[str] = [] locked = False lock = asyncio.Lock() slow_index = None async def predict(inputs: dict) -> dict: nonlocal locked nonlocal slow_index if len(ordering_of_stuff) > 2 and not locked: async with lock: if len(ordering_of_stuff) > 2 and not locked: locked = True await asyncio.sleep(3) slow_index = len(ordering_of_stuff) ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") else: ordering_of_stuff.append("predict") return {"output": inputs["in"] + 1} if as_runnable: try: from langchain_core.runnables import RunnableLambda except ImportError: pytest.skip("langchain-core not installed.") return else: predict = RunnableLambda(predict) async def score_value_first(run, example): ordering_of_stuff.append("evaluate") return {"score": 0.3} async def score_unpacked_inputs_outputs(inputs, outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_inputs_outputs_reference( inputs, outputs, reference_outputs ): ordering_of_stuff.append("evaluate") return {"score": reference_outputs["answer"]} async def score_unpacked_inputs_outputs_attachments(inputs, outputs, attachments): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def score_unpacked_outputs(outputs): ordering_of_stuff.append("evaluate") return {"score": outputs["output"]} async def eval_float(run, example): ordering_of_stuff.append("evaluate") return 0.2 async def eval_str(run, example): ordering_of_stuff.append("evaluate") return "good" async def eval_list(run, example): ordering_of_stuff.append("evaluate") return [ {"score": True, "key": "list_eval_bool"}, {"score": 1, "key": "list_eval_int"}, ] def summary_eval_runs_examples(runs_, examples_): return {"score": len(runs_[0].dotted_order)} def summary_eval_inputs_outputs(inputs, outputs): return {"score": len([x["in"] for x in inputs])} def summary_eval_outputs_reference(outputs, reference_outputs): return {"score": len([x["answer"] for x in reference_outputs])} evaluators = [ score_value_first, score_unpacked_inputs_outputs, score_unpacked_inputs_outputs_reference, score_unpacked_inputs_outputs_attachments, score_unpacked_outputs, eval_float, eval_str, eval_list, ] summary_evaluators = [ summary_eval_runs_examples, summary_eval_inputs_outputs, summary_eval_outputs_reference, ] results = await aevaluate( predict, client=client, data=dev_split, evaluators=evaluators, summary_evaluators=summary_evaluators, num_repetitions=NUM_REPETITIONS, blocking=blocking, upload_results=upload_results, max_concurrency=None, ) if not blocking: deltas: list = [] start = time.time() last = start now = None async for _ in results: now = time.time() deltas.append((now - last)) last = now total = now - start # type: ignore assert 4 > total > 1.5 # Essentially we want to check that most calls were very fast. assert len(deltas) == SPLIT_SIZE * NUM_REPETITIONS total_quick = sum([d < 0.5 for d in deltas]) total_slow = sum([d > 0.5 for d in deltas]) tolerance = 3 assert total_slow < tolerance assert total_quick > (SPLIT_SIZE * NUM_REPETITIONS - 1) - tolerance assert max(deltas) > (total / 3) async for r in results: > assert r["run"].outputs["output"] == r["example"].inputs["in"] + 1 # type: ignore ^^^^^^^^^^^^^^^^ E AttributeError: 'NoneType' object has no attribute 'outputs' tests/unit_tests/evaluation/test_runner.py:722: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'terrific-use-38' at: http://localhost/o/6045d6c3-7db1-4658-b622-fb3c7e39f708/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=c87f0745-a0f4-4129-ab2e-0a6a18262b61 ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1336 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1334, in _aforward await fn(*args, langsmith_extra=langsmith_extra) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 611, in async_wrapper run_container = await aitertools.aio_to_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 363, in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_aiter.py", line 376, in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .summary_eval_runs_examples at 0x3fde680460>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fde680670>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ERROR langsmith.evaluation._arunner:_arunner.py:1128 Error running summary evaluator .wrapper at 0x3fde680880>: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py", line 1109, in _aapply_summary_evaluators summary_eval_result = evaluator(runs, examples) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1944, in _wrapper_inner return _wrapper_super_inner( f"Runs[] (Length={len(runs)})", f"Examples[] (Length={len(examples)})" ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' ________________________ test_passing_kwargs_is_working ________________________ def test_passing_kwargs_is_working(): session = mock.Mock() ds_name = "my-dataset" ds_id = "00886375-eb2a-4038-9032-efff60309896" ds_example_responses = [_create_example(i) for i in range(10)] ds_examples = [e[0] for e in ds_example_responses] tenant_id = str(uuid.uuid4()) fake_request = FakeRequest( ds_id, ds_name, [e[1] for e in ds_example_responses], tenant_id ) session.request = fake_request.request client = Client(api_url="http://localhost:1984", api_key="123", session=session) client._tenant_id = uuid.UUID(tenant_id) def _valid_mixed_positional_and_keyword_with_reference_outputs( inputs, outputs, *, reference_outputs, optional=None ): assert list(inputs.keys()) == ["in"] assert list(outputs.keys()) == ["foo"] assert list(reference_outputs.keys()) == ["answer"] return {"score": 1} async def _async_valid_mixed_positional_and_keyword_with_reference_outputs( inputs, outputs, *, reference_outputs, optional=None ): assert list(inputs.keys()) == ["in"] assert list(outputs.keys()) == ["foo"] assert list(reference_outputs.keys()) == ["answer"] return {"score": 1} res = evaluate( target, data=ds_examples, evaluators=[ _valid_mixed_positional_and_keyword_with_reference_outputs, _async_valid_mixed_positional_and_keyword_with_reference_outputs, ], client=client, ) > for r in res: ^^^ tests/unit_tests/evaluation/test_runner.py:1117: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/evaluation/_runner.py:610: in __iter__ raise self._processing_error langsmith/evaluation/_runner.py:616: in _process_data for item in tqdm(results): ^^^^^^^^^^^^^ langsmith/evaluation/_runner.py:1591: in get_results for run, example, evaluation_results in zip( langsmith/evaluation/_runner.py:1571: in runs=(result["run"] for result in r2), ^^ langsmith/evaluation/_runner.py:1767: in _score yield context.run( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = evaluators = [, ] current_results = {'run': None, 'example': (id=489cbb88-fbb8-4dfc-82aa-33458a41f481, dataset_id=00886375-eb2a-4038-9032-efff60309896, link='None'), 'evaluation_results': {'results': []}} executor = def _run_evaluators( self, evaluators: Sequence[RunEvaluator], current_results: ExperimentResultRow, executor: cf.ThreadPoolExecutor, ) -> ExperimentResultRow: current_context = rh.get_tracing_context() metadata = { **(current_context["metadata"] or {}), **{ "experiment": self.experiment_name, "reference_example_id": current_results["example"].id, > "reference_run_id": current_results["run"].id, ^^^^^^^^^^^^^^^^^^^^^^^^^ }, } E AttributeError: 'NoneType' object has no attribute 'id' langsmith/evaluation/_runner.py:1671: AttributeError ----------------------------- Captured stdout call ----------------------------- View the evaluation results for experiment: 'left-limit-24' at: http://localhost/o/1496f777-b60d-4e7f-8cf6-76cf592a67d9/datasets/00886375-eb2a-4038-9032-efff60309896/compare?selectedSessions=5d95acdb-a8b3-4e6e-9333-c6b907e5323e ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: LangSmithError("Failed to GET /info in LangSmith API. 'NoneType' object is not subscriptable\n") WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ERROR langsmith.evaluation._runner:_runner.py:2006 Error running target function: uuid7() got an unexpected keyword argument 'timestamp' Traceback (most recent call last): File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py", line 1999, in _forward fn(*args, langsmith_extra=langsmith_extra) ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 754, in wrapper run_container = _setup_run( func, ...<3 lines>... kwargs=kwargs, ) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_helpers.py", line 1694, in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) File "/usr/lib/python3.14/site-packages/pydantic/main.py", line 263, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/run_trees.py", line 398, in infer_defaults values["id"] = uuid7_from_datetime(now) ~~~~~~~~~~~~~~~~~~~^^^^^ File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/uuid.py", line 36, in uuid7_from_datetime return _uuid7(nanoseconds) File "/build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_uuid.py", line 46, in uuid7 return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) TypeError: uuid7() got an unexpected keyword argument 'timestamp' _____________________ test_replacer_declared_in_traceable ______________________ def test_replacer_declared_in_traceable(): replacers = [ StringNodeRule(pattern=EMAIL_REGEX, replace="[email address]"), StringNodeRule(pattern=UUID_REGEX, replace="[uuid]"), ] anonymizer = create_anonymizer(replacers) mock_client = Client( session=MagicMock(), auto_batch_tracing=False, anonymizer=anonymizer, api_url="http://localhost:1984", api_key="123", ) user_email = "my-test@langchain.ai" user_id = "4ae21a90-d43b-4017-bb21-4fd9add235ff" class MyOutput(BaseModel): user_email: str user_id: uuid.UUID body: str class MyInput(BaseModel): from_email: str @traceable(client=mock_client) def my_func(body: str, from_: MyInput) -> MyOutput: return MyOutput(user_email=user_email, user_id=user_id, body=body) body_ = "Hello from Pluto" with tracing_context(enabled=True): > res = my_func(body_, from_=MyInput(from_email="my-from-test@langchain.ai")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_anonymizer.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413088062782976 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________________ test_secret_anonymizer_in_traceable ______________________ def test_secret_anonymizer_in_traceable(): anonymizer = create_secret_anonymizer() mock_client = Client( session=MagicMock(), auto_batch_tracing=False, anonymizer=anonymizer, api_url="http://localhost:1984", api_key="123", ) aws_key = "AKIA" + "IOSFODNN7EXAMPLE" anthropic_key = "sk-ant-api03-" + "A" * 30 @traceable(client=mock_client) def my_func(api_key: str) -> dict: return {"note": f"leaked {anthropic_key} here"} with tracing_context(enabled=True): > my_func(aws_key) tests/unit_tests/test_anonymizer.py:394: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413089325180160 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ test_run_tree_get_url_uses_v2_endpoint[instance_flags0] ____________ instance_flags = {'ch_query_enabled': False, 'sdb_query_enabled': True} @pytest.mark.parametrize( "instance_flags", [ {"ch_query_enabled": False, "sdb_query_enabled": True}, {"ch_query_enabled": True, "sdb_query_enabled": True}, ], ) def test_run_tree_get_url_uses_v2_endpoint(instance_flags) -> None: """On SmithDB-only and dual backends, RunTree.get_url() asks the backend. It must not emit a deprecation warning either — RunTree.get_url() is supported. """ client = Client(api_url="http://localhost:1984", api_key="123", session=mock.Mock()) project_id = uuid.uuid4() > run_tree = RunTree(name="stub", project_id=project_id, ls_client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_client.py:7551: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413133623766016 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: TypeError('Mock.keys() returned a non-iterable (type Mock)') WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ___________ test_run_tree_get_url_uses_v2_endpoint[instance_flags1] ____________ instance_flags = {'ch_query_enabled': True, 'sdb_query_enabled': True} @pytest.mark.parametrize( "instance_flags", [ {"ch_query_enabled": False, "sdb_query_enabled": True}, {"ch_query_enabled": True, "sdb_query_enabled": True}, ], ) def test_run_tree_get_url_uses_v2_endpoint(instance_flags) -> None: """On SmithDB-only and dual backends, RunTree.get_url() asks the backend. It must not emit a deprecation warning either — RunTree.get_url() is supported. """ client = Client(api_url="http://localhost:1984", api_key="123", session=mock.Mock()) project_id = uuid.uuid4() > run_tree = RunTree(name="stub", project_id=project_id, ls_client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_client.py:7551: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413134600152064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: TypeError('Mock.keys() returned a non-iterable (type Mock)') WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________ test_run_tree_get_url_builds_url_locally_on_clickhouse_only __________ def test_run_tree_get_url_builds_url_locally_on_clickhouse_only() -> None: """ClickHouse-only backends may predate `/runs/{run_id}/url`. Those deployments must keep getting a locally constructed URL rather than a 404. """ client = Client(api_url="http://localhost:1984", api_key="123", session=mock.Mock()) project_id = uuid.uuid4() tenant_id = uuid.uuid4() > run_tree = RunTree(name="stub", project_id=project_id, ls_client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_client.py:7586: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413135494223104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: TypeError('Mock.keys() returned a non-iterable (type Mock)') WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _______________________ test_run_tree_get_url_is_cached ________________________ def test_run_tree_get_url_is_cached() -> None: """get_url() is called per log line, so it must only hit the backend once.""" client = Client(api_url="http://localhost:1984", api_key="123", session=mock.Mock()) > run_tree = RunTree(name="stub", project_id=uuid.uuid4(), ls_client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_client.py:7613: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413136423512064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: TypeError('Mock.keys() returned a non-iterable (type Mock)') WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______ test_run_tree_get_url_falls_back_when_backend_call_fails[failure0] ______ failure = {'side_effect': ValueError('boom')} @pytest.mark.parametrize( "failure", [ {"side_effect": ValueError("boom")}, {"return_value": mock.Mock(url=None)}, ], ) def test_run_tree_get_url_falls_back_when_backend_call_fails(failure) -> None: """A transient failure must not turn get_url() into a raising call.""" client = Client(api_url="http://localhost:1984", api_key="123", session=mock.Mock()) project_id = uuid.uuid4() tenant_id = uuid.uuid4() > run_tree = RunTree(name="stub", project_id=project_id, ls_client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_client.py:7643: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413137365472000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: TypeError('Mock.keys() returned a non-iterable (type Mock)') WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______ test_run_tree_get_url_falls_back_when_backend_call_fails[failure1] ______ failure = {'return_value': } @pytest.mark.parametrize( "failure", [ {"side_effect": ValueError("boom")}, {"return_value": mock.Mock(url=None)}, ], ) def test_run_tree_get_url_falls_back_when_backend_call_fails(failure) -> None: """A transient failure must not turn get_url() into a raising call.""" client = Client(api_url="http://localhost:1984", api_key="123", session=mock.Mock()) project_id = uuid.uuid4() tenant_id = uuid.uuid4() > run_tree = RunTree(name="stub", project_id=project_id, ls_client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_client.py:7643: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413138262156032 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: TypeError('Mock.keys() returned a non-iterable (type Mock)') WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. __________ test_run_tree_get_url_without_session_uses_tracer_project ___________ def test_run_tree_get_url_without_session_uses_tracer_project() -> None: """A run with no project set must not look up `read_project(None)`.""" client = Client(api_url="http://localhost:1984", api_key="123", session=mock.Mock()) project_id = uuid.uuid4() > run_tree = RunTree(name="stub", ls_client=client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_client.py:7673: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413139161193984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:client.py:1907 Failed to get info from http://localhost:1984: TypeError('Mock.keys() returned a non-iterable (type Mock)') WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ____________ TestLangsmithRunsEndpoints.test_run_tree_with_replicas ____________ self = def test_run_tree_with_replicas(self): """Test RunTree.post() with replicas containing auth/api_url.""" client = Mock() # Create RunTree with replicas that have different endpoints replicas = [ WriteReplica( api_url="https://replica1.example.com", auth=ApiKeyAuth(api_key="replica_key1"), project_name="project1", ), WriteReplica( api_url="https://replica2.example.com", auth=ApiKeyAuth(api_key="replica_key2"), project_name="project2", ), ] > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="main-project", replicas=replicas, ) tests/unit_tests/test_multiple_endpoints.py:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413161478528000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________ TestRunTreeReplicas.test_run_tree_with_write_replicas _____________ self = def test_run_tree_with_write_replicas(self): """Test RunTree with WriteReplica format.""" client = Mock() > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="test-project", replicas=[ WriteReplica(project_name="replica-project", updates={"key": "value"}) ], ) tests/unit_tests/test_replica_endpoints.py:718: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413179129864960 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______ TestRunTreeReplicas.test_run_tree_with_authorization_and_cookie ________ self = def test_run_tree_with_authorization_and_cookie(self): client = Mock() replicas = [ WriteReplica( api_url="https://replica.example.com", auth=AuthHeaders( authorization="Bearer token-123", cookie="session=abc", ), project_name="replica-project", ) ] > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="test-project", replicas=replicas, ) tests/unit_tests/test_replica_endpoints.py:754: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413179412976128 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________ TestRunTreeReplicas.test_run_tree_with_new_replicas ______________ self = def test_run_tree_with_new_replicas(self): """Test RunTree with WriteReplica format.""" client = Mock() replicas = [ WriteReplica( api_url="https://replica1.example.com", auth=ApiKeyAuth(api_key="replica1-key"), project_name="replica1-project", primary=True, ), WriteReplica( api_url="https://replica2.example.com", auth=ApiKeyAuth(api_key="replica2-key"), project_name="replica2-project", ), ] > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="test-project", replicas=replicas, ) tests/unit_tests/test_replica_endpoints.py:787: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413179692076032 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________ TestRunTreeReplicas.test_run_tree_with_service_auth_replicas _________ self = def test_run_tree_with_service_auth_replicas(self): """Test RunTree with ServiceAuth replicas.""" client = Mock() replicas = [ WriteReplica( api_url="https://internal.example.com", auth=ServiceAuth(service_key="jwt-token-123", tenant_id="tenant-abc"), project_name="internal-project", ), ] > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="test-project", replicas=replicas, ) tests/unit_tests/test_replica_endpoints.py:822: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413179970985984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________ TestRunTreeReplicas.test_run_tree_patch_with_replicas _____________ self = def test_run_tree_patch_with_replicas(self): """Test RunTree patch method with replicas.""" client = Mock() replicas = [ WriteReplica( api_url="https://replica.example.com", auth=ApiKeyAuth(api_key="replica-key"), project_name="replica-project", updates={"extra_field": "extra_value"}, ) ] > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="test-project", replicas=replicas, ) tests/unit_tests/test_replica_endpoints.py:853: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413180260500992 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____ TestRunTreeReplicas.test_run_tree_preserves_env_replica_project_names _____ self = def test_run_tree_preserves_env_replica_project_names(self): client = Mock() env_var = json.dumps( [ { "api_url": "https://replica1.example.com", "api_key": "replica1-key", "project_name": "project-prod", }, { "api_url": "https://replica2.example.com", "api_key": "replica2-key", "project_name": "project-staging", }, ] ) with patch.dict(os.environ, {"LANGSMITH_RUNS_ENDPOINTS": env_var}, clear=True): _parse_write_replicas_from_env_var.cache_clear() ls_utils.get_env_var.cache_clear() > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="fallback-project", ) tests/unit_tests/test_replica_endpoints.py:892: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413180565184000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ TestBaggageReplicaParsing.test_run_tree_to_headers_does_not_propagate_replica_auth _ self = def test_run_tree_to_headers_does_not_propagate_replica_auth(self): """Replica auth should not be propagated via W3C baggage headers.""" from langsmith.run_trees import _Baggage client = Mock() > run_tree = RunTree( name="test_run", inputs={"input": "test"}, client=client, project_name="test-project", replicas=[ WriteReplica( api_url="https://replica.example.com", auth=ApiKeyAuth(api_key="replica-key"), project_name="replica-project", updates={"env": "test"}, ), WriteReplica( api_url="https://internal.example.com", auth=ServiceAuth( service_key="jwt-token-123", tenant_id="tenant-abc" ), project_name="internal-project", ), ], ) tests/unit_tests/test_replica_endpoints.py:1045: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413180922872064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ test_ancestor_id_derives_identically_from_parent_and_child __________ def test_ancestor_id_derives_identically_from_parent_and_child(): """`_remap_for_project` derives an ancestor's ID from the ancestor itself and again from every descendant. All of them must agree or the trace splits.""" client = _client() with warnings.catch_warnings(): warnings.simplefilter("ignore") parent = RunTree( name="parent", run_type="chain", id=uuid.uuid4(), inputs={}, ls_client=client, project_name="primary", replicas=[WriteReplica(project_name=SECONDARY)], ) > child = parent.create_child(name="child", run_type="chain", inputs={}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_replica_run_ids.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:662: in create_child run_id_ = uuid7_from_datetime(child_start_time) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413181415558144 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________________ test_traceable_iterator[None-True] ______________________ use_next = True, return_val = None mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("return_val", [None, "foo"]) def test_traceable_iterator( use_next: bool, return_val: Optional[str], mock_client: Client ) -> None: with tracing_context(enabled=True): @traceable(client=mock_client) def my_iterator_fn(a, b, d, **kwargs) -> Any: assert kwargs == {"e": 5} for i in range(a + b + d): yield i return return_val expected = [0, 1, 2, 3, 4, 5] if return_val is not None: expected.append(return_val) genout = my_iterator_fn(1, 2, 3, e=5) if use_next: results = [] while True: try: > results.append(next(genout)) ^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:274: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413181941598976 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_traceable_iterator[None-False] ______________________ use_next = False, return_val = None mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("return_val", [None, "foo"]) def test_traceable_iterator( use_next: bool, return_val: Optional[str], mock_client: Client ) -> None: with tracing_context(enabled=True): @traceable(client=mock_client) def my_iterator_fn(a, b, d, **kwargs) -> Any: assert kwargs == {"e": 5} for i in range(a + b + d): yield i return return_val expected = [0, 1, 2, 3, 4, 5] if return_val is not None: expected.append(return_val) genout = my_iterator_fn(1, 2, 3, e=5) if use_next: results = [] while True: try: results.append(next(genout)) except StopIteration as e: assert e.value == return_val if e.value is not None: results.append(e.value) break else: > results = list(genout) ^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:281: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413182714164992 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______________________ test_traceable_iterator[foo-True] _______________________ use_next = True, return_val = 'foo' mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("return_val", [None, "foo"]) def test_traceable_iterator( use_next: bool, return_val: Optional[str], mock_client: Client ) -> None: with tracing_context(enabled=True): @traceable(client=mock_client) def my_iterator_fn(a, b, d, **kwargs) -> Any: assert kwargs == {"e": 5} for i in range(a + b + d): yield i return return_val expected = [0, 1, 2, 3, 4, 5] if return_val is not None: expected.append(return_val) genout = my_iterator_fn(1, 2, 3, e=5) if use_next: results = [] while True: try: > results.append(next(genout)) ^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:274: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413183493679104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______________________ test_traceable_iterator[foo-False] ______________________ use_next = False, return_val = 'foo' mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("return_val", [None, "foo"]) def test_traceable_iterator( use_next: bool, return_val: Optional[str], mock_client: Client ) -> None: with tracing_context(enabled=True): @traceable(client=mock_client) def my_iterator_fn(a, b, d, **kwargs) -> Any: assert kwargs == {"e": 5} for i in range(a + b + d): yield i return return_val expected = [0, 1, 2, 3, 4, 5] if return_val is not None: expected.append(return_val) genout = my_iterator_fn(1, 2, 3, e=5) if use_next: results = [] while True: try: results.append(next(genout)) except StopIteration as e: assert e.value == return_val if e.value is not None: results.append(e.value) break else: > results = list(genout) ^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:281: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413184252758016 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______________________ test_traceable_stream[async0-True] ______________________ use_next = True, response_type = 'async' mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("response_type", ["async", "async"]) async def test_traceable_stream( use_next: bool, response_type: str, mock_client: Client ) -> None: def reduce_fn(results: list): return {"my_output": results} @traceable(client=mock_client, reduce_fn=reduce_fn) def my_stream_fn(a, b, d, **kwargs): assert kwargs == {"e": 5} vals = [0, 1, 2, 3, 4, 5] if response_type == "sync": return MyStreamObject(vals) else: return MyAsyncStreamObject(vals) with tracing_context(enabled=True): expected = [0, 1, 2, 3, 4, 5] > genout = my_stream_fn(1, 2, 3, e=5) ^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:346: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:853: in stream_wrapper trace_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413185035943936 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_traceable_stream[async0-False] ______________________ use_next = False, response_type = 'async' mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("response_type", ["async", "async"]) async def test_traceable_stream( use_next: bool, response_type: str, mock_client: Client ) -> None: def reduce_fn(results: list): return {"my_output": results} @traceable(client=mock_client, reduce_fn=reduce_fn) def my_stream_fn(a, b, d, **kwargs): assert kwargs == {"e": 5} vals = [0, 1, 2, 3, 4, 5] if response_type == "sync": return MyStreamObject(vals) else: return MyAsyncStreamObject(vals) with tracing_context(enabled=True): expected = [0, 1, 2, 3, 4, 5] > genout = my_stream_fn(1, 2, 3, e=5) ^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:346: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:853: in stream_wrapper trace_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413185808409856 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______________________ test_traceable_stream[async1-True] ______________________ use_next = True, response_type = 'async' mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("response_type", ["async", "async"]) async def test_traceable_stream( use_next: bool, response_type: str, mock_client: Client ) -> None: def reduce_fn(results: list): return {"my_output": results} @traceable(client=mock_client, reduce_fn=reduce_fn) def my_stream_fn(a, b, d, **kwargs): assert kwargs == {"e": 5} vals = [0, 1, 2, 3, 4, 5] if response_type == "sync": return MyStreamObject(vals) else: return MyAsyncStreamObject(vals) with tracing_context(enabled=True): expected = [0, 1, 2, 3, 4, 5] > genout = my_stream_fn(1, 2, 3, e=5) ^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:346: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:853: in stream_wrapper trace_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413187138977024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_traceable_stream[async1-False] ______________________ use_next = False, response_type = 'async' mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) @pytest.mark.parametrize("response_type", ["async", "async"]) async def test_traceable_stream( use_next: bool, response_type: str, mock_client: Client ) -> None: def reduce_fn(results: list): return {"my_output": results} @traceable(client=mock_client, reduce_fn=reduce_fn) def my_stream_fn(a, b, d, **kwargs): assert kwargs == {"e": 5} vals = [0, 1, 2, 3, 4, 5] if response_type == "sync": return MyStreamObject(vals) else: return MyAsyncStreamObject(vals) with tracing_context(enabled=True): expected = [0, 1, 2, 3, 4, 5] > genout = my_stream_fn(1, 2, 3, e=5) ^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:346: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:853: in stream_wrapper trace_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413187924519168 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_traceable_async_iterator[True] ______________________ use_next = True, mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) async def test_traceable_async_iterator(use_next: bool, mock_client: Client) -> None: with tracing_context(enabled=True): def filter_inputs(kwargs: dict): return {"a": "FOOOOOO", "b": kwargs["b"], "d": kwargs["d"]} @traceable(client=mock_client, process_inputs=filter_inputs) async def my_iterator_fn(a, b, d, **kwargs): assert kwargs == {"e": 5} for i in range(a + b + d): yield i expected = [0, 1, 2, 3, 4, 5] genout = my_iterator_fn(1, 2, 3, e=5) if use_next: results = [] > async for item in genout: tests/unit_tests/test_run_helpers.py:419: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413188706792192 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_traceable_async_iterator[False] _____________________ use_next = False mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.parametrize("use_next", [True, False]) async def test_traceable_async_iterator(use_next: bool, mock_client: Client) -> None: with tracing_context(enabled=True): def filter_inputs(kwargs: dict): return {"a": "FOOOOOO", "b": kwargs["b"], "d": kwargs["d"]} @traceable(client=mock_client, process_inputs=filter_inputs) async def my_iterator_fn(a, b, d, **kwargs): assert kwargs == {"e": 5} for i in range(a + b + d): yield i expected = [0, 1, 2, 3, 4, 5] genout = my_iterator_fn(1, 2, 3, e=5) if use_next: results = [] async for item in genout: results.append(item) else: > results = [item async for item in genout] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:422: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413189605799936 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ____________ test_traceable_stream_context_manager_returns_wrapper _____________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_stream_context_manager_returns_wrapper( mock_client: Client, ) -> None: with tracing_context(enabled=True): @traceable(client=mock_client, reduce_fn=lambda chunks: chunks) def my_stream_fn(): class SyncCtxStream: def __init__(self) -> None: self.entered = False self.exited = False def __enter__(self): self.entered = True return self def __exit__(self, exc_type, exc_val, exc_tb): self.exited = True def __iter__(self): return iter([]) stream = SyncCtxStream() return stream > stream = my_stream_fn() ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:481: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:853: in stream_wrapper trace_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413191853452800 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________ test_traceable_async_stream_context_manager_returns_wrapper __________ mock_client = Client (API URL: https://api.smith.langchain.com) @pytest.mark.asyncio async def test_traceable_async_stream_context_manager_returns_wrapper( mock_client: Client, ) -> None: with tracing_context(enabled=True): @traceable(client=mock_client, reduce_fn=lambda chunks: chunks) async def my_stream_fn(): class AsyncCtxStream: def __init__(self) -> None: self.entered = False self.exited = False self._done = False async def __aenter__(self): self.entered = True return self async def __aexit__(self, exc_type, exc_val, exc_tb): self.exited = True def __aiter__(self): return self async def __anext__(self): if self._done: raise StopAsyncIteration self._done = True return "chunk" stream = AsyncCtxStream() return stream > stream = await my_stream_fn() ^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:533: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:886: in async_stream_wrapper trace_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413194048899840 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________________________ test_traceable_project_name __________________________ def test_traceable_project_name() -> None: with tracing_context(enabled=True): mock_client_ = _get_mock_client() @traceable(client=mock_client_, project_name="my foo project") def my_function(a: int, b: int, d: int) -> int: return a + b + d > my_function(1, 2, 3) tests/unit_tests/test_run_helpers.py:684: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413195687033856 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________________ test_async_generator _____________________________ @pytest.mark.skipif( sys.version_info < (3, 11), reason="Skipping for Python 3.10 or earlier", ) async def test_async_generator(): @traceable def some_sync_func(query: str) -> list: return [query, query] @traceable async def some_async_func(queries: list) -> AsyncGenerator[list, None]: await asyncio.sleep(0.01) for query in queries: yield query @traceable async def another_async_func(query: str) -> str: rid = uuid.uuid4() with langsmith.trace( name="zee-cm", inputs={"query": query}, run_id=rid ) as run_tree: run_tree.end(outputs={"query": query}) assert run_tree.id == rid return query @traceable async def create_document_context(documents: list) -> str: await asyncio.sleep(0.01) return "\n".join(documents) @traceable async def summarize_answers( query: str, document_context: str ) -> AsyncGenerator[str, None]: await asyncio.sleep(0.01) for i in range(3): yield f"Answer {i}" @traceable(run_type="chain", name="expand_and_answer_questions") async def my_answer( query: str, ) -> AsyncGenerator[Any, None]: expanded_terms = some_sync_func(query=query) docs_gen = some_async_func( queries=expanded_terms, ) documents = [] async for document in docs_gen: documents.append(document) break await another_async_func(query=query) for document in documents: yield document async for document in docs_gen: documents.append(document) yield document document_context = await create_document_context( documents=documents, ) final_answer = summarize_answers(query=query, document_context=document_context) async for chunk in final_answer: yield chunk run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=True): chunks = my_answer( "some_query", langsmith_extra={"on_end": _get_run, "client": mock_client_} ) all_chunks = [] > async for chunk in chunks: tests/unit_tests/test_run_helpers.py:888: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413196743418880 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________________________ test_generator ________________________________ def test_generator(): @traceable def some_sync_func(query: str) -> list: return [query, query] @traceable def some_func(queries: list) -> Generator[list, None, None]: for query in queries: yield query @traceable def another_func(query: str) -> str: with langsmith.trace(name="zee-cm", inputs={"query": query}) as run_tree: run_tree.end(outputs={"query": query}) return query @traceable def create_document_context(documents: list) -> str: return "\n".join(documents) @traceable def summarize_answers( query: str, document_context: str ) -> Generator[str, None, None]: for i in range(3): yield f"Answer {i}" @traceable(run_type="chain", name="expand_and_answer_questions") def my_answer( query: str, ) -> Generator[Any, None, None]: expanded_terms = some_sync_func(query=query) docs_gen = some_func( queries=expanded_terms, ) documents = [] for document in docs_gen: documents.append(document) break another_func(query=query) for document in documents: yield document for document in docs_gen: documents.append(document) yield document document_context = create_document_context( documents=documents, ) final_answer = summarize_answers(query=query, document_context=document_context) for chunk in final_answer: yield chunk run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=True): chunks = my_answer( "some_query", langsmith_extra={ "name": "test_overridding_name", "on_end": _get_run, "client": mock_client_, }, ) all_chunks = [] > for chunk in chunks: ^^^^^^ tests/unit_tests/test_run_helpers.py:977: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413197610614016 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________________________ test_traceable_regular[True] _________________________ enabled = True @pytest.mark.parametrize("enabled", [True, "local"]) def test_traceable_regular(enabled: Union[bool, Literal["local"]]): @traceable def some_sync_func(query: str, **kwargs: Any) -> list: assert kwargs == {"a": 1, "b": 2} return [query, query] @traceable def some_func(queries: list) -> list: return queries @traceable def another_func(query: str) -> str: with langsmith.trace(name="zee-cm", inputs={"query": query}) as run_tree: run_tree.end(outputs={"query": query}) return query @traceable def create_document_context(documents: list) -> str: return "\n".join(documents) @traceable def summarize_answers(query: str, document_context: str) -> list: return [f"Answer {i}" for i in range(3)] @traceable(run_type="chain", name="expand_and_answer_questions") def my_answer( query: str, ) -> list: expanded_terms = some_sync_func(query=query, a=1, b=2) documents = some_func( queries=expanded_terms, ) another_func(query=query) document_context = create_document_context( documents=documents, ) final_answer = summarize_answers(query=query, document_context=document_context) return documents + final_answer run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > all_chunks = my_answer( "some_query", langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1043: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413198386123776 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________________ test_traceable_regular[local] _________________________ enabled = 'local' @pytest.mark.parametrize("enabled", [True, "local"]) def test_traceable_regular(enabled: Union[bool, Literal["local"]]): @traceable def some_sync_func(query: str, **kwargs: Any) -> list: assert kwargs == {"a": 1, "b": 2} return [query, query] @traceable def some_func(queries: list) -> list: return queries @traceable def another_func(query: str) -> str: with langsmith.trace(name="zee-cm", inputs={"query": query}) as run_tree: run_tree.end(outputs={"query": query}) return query @traceable def create_document_context(documents: list) -> str: return "\n".join(documents) @traceable def summarize_answers(query: str, document_context: str) -> list: return [f"Answer {i}" for i in range(3)] @traceable(run_type="chain", name="expand_and_answer_questions") def my_answer( query: str, ) -> list: expanded_terms = some_sync_func(query=query, a=1, b=2) documents = some_func( queries=expanded_terms, ) another_func(query=query) document_context = create_document_context( documents=documents, ) final_answer = summarize_answers(query=query, document_context=document_context) return documents + final_answer run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > all_chunks = my_answer( "some_query", langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1043: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413199195283968 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. __________________________ test_traceable_async[True] __________________________ enabled = True @pytest.mark.parametrize("enabled", [True, "local"]) async def test_traceable_async(enabled: Union[bool, Literal["local"]]): @traceable def some_sync_func(query: str) -> list: return [query, query] @traceable async def some_async_func(queries: list, *, required: str, **kwargs: Any) -> list: assert required == "foo" assert kwargs == {"a": 1, "b": 2} await asyncio.sleep(0.01) return queries @traceable async def another_async_func(query: str) -> str: with langsmith.trace(name="zee-cm", inputs={"query": query}) as run_tree: run_tree.end(outputs={"query": query}) return query @traceable async def create_document_context(documents: list) -> str: await asyncio.sleep(0.01) return "\n".join(documents) @traceable async def summarize_answers(query: str, document_context: str) -> list: await asyncio.sleep(0.01) return [f"Answer {i}" for i in range(3)] @traceable(run_type="chain", name="expand_and_answer_questions") async def my_answer( query: str, ) -> list: expanded_terms = some_sync_func(query=query) documents = await some_async_func( queries=expanded_terms, required="foo", a=1, b=2 ) await another_async_func(query=query) document_context = await create_document_context( documents=documents, ) final_answer = await summarize_answers( query=query, document_context=document_context ) return documents + final_answer run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > all_chunks = await my_answer( "some_query", langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413199969296896 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________________________ test_traceable_async[local] __________________________ enabled = 'local' @pytest.mark.parametrize("enabled", [True, "local"]) async def test_traceable_async(enabled: Union[bool, Literal["local"]]): @traceable def some_sync_func(query: str) -> list: return [query, query] @traceable async def some_async_func(queries: list, *, required: str, **kwargs: Any) -> list: assert required == "foo" assert kwargs == {"a": 1, "b": 2} await asyncio.sleep(0.01) return queries @traceable async def another_async_func(query: str) -> str: with langsmith.trace(name="zee-cm", inputs={"query": query}) as run_tree: run_tree.end(outputs={"query": query}) return query @traceable async def create_document_context(documents: list) -> str: await asyncio.sleep(0.01) return "\n".join(documents) @traceable async def summarize_answers(query: str, document_context: str) -> list: await asyncio.sleep(0.01) return [f"Answer {i}" for i in range(3)] @traceable(run_type="chain", name="expand_and_answer_questions") async def my_answer( query: str, ) -> list: expanded_terms = some_sync_func(query=query) documents = await some_async_func( queries=expanded_terms, required="foo", a=1, b=2 ) await another_async_func(query=query) document_context = await create_document_context( documents=documents, ) final_answer = await summarize_answers( query=query, document_context=document_context ) return documents + final_answer run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > all_chunks = await my_answer( "some_query", langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413200837192960 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________________ test_traceable_to_trace[True] _________________________ enabled = True @pytest.mark.parametrize("enabled", [True, "local"]) def test_traceable_to_trace(enabled: Union[bool, Literal["local"]]): @traceable def parent_fn(a: int, b: int) -> int: with langsmith.trace(name="child_fn", inputs={"a": a, "b": b}) as run_tree: result = a + b run_tree.end(outputs={"result": result}) return result run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > result = parent_fn( 1, 2, langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413201699727104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________________ test_traceable_to_trace[local] ________________________ enabled = 'local' @pytest.mark.parametrize("enabled", [True, "local"]) def test_traceable_to_trace(enabled: Union[bool, Literal["local"]]): @traceable def parent_fn(a: int, b: int) -> int: with langsmith.trace(name="child_fn", inputs={"a": a, "b": b}) as run_tree: result = a + b run_tree.end(outputs={"result": result}) return result run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > result = parent_fn( 1, 2, langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413202489967104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________________ test_traceable_to_atrace[True] ________________________ enabled = True @pytest.mark.parametrize("enabled", [True, "local"]) async def test_traceable_to_atrace(enabled: Union[bool, Literal["local"]]): @traceable async def great_grandchild_fn(a: int, b: int) -> int: return a + b @traceable async def parent_fn(a: int, b: int) -> int: async with langsmith.trace( name="child_fn", inputs={"a": a, "b": b} ) as run_tree: async with langsmith.trace( "grandchild_fn", inputs={"a": a, "b": b, "c": "oh my"} ) as run_tree_gc: try: async with langsmith.trace("expect_error", inputs={}): raise ValueError("oh no") except ValueError: pass result = await great_grandchild_fn(a, b) run_tree_gc.end(outputs={"result": result}) run_tree.end(outputs={"result": result}) return result run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > result = await parent_fn( 1, 2, langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1195: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413203273745152 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _______________________ test_traceable_to_atrace[local] ________________________ enabled = 'local' @pytest.mark.parametrize("enabled", [True, "local"]) async def test_traceable_to_atrace(enabled: Union[bool, Literal["local"]]): @traceable async def great_grandchild_fn(a: int, b: int) -> int: return a + b @traceable async def parent_fn(a: int, b: int) -> int: async with langsmith.trace( name="child_fn", inputs={"a": a, "b": b} ) as run_tree: async with langsmith.trace( "grandchild_fn", inputs={"a": a, "b": b, "c": "oh my"} ) as run_tree_gc: try: async with langsmith.trace("expect_error", inputs={}): raise ValueError("oh no") except ValueError: pass result = await great_grandchild_fn(a, b) run_tree_gc.end(outputs={"result": result}) run_tree.end(outputs={"result": result}) return result run: Optional[RunTree] = None # type: ignore def _get_run(r: RunTree) -> None: nonlocal run run = r mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): > result = await parent_fn( 1, 2, langsmith_extra={"on_end": _get_run, "client": mock_client_} ) tests/unit_tests/test_run_helpers.py:1195: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413204841062144 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________________ test_trace_to_traceable[True] _________________________ enabled = True @pytest.mark.parametrize("enabled", [True, "local"]) def test_trace_to_traceable(enabled: Union[bool, Literal["local"]]): @traceable def child_fn(a: int, b: int) -> int: return a + b mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): rid = uuid.uuid4() with langsmith.trace( name="parent_fn", inputs={"a": 1, "b": 2}, client=mock_client_, run_id=rid ) as run: > result = child_fn(1, 2) ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1221: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1665: in _setup_run new_run = parent_run_.create_child( langsmith/run_trees.py:662: in create_child run_id_ = uuid7_from_datetime(child_start_time) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413205714874880 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________________ test_trace_to_traceable[local] ________________________ enabled = 'local' @pytest.mark.parametrize("enabled", [True, "local"]) def test_trace_to_traceable(enabled: Union[bool, Literal["local"]]): @traceable def child_fn(a: int, b: int) -> int: return a + b mock_client_ = _get_mock_client() with tracing_context(enabled=enabled): rid = uuid.uuid4() with langsmith.trace( name="parent_fn", inputs={"a": 1, "b": 2}, client=mock_client_, run_id=rid ) as run: > result = child_fn(1, 2) ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1221: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1665: in _setup_run new_run = parent_run_.create_child( langsmith/run_trees.py:662: in create_child run_id_ = uuid7_from_datetime(child_start_time) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413206566804992 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________________ test_client_not_passed_when_traceable_parent _________________ def test_client_not_passed_when_traceable_parent(): mock_client = _get_mock_client() > rt = RunTree(name="foo", client=mock_client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413207356645120 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_client_passed_when_trace_parent _____________________ def test_client_passed_when_trace_parent(): mock_client = _get_mock_client() > rt = RunTree(name="foo", client=mock_client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1247: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413207863447040 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. __________________ test_client_not_called_when_enabled_local ___________________ def test_client_not_called_when_enabled_local(): mock_client = _get_mock_client() > headers = RunTree(name="foo", client=mock_client).to_headers() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1267: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413208361133056 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. __________________________ test_from_runnable_config ___________________________ def test_from_runnable_config(): try: from langchain_core.tools import tool # type: ignore from langchain_core.tracers.langchain import LangChainTracer # type: ignore except ImportError: pytest.skip("Skipping test that requires langchain") gc_run_id = uuid.uuid4() @tool def my_grandchild_tool(text: str, callbacks: Any = None) -> str: """Foo.""" lct: LangChainTracer = callbacks.handlers[0] assert str(gc_run_id) in lct.run_map run = lct.run_map[str(gc_run_id)] assert run.name == "my_grandchild_tool" assert run.run_type == "tool" assert lct.project_name == "foo" parent_run = lct.run_map[str(run.parent_run_id)] assert parent_run assert parent_run.name == "my_traceable" assert parent_run.run_type == "retriever" grandparent_run = lct.run_map[str(parent_run.parent_run_id)] assert grandparent_run assert grandparent_run.name == "my_tool" assert grandparent_run.run_type == "tool" return text @traceable(run_type="retriever") def my_traceable(text: str) -> str: rt = get_current_run_tree() assert rt assert rt.run_type == "retriever" assert rt.parent_run_id assert rt.parent_dotted_order assert rt.session_name == "foo" return my_grandchild_tool.invoke({"text": text}, {"run_id": gc_run_id}) @tool def my_tool(text: str) -> str: """Foo.""" return my_traceable(text) mock_client = _get_mock_client() tracer = LangChainTracer(client=mock_client, project_name="foo") > my_tool.invoke({"text": "hello"}, {"callbacks": [tracer]}) tests/unit_tests/test_run_helpers.py:1322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/langchain_core/tools/base.py:764: in invoke return self.run(tool_input, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/langchain_core/tools/base.py:1132: in run raise error_to_raise /usr/lib/python3.14/site-packages/langchain_core/tools/base.py:1098: in run response = context.run(self._run, *tool_args, **tool_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/langchain_core/tools/structured.py:152: in _run return self.func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1318: in my_tool return my_traceable(text) ^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1665: in _setup_run new_run = parent_run_.create_child( langsmith/run_trees.py:662: in create_child run_id_ = uuid7_from_datetime(child_start_time) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413208967040000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _______________________ test_trace_nested_enable_disable _______________________ def test_trace_nested_enable_disable(): # Test that you can disable then re-enable tracing # and the trace connects as expected mock_client = _get_mock_client() with tracing_context(enabled=True): with trace(name="foo", inputs={"a": 1}, client=mock_client) as run: with tracing_context(enabled=False): with trace(name="bar", inputs={"b": 2}, client=mock_client) as run2: with tracing_context(enabled=True): > with trace( name="baz", inputs={"c": 3}, client=mock_client ) as run3: tests/unit_tests/test_run_helpers.py:1435: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:1204: in __enter__ return self._setup() ^^^^^^^^^^^^^ langsmith/run_helpers.py:1126: in _setup self.new_run = parent_run_.create_child( langsmith/run_trees.py:662: in create_child run_id_ = uuid7_from_datetime(child_start_time) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413213719044864 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_traceable_async_exception[True] _____________________ auto_batch_tracing = True @pytest.mark.parametrize("auto_batch_tracing", [True, False]) async def test_traceable_async_exception(auto_batch_tracing: bool): mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) @traceable async def my_function(a: int) -> int: raise ValueError("foo") with tracing_context(enabled=True): with pytest.raises(ValueError, match="foo"): > await my_function(1, langsmith_extra={"client": mock_client}) tests/unit_tests/test_run_helpers.py:1497: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413215621248000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ____________________ test_traceable_async_exception[False] _____________________ auto_batch_tracing = False @pytest.mark.parametrize("auto_batch_tracing", [True, False]) async def test_traceable_async_exception(auto_batch_tracing: bool): mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) @traceable async def my_function(a: int) -> int: raise ValueError("foo") with tracing_context(enabled=True): with pytest.raises(ValueError, match="foo"): > await my_function(1, langsmith_extra={"client": mock_client}) tests/unit_tests/test_run_helpers.py:1497: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413216496331008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________________ test_traceable_async_gen_exception[True] ___________________ auto_batch_tracing = True @pytest.mark.parametrize("auto_batch_tracing", [True, False]) async def test_traceable_async_gen_exception(auto_batch_tracing: bool): ls_utils.get_env_var.cache_clear() mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) @traceable async def my_function(a: int) -> AsyncGenerator[int, None]: for i in range(5): yield i raise ValueError("foo") with tracing_context(enabled=True): with pytest.raises(ValueError, match="foo"): > async for _ in my_function(1, langsmith_extra={"client": mock_client}): tests/unit_tests/test_run_helpers.py:1531: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413217440004096 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. __________________ test_traceable_async_gen_exception[False] ___________________ auto_batch_tracing = False @pytest.mark.parametrize("auto_batch_tracing", [True, False]) async def test_traceable_async_gen_exception(auto_batch_tracing: bool): ls_utils.get_env_var.cache_clear() mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) @traceable async def my_function(a: int) -> AsyncGenerator[int, None]: for i in range(5): yield i raise ValueError("foo") with tracing_context(enabled=True): with pytest.raises(ValueError, match="foo"): > async for _ in my_function(1, langsmith_extra={"client": mock_client}): tests/unit_tests/test_run_helpers.py:1531: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413218312338944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________________ test_traceable_gen_exception[True] ______________________ auto_batch_tracing = True @pytest.mark.parametrize("auto_batch_tracing", [True, False]) async def test_traceable_gen_exception(auto_batch_tracing: bool): ls_utils.get_env_var.cache_clear() mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) @traceable def my_function(a: int) -> Generator[int, None, None]: for i in range(5): yield i raise ValueError("foo") with tracing_context(enabled=True): with pytest.raises(ValueError, match="foo"): > for _ in my_function(1, langsmith_extra={"client": mock_client}): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1572: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413219187131904 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________________ test_traceable_gen_exception[False] ______________________ auto_batch_tracing = False @pytest.mark.parametrize("auto_batch_tracing", [True, False]) async def test_traceable_gen_exception(auto_batch_tracing: bool): ls_utils.get_env_var.cache_clear() mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) @traceable def my_function(a: int) -> Generator[int, None, None]: for i in range(5): yield i raise ValueError("foo") with tracing_context(enabled=True): with pytest.raises(ValueError, match="foo"): > for _ in my_function(1, langsmith_extra={"client": mock_client}): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1572: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413220017716992 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________________ test_process_inputs_outputs __________________________ async def test_process_inputs_outputs(): mock_client = _get_mock_client() in_s = "what's life's meaning" def process_inputs(inputs: dict) -> dict: assert inputs == {"val": in_s, "ooblek": "nada"} inputs["val2"] = "this is mutated" return {"serialized_in": "what's the meaning of life?"} def process_outputs(outputs: int) -> dict: assert outputs == 42 return {"serialized_out": 24} @traceable(process_inputs=process_inputs, process_outputs=process_outputs) def my_function(val: str, **kwargs: Any) -> int: assert not kwargs.get("val2") return 42 with tracing_context(enabled=True): > my_function( in_s, ooblek="nada", langsmith_extra={"client": mock_client}, ) tests/unit_tests/test_run_helpers.py:1633: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413224488353024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _______________________ test_traceable_input_attachments _______________________ @pytest.mark.flaky(retries=3) def test_traceable_input_attachments(): with patch.object(ls_client.ls_env, "get_runtime_environment") as mock_get_env: mock_get_env.return_value = { "LANGSMITH_test_traceable_input_attachments": "aval" } @traceable def my_func( val: int, att1: ls_schemas.Attachment, att2: Annotated[tuple, ls_schemas.Attachment], run_tree: RunTree, ): run_tree.attachments["anoutput"] = ls_schemas.Attachment( mime_type="text/plain", data=b"noidea" ) return "foo" mock_client = _get_mock_client( info=ls_schemas.LangSmithInfo( instance_flags={ "zstd_compression_enabled": False, }, batch_ingest_config=ls_schemas.BatchIngestConfig( use_multipart_endpoint=True, size_limit_bytes=None, # Note this field is not used here size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ), ), ) long_content = b"c" * 20_000_000 with tracing_context(enabled=True): > result = my_func( 42, ls_schemas.Attachment(mime_type="text/plain", data=long_content), ("application/octet-stream", "content2"), langsmith_extra={"client": mock_client}, ) tests/unit_tests/test_run_helpers.py:1784: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413231029281024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ____________________ test_traceable_iterator_process_chunk _____________________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_iterator_process_chunk(mock_client: Client) -> None: with tracing_context(enabled=True): @traceable(client=mock_client, process_chunk=lambda x: x["val"]) def my_iterator_fn(a, b, d, **kwargs) -> Any: assert kwargs == {"e": 5} for i in range(a + b + d): yield {"val": i, "squared": i**2} expected = [{"val": x, "squared": x**2} for x in range(6)] genout = my_iterator_fn(1, 2, 3, e=5) > results = list(genout) ^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413232562885888 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________________________ test_first_token_event_only __________________________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_first_token_event_only(mock_client: Client) -> None: collected_run: Optional[RunTree] = None def on_end(run: RunTree) -> None: nonlocal collected_run collected_run = run with tracing_context(enabled=True): @traceable(client=mock_client, run_type="llm") def token_stream() -> Generator[str, None, None]: for t in ["a", "b", "c"]: yield t > list(token_stream(langsmith_extra={"on_end": on_end})) tests/unit_tests/test_run_helpers.py:1954: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413233364619008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________________ test_traceable_async_iterator_process_chunk __________________ mock_client = Client (API URL: https://api.smith.langchain.com) async def test_traceable_async_iterator_process_chunk(mock_client: Client) -> None: with tracing_context(enabled=True): @traceable(client=mock_client, process_chunk=lambda x: x["val"]) async def my_iterator_fn(a, b, d, **kwargs) -> Any: assert kwargs == {"e": 5} for i in range(a + b + d): yield {"val": i, "squared": i**2} expected = [{"val": x, "squared": x**2} for x in range(6)] genout = my_iterator_fn(1, 2, 3, e=5) > results = [x async for x in genout] ^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1972: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413234160774912 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________ test_set_run_metadata_updates_current_run_tree ________________ def test_set_run_metadata_updates_current_run_tree() -> None: with tracing_context(enabled=True): @traceable def instrumented() -> RunTree: langsmith.set_run_metadata(foo=1) langsmith.set_run_metadata(bar="two") rt = get_current_run_tree() assert rt is not None return rt > run_tree = instrumented() ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:1997: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413235077917184 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________________ test_traceable_enabled_true_overrides_context _________________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_enabled_true_overrides_context(mock_client: Client) -> None: """Verify that enabled=True on decorator forces tracing. Even with tracing_context(enabled=False). """ @traceable(client=mock_client, enabled=True) def my_function(a: int) -> int: return a * 2 with tracing_context(enabled=False): > result = my_function(5) ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2045: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413236949056000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________ test_traceable_enabled_none_respects_context_enabled _____________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_enabled_none_respects_context_enabled(mock_client: Client) -> None: """Verify that enabled=None (default) follows tracing_context when enabled.""" @traceable(client=mock_client) # enabled defaults to None def my_function(a: int) -> int: return a * 2 with tracing_context(enabled=True): > result = my_function(5) ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2060: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413237752182016 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____________ test_traceable_async_enabled_true_overrides_context ______________ mock_client = Client (API URL: https://api.smith.langchain.com) async def test_traceable_async_enabled_true_overrides_context( mock_client: Client, ) -> None: """Verify that enabled=True forces tracing for async functions. Even when context is disabled. """ @traceable(client=mock_client, enabled=True) async def my_async_function(a: int) -> int: return a * 2 with tracing_context(enabled=False): > result = await my_async_function(5) ^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413240752248064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. __________________ test_traceable_enabled_does_not_propagate ___________________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_enabled_does_not_propagate(mock_client: Client) -> None: """Test that enabled setting applies only to its function, not nested calls.""" @traceable(client=mock_client, enabled=False) def outer_function(a: int) -> int: return inner_function(a) @traceable(client=mock_client, enabled=True) def inner_function(a: int) -> int: return a * 2 with tracing_context(enabled=True): > result = outer_function(5) ^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2206: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/test_run_helpers.py:2199: in outer_function return inner_function(a) ^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413243756431104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______________ test_traceable_nested_outer_enabled_inner_disabled ______________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_nested_outer_enabled_inner_disabled(mock_client: Client) -> None: """Test nested functions where outer is enabled and inner is disabled.""" @traceable(client=mock_client, enabled=True) def outer_function(a: int) -> int: return inner_function(a) @traceable(client=mock_client, enabled=False) def inner_function(a: int) -> int: return a * 2 with tracing_context(enabled=True): > result = outer_function(5) ^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413244757303040 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________ test_traceable_disabled_clears_parent_context _________________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_disabled_clears_parent_context(mock_client: Client) -> None: """Test that when enabled=False, the parent RunTree context is cleared. This ensures that a nested @traceable with enabled=False doesn't incorrectly inherit the parent's RunTree, which would cause incorrect nesting. """ @traceable(client=mock_client, enabled=True) def outer_function(a: int) -> int: # At this point, get_current_run_tree() should return outer's run outer_run = get_current_run_tree() assert outer_run is not None assert outer_run.name == "outer_function" result = inner_disabled(a) # After inner_disabled returns, we should still have outer's run outer_run_after = get_current_run_tree() assert outer_run_after is not None assert outer_run_after.name == "outer_function" return result @traceable(client=mock_client, enabled=False) def inner_disabled(a: int) -> int: # Since enabled=False, get_current_run_tree() should return None # (the parent context was cleared, not inherited) inner_run = get_current_run_tree() assert inner_run is None, ( "Expected None when enabled=False, but got a RunTree. " "Parent context should be cleared, not inherited." ) return a * 2 with tracing_context(enabled=True): > result = outer_function(5) ^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2273: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413245554505984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________ test_traceable_enabled_matrix[None-True-True] _________________ decorator_enabled = None, context_enabled = True, should_trace = True @pytest.mark.parametrize( "decorator_enabled,context_enabled,should_trace", [ (None, True, True), # None follows context (None, False, False), # None follows context (True, True, True), # True forces on (True, False, True), # True forces on (override context) (False, True, False), # False forces off (override context) (False, False, False), # False forces off ], ) def test_traceable_enabled_matrix( decorator_enabled: Optional[bool], context_enabled: bool, should_trace: bool, ) -> None: """Test all combinations of decorator enabled and context enabled.""" mock_client = _get_mock_client() if decorator_enabled is None: @traceable(client=mock_client) def my_function(a: int) -> int: return a * 2 else: @traceable(client=mock_client, enabled=decorator_enabled) def my_function(a: int) -> int: return a * 2 with tracing_context(enabled=context_enabled): > result = my_function(5) ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413246362904064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________ test_traceable_enabled_matrix[True-True-True] _________________ decorator_enabled = True, context_enabled = True, should_trace = True @pytest.mark.parametrize( "decorator_enabled,context_enabled,should_trace", [ (None, True, True), # None follows context (None, False, False), # None follows context (True, True, True), # True forces on (True, False, True), # True forces on (override context) (False, True, False), # False forces off (override context) (False, False, False), # False forces off ], ) def test_traceable_enabled_matrix( decorator_enabled: Optional[bool], context_enabled: bool, should_trace: bool, ) -> None: """Test all combinations of decorator enabled and context enabled.""" mock_client = _get_mock_client() if decorator_enabled is None: @traceable(client=mock_client) def my_function(a: int) -> int: return a * 2 else: @traceable(client=mock_client, enabled=decorator_enabled) def my_function(a: int) -> int: return a * 2 with tracing_context(enabled=context_enabled): > result = my_function(5) ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413248238311168 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________________ test_traceable_enabled_matrix[True-False-True] ________________ decorator_enabled = True, context_enabled = False, should_trace = True @pytest.mark.parametrize( "decorator_enabled,context_enabled,should_trace", [ (None, True, True), # None follows context (None, False, False), # None follows context (True, True, True), # True forces on (True, False, True), # True forces on (override context) (False, True, False), # False forces off (override context) (False, False, False), # False forces off ], ) def test_traceable_enabled_matrix( decorator_enabled: Optional[bool], context_enabled: bool, should_trace: bool, ) -> None: """Test all combinations of decorator enabled and context enabled.""" mock_client = _get_mock_client() if decorator_enabled is None: @traceable(client=mock_client) def my_function(a: int) -> int: return a * 2 else: @traceable(client=mock_client, enabled=decorator_enabled) def my_function(a: int) -> int: return a * 2 with tracing_context(enabled=context_enabled): > result = my_function(5) ^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413249078504960 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _______________________ test_traceable_triple_decorated ________________________ mock_client = Client (API URL: https://api.smith.langchain.com) def test_traceable_triple_decorated(mock_client: Client) -> None: """Test that other decorators don't affect tracing.""" def some_decorator(func): @functools.wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper def some_other_decorator(func): @functools.wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper @some_decorator def original_function(a: int) -> str: return f"foo {a}" wrapped_function = some_other_decorator( (traceable(client=mock_client, enabled=True)((original_function))) ) > result = wrapped_function(5) ^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2351: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/test_run_helpers.py:2339: in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413251983216896 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______ TestTraceableExceptionsToHandle.test_handled_exceptions[sync-True] ______ self = auto_batch_tracing = True, func_type = 'sync' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): asyncio.run(execute()) else: > execute() tests/unit_tests/test_run_helpers.py:2437: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/test_run_helpers.py:2397: in execute f(langsmith_extra={"client": mock_client}) langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413252960742912 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____ TestTraceableExceptionsToHandle.test_handled_exceptions[sync-False] ______ self = auto_batch_tracing = False, func_type = 'sync' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): asyncio.run(execute()) else: > execute() tests/unit_tests/test_run_helpers.py:2437: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/test_run_helpers.py:2397: in execute f(langsmith_extra={"client": mock_client}) langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413253961199104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____ TestTraceableExceptionsToHandle.test_handled_exceptions[async-True] ______ self = auto_batch_tracing = True, func_type = 'async' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): > asyncio.run(execute()) tests/unit_tests/test_run_helpers.py:2435: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/asyncio/runners.py:205: in run return runner.run(main) ^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/runners.py:128: in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/base_events.py:720: in run_until_complete return future.result() ^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2406: in execute await f(langsmith_extra={"client": mock_client}) langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413254908634880 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _____ TestTraceableExceptionsToHandle.test_handled_exceptions[async-False] _____ self = auto_batch_tracing = False, func_type = 'async' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): > asyncio.run(execute()) tests/unit_tests/test_run_helpers.py:2435: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/asyncio/runners.py:205: in run return runner.run(main) ^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/runners.py:128: in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/base_events.py:720: in run_until_complete return future.result() ^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2406: in execute await f(langsmith_extra={"client": mock_client}) langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413256177195008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___ TestTraceableExceptionsToHandle.test_handled_exceptions[generator-True] ____ self = auto_batch_tracing = True, func_type = 'generator' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): asyncio.run(execute()) else: > execute() tests/unit_tests/test_run_helpers.py:2437: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/test_run_helpers.py:2417: in execute for _ in f(langsmith_extra={"client": mock_client}): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413257456132864 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ___ TestTraceableExceptionsToHandle.test_handled_exceptions[generator-False] ___ self = auto_batch_tracing = False, func_type = 'generator' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): asyncio.run(execute()) else: > execute() tests/unit_tests/test_run_helpers.py:2437: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/test_run_helpers.py:2417: in execute for _ in f(langsmith_extra={"client": mock_client}): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:797: in generator_wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413258423593984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ TestTraceableExceptionsToHandle.test_handled_exceptions[async_generator-True] _ self = auto_batch_tracing = True, func_type = 'async_generator' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): > asyncio.run(execute()) tests/unit_tests/test_run_helpers.py:2435: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/asyncio/runners.py:205: in run return runner.run(main) ^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/runners.py:128: in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/base_events.py:720: in run_until_complete return future.result() ^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2429: in execute async for _ in f(langsmith_extra={"client": mock_client}): langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413259367410944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _ TestTraceableExceptionsToHandle.test_handled_exceptions[async_generator-False] _ self = auto_batch_tracing = False, func_type = 'async_generator' @pytest.mark.parametrize("auto_batch_tracing", [True, False]) @pytest.mark.parametrize( "func_type", ["sync", "async", "generator", "async_generator"] ) def test_handled_exceptions(self, auto_batch_tracing: bool, func_type: str): """exceptions_to_handle should suppress tracebacks for specified exceptions.""" mock_client = _get_mock_client( auto_batch_tracing=auto_batch_tracing, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) if func_type == "sync": @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise ValueError("handled exception") def execute(): f(langsmith_extra={"client": mock_client}) elif func_type == "async": @traceable(exceptions_to_handle=(ValueError,)) async def f() -> int: raise ValueError("handled exception") async def execute(): await f(langsmith_extra={"client": mock_client}) elif func_type == "generator": @traceable(exceptions_to_handle=(ValueError,)) def f(): for i in range(3): yield i raise ValueError("handled exception") def execute(): for _ in f(langsmith_extra={"client": mock_client}): pass else: # async_generator @traceable(exceptions_to_handle=(ValueError,)) async def f(): for i in range(3): yield i raise ValueError("handled exception") async def execute(): async for _ in f(langsmith_extra={"client": mock_client}): pass with tracing_context(enabled=True): with pytest.raises(ValueError, match="handled exception"): if func_type in ("async", "async_generator"): > asyncio.run(execute()) tests/unit_tests/test_run_helpers.py:2435: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/asyncio/runners.py:205: in run return runner.run(main) ^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/runners.py:128: in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/asyncio/base_events.py:720: in run_until_complete return future.result() ^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2429: in execute async for _ in f(langsmith_extra={"client": mock_client}): langsmith/run_helpers.py:676: in async_generator_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413260660908032 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ TestTraceableExceptionsToHandle.test_unhandled_exceptions ___________ self = def test_unhandled_exceptions(self): """Test that unhandled exceptions still log tracebacks.""" mock_client = _get_mock_client( auto_batch_tracing=True, info=ls_schemas.LangSmithInfo( batch_ingest_config=ls_schemas.BatchIngestConfig( size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ) ), ) @traceable(exceptions_to_handle=(ValueError,)) def f() -> int: raise TypeError("unhandled exception") with tracing_context(enabled=True): > with pytest.raises(TypeError, match="unhandled exception"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AssertionError: Regex pattern did not match. E Expected regex: 'unhandled exception' E Actual message: "uuid7() got an unexpected keyword argument 'timestamp'" tests/unit_tests/test_run_helpers.py:2470: AssertionError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ________ TestTraceableExceptionsToHandle.test_multiple_exception_types _________ self = mock_client = Client (API URL: https://api.smith.langchain.com) def test_multiple_exception_types(self, mock_client: Client): """Test that multiple exception types can be handled.""" @traceable(exceptions_to_handle=(ValueError, TypeError, KeyError)) def f(exc_type: str) -> int: if exc_type == "value": raise ValueError("value error") elif exc_type == "type": raise TypeError("type error") elif exc_type == "key": raise KeyError("key error") return 42 with tracing_context(enabled=True): # All three should be handled with pytest.raises(ValueError): > f("value", langsmith_extra={"client": mock_client}) tests/unit_tests/test_run_helpers.py:2502: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413262267369984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log setup ------------------------------ WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ___________ test_ls_message_view_exclude_metadata_round_trips_to_run ___________ def test_ls_message_view_exclude_metadata_round_trips_to_run() -> None: """Using the constant as a metadata key in @traceable causes it to land on the shipped run's extra.metadata at the canonical wire key.""" from langsmith import LS_MESSAGE_VIEW_EXCLUDE mock_client = _get_mock_client() with tracing_context(enabled=True): @traceable(client=mock_client, metadata={LS_MESSAGE_VIEW_EXCLUDE: True}) def classify(x: str) -> str: return x > classify("hello") tests/unit_tests/test_run_helpers.py:2546: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413263097623040 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. _________ test_ls_message_view_exclude_metadata_cascades_to_child_runs _________ def test_ls_message_view_exclude_metadata_cascades_to_child_runs() -> None: """Metadata set on a parent @traceable cascades to child @traceable runs via the _METADATA contextvar. Regression test for the cascade behavior LS_MESSAGE_VIEW_EXCLUDE depends on.""" from langsmith import LS_MESSAGE_VIEW_EXCLUDE mock_client = _get_mock_client() with tracing_context(enabled=True): @traceable(client=mock_client) def child() -> str: return "ok" @traceable(client=mock_client, metadata={LS_MESSAGE_VIEW_EXCLUDE: True}) def parent() -> str: return child() > parent() tests/unit_tests/test_run_helpers.py:2574: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413263900827904 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. ______ test_tracing_context_replicas_apply_to_distributed_root_run[dict] _______ parent_kind = 'dict' @pytest.mark.parametrize("parent_kind", ["dict", "str"]) def test_tracing_context_replicas_apply_to_distributed_root_run(parent_kind: str): """`tracing_context(parent=, replicas=[...])` applies. Regression test for LSDK-449. The downstream service's root run is created as a child of the placeholder parent rebuilt from the incoming trace context. That placeholder used to be constructed before `_REPLICAS` was set and without the explicit `replicas` argument, so it ended up with `[]`, and `create_child` propagated that `[]` to the root run and every descendant. """ replicas = [{"project_name": "project-b", "primary": True}] > upstream = RunTree(name="a_root", run_type="chain", project_name="project-a") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2603: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413264708760064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______ test_tracing_context_replicas_apply_to_distributed_root_run[str] _______ parent_kind = 'str' @pytest.mark.parametrize("parent_kind", ["dict", "str"]) def test_tracing_context_replicas_apply_to_distributed_root_run(parent_kind: str): """`tracing_context(parent=, replicas=[...])` applies. Regression test for LSDK-449. The downstream service's root run is created as a child of the placeholder parent rebuilt from the incoming trace context. That placeholder used to be constructed before `_REPLICAS` was set and without the explicit `replicas` argument, so it ended up with `[]`, and `create_child` propagated that `[]` to the root run and every descendant. """ replicas = [{"project_name": "project-b", "primary": True}] > upstream = RunTree(name="a_root", run_type="chain", project_name="project-a") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_helpers.py:2603: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413265198498048 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________ TestRunTreeGCLeak.test_runtree_leak_with_call_later ______________ self = @pytest.mark.asyncio async def test_runtree_leak_with_call_later(self): """Test that RunTree objects leak when call_later is used during @traceable. This reproduces the issue where httpx connection keepalive timers (which use call_later) cause RunTree objects to be retained. """ _timers = [] @traceable(name="llm_call", run_type="llm") async def fake_llm_call(prompt): # Simulates httpx creating connection keepalive timers during LLM calls _timers.append(asyncio.get_running_loop().call_later(3600, lambda: None)) await asyncio.sleep(0.01) return "response" @traceable(name="agent", run_type="chain") async def agent(task): return await fake_llm_call(task) # Clean up before test gc.collect() await asyncio.sleep(0.1) gc.collect() # Count RunTree objects before before = sum(1 for o in gc.get_objects() if type(o).__name__ == "RunTree") # Run 10 iterations for i in range(10): > await agent(f"task-{i}") tests/unit_tests/test_run_tree_gc_leak.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413267483969024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______ TestRunTreeGCLeak.test_runtree_leak_with_create_task_long_running _______ self = @pytest.mark.asyncio async def test_runtree_leak_with_create_task_long_running(self): """Test RunTree leak with create_task and long-running tasks. This reproduces the issue where libraries that create long-running background tasks cause RunTree objects to be retained. The key is that the task must outlive the traceable function call. """ _background_tasks = [] @traceable(name="llm_call", run_type="llm") async def fake_llm_call(prompt): # Simulate a library that creates long-running background tasks async def background_work(): # This task runs for a long time, capturing the context await asyncio.sleep(3600) return "background_result" # This create_task captures the context with _PARENT_RUN_TREE # The task is stored externally so it outlives the function task = asyncio.create_task(background_work()) _background_tasks.append(task) await asyncio.sleep(0.01) # Just a tiny delay, not waiting for task return "immediate_response" @traceable(name="agent", run_type="chain") async def agent(task): return await fake_llm_call(task) # Clean up before test gc.collect() await asyncio.sleep(0.1) gc.collect() # Count RunTree objects before before = sum(1 for o in gc.get_objects() if type(o).__name__ == "RunTree") # Run 10 iterations for i in range(10): > await agent(f"task-{i}") tests/unit_tests/test_run_tree_gc_leak.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413269843919872 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________ TestRunTreeGCLeak.test_runtree_no_leak_without_context_copy __________ self = @pytest.mark.asyncio async def test_runtree_no_leak_without_context_copy(self): """Test RunTree objects are collected without context copy. This is a control test that verifies RunTree objects ARE collected when no copy_context() is triggered during the @traceable call. """ @traceable(name="llm_call", run_type="llm") async def fake_llm_call(prompt): # No context-copying operations here await asyncio.sleep(0.01) return "response" @traceable(name="agent", run_type="chain") async def agent(task): return await fake_llm_call(task) # Clean up before test gc.collect() await asyncio.sleep(0.1) gc.collect() # Count RunTree objects before before = sum(1 for o in gc.get_objects() if type(o).__name__ == "RunTree") # Run 10 iterations for i in range(10): > await agent(f"task-{i}") tests/unit_tests/test_run_tree_gc_leak.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413272187426048 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ TestRunTreeGCLeak.test_runtree_weakref_collection _______________ self = @pytest.mark.asyncio async def test_runtree_weakref_collection(self): """Test that RunTree objects can be weakly referenced and collected. This verifies that the issue is specifically about context capture, not about RunTree objects being inherently uncollectible. """ collected_refs = [] @traceable(name="test_func", run_type="chain") async def test_func(): await asyncio.sleep(0.01) return "result" # Run and create weak reference > await test_func() tests/unit_tests/test_run_tree_gc_leak.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413272776623104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________ TestRunTreeGCLeak.test_nested_traceable_leak _________________ self = @pytest.mark.asyncio async def test_nested_traceable_leak(self): """Test that nested @traceable calls compound the leak. This simulates a more realistic scenario where an agent calls multiple nested traceable functions, creating a tree of RunTrees. """ _timers = [] @traceable(name="tool_call", run_type="tool") async def tool_call(name): _timers.append(asyncio.get_running_loop().call_later(3600, lambda: None)) await asyncio.sleep(0.01) return f"tool_result_{name}" @traceable(name="llm_call", run_type="llm") async def llm_call(prompt): _timers.append(asyncio.get_running_loop().call_later(3600, lambda: None)) # Call a tool during LLM call tool_result = await tool_call("search") await asyncio.sleep(0.01) return f"llm_response with {tool_result}" @traceable(name="agent", run_type="chain") async def agent(task): result = await llm_call(task) return result # Clean up before test gc.collect() await asyncio.sleep(0.1) gc.collect() # Count RunTree objects before before = sum(1 for o in gc.get_objects() if type(o).__name__ == "RunTree") # Run 5 iterations (each creates 3 RunTrees: agent, llm, tool) for i in range(5): > await agent(f"task-{i}") tests/unit_tests/test_run_tree_gc_leak.py:266: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:363: in aio_to_thread return await _default_aio_to_thread(ctx, func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:376: in _default_aio_to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:86: in run result = ctx.run(self.task) ^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/concurrent/futures/thread.py:73: in run return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413275120072960 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________________________ test_run_tree_accepts_tpe ___________________________ def test_run_tree_accepts_tpe() -> None: mock_client = MagicMock(spec=Client) > run_trees.RunTree( name="My Chat Bot", inputs={"text": "Summarize this morning's meetings."}, client=mock_client, executor=ThreadPoolExecutor(), # type: ignore ) tests/unit_tests/test_run_trees.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413275712733952 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________________________ test_lazy_rt _________________________________ def test_lazy_rt() -> None: > run_tree = RunTree(name="foo") ^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413275978946048 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________________________ test_json_serializable ____________________________ def test_json_serializable(): > run_tree = RunTree(name="foo") ^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:106: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413276250173184 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________________________ test_run_tree_events_not_null _________________________ def test_run_tree_events_not_null(): mock_client = MagicMock(spec=Client) > run_tree = run_trees.RunTree( name="My Chat Bot", inputs={"text": "Summarize this morning's meetings."}, client=mock_client, events=None, ) tests/unit_tests/test_run_trees.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413276542841856 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________________ test_nested_run_trees_from_dotted_order ____________________ def test_nested_run_trees_from_dotted_order(): > grandparent = run_trees.RunTree( name="Grandparent", inputs={"text": "Summarize this morning's meetings."}, client=MagicMock(spec=Client), ) tests/unit_tests/test_run_trees.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413276828664064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________________ test_distributed_tracing_slice_parent_id ___________________ def test_distributed_tracing_slice_parent_id(): """Test distributed tracing functionality with _slice_parent_id method.""" mock_client = MagicMock(spec=Client) > grandparent = RunTree( name="Grandparent", inputs={"text": "root"}, client=mock_client, ) tests/unit_tests/test_run_trees.py:227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413277099023104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________________ test_distributed_tracing_remap_for_project __________________ def test_distributed_tracing_remap_for_project(): """Test distributed tracing with _remap_for_project method.""" mock_client = MagicMock(spec=Client) > grandparent = RunTree( name="Grandparent", inputs={"text": "root"}, client=mock_client, session_name="original_project", ) tests/unit_tests/test_run_trees.py:257: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413277375865088 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________________ test_distributed_parent_id_from_headers ____________________ def test_distributed_parent_id_from_headers(): """Test that _DISTRIBUTED_PARENT_ID is correctly set directly in from_headers().""" mock_client = MagicMock(spec=Client) # Create a hierarchy: grandparent -> parent -> child > grandparent = RunTree( name="Grandparent", inputs={"text": "grandparent"}, client=mock_client, session_name="original_project", ) tests/unit_tests/test_run_trees.py:297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413277652756992 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________________________ test_remap_for_project ____________________________ def test_remap_for_project(): """Test _remap_for_project remaps IDs correctly using uuid7_deterministic.""" mock_client = MagicMock(spec=Client) > root = RunTree(name="Root", inputs={}, client=mock_client, session_name="original") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:344: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413277927419904 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________ test_inputs_attachment_moved_to_attachments __________________ def test_inputs_attachment_moved_to_attachments(): """Ensure Attachment values in inputs are moved to attachments.""" mock_client = _get_mock_client( info=ls_schemas.LangSmithInfo( instance_flags={ "zstd_compression_enabled": False, }, batch_ingest_config=ls_schemas.BatchIngestConfig( use_multipart_endpoint=True, size_limit_bytes=None, size_limit=100, scale_up_nthreads_limit=16, scale_up_qsize_trigger=1000, scale_down_nempty_trigger=4, ), ), ) > run_tree = RunTree( name="WithAttachment", inputs={ "text": "hello", "file": ls_schemas.Attachment(mime_type="text/plain", data=b"hi"), }, client=mock_client, ) tests/unit_tests/test_run_trees.py:387: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413278200481024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ------------------------------ Captured log call ------------------------------- WARNING langsmith.client:_background_thread.py:607 Run compression is not enabled. Please update to the latest version of LangSmith. Falling back to regular multipart ingestion. __________________ test_create_child_enforces_timestamp_order __________________ def test_create_child_enforces_timestamp_order(): """Test that child runs cannot have start_time earlier than parent. This prevents timestamp ordering violations in dotted_order that can cause 400 Bad Request errors from the LangSmith API. See: https://github.com/langchain-ai/langsmith-sdk/issues/2236 """ mock_client = MagicMock(spec=Client) # Create a parent run with a specific timestamp parent_time = datetime(2025, 12, 22, 23, 43, 8, 14739, tzinfo=timezone.utc) > parent = RunTree( name="Parent", start_time=parent_time, client=mock_client, ) tests/unit_tests/test_run_trees.py:433: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:394: in infer_defaults values["id"] = uuid7_from_datetime(values["start_time"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1766446988014738944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________ test_create_child_propagates_thread_metadata _________________ def test_create_child_propagates_thread_metadata(): """Child runs inherit thread_id from parent. Ensures threads features work when user sets thread_id only on the root. """ mock_client = MagicMock(spec=Client) > root = RunTree( name="Root", inputs={}, client=mock_client, extra={"metadata": {"thread_id": "thread-abc"}}, ) tests/unit_tests/test_run_trees.py:469: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413278756361984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________________________ test_trace_start_time _____________________________ def test_trace_start_time(): """Test that trace_start_time returns the root run's start time for all nested runs.""" mock_client = MagicMock(spec=Client) # Create a nested hierarchy: root -> child1 -> grandchild # -> child2 > root = RunTree(name="root", client=mock_client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:496: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413279031006208 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________ test_to_headers_does_not_serialize_replicas __________________ def test_to_headers_does_not_serialize_replicas(): mock_client = MagicMock(spec=Client) > rt = RunTree( name="test", run_type="chain", client=mock_client, replicas=[ { "api_key": "secret-key", "api_url": "https://attacker.com", "project_name": "safe-project", "updates": {"reroot": True}, } ], ) tests/unit_tests/test_run_trees.py:514: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413279317403136 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ test_runtree_accepts_pydantic_basemodel_as_constructor_inputs _________ def test_runtree_accepts_pydantic_basemodel_as_constructor_inputs(): from pydantic import BaseModel as PydanticBaseModel class MyInput(PydanticBaseModel): query: str > rt = RunTree(name="test", run_type="chain", inputs=MyInput(query="hello")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:697: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413279728774912 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ test_runtree_accepts_pydantic_basemodel_as_constructor_outputs ________ def test_runtree_accepts_pydantic_basemodel_as_constructor_outputs(): from pydantic import BaseModel as PydanticBaseModel class MyOutput(PydanticBaseModel): answer: str > rt = RunTree( name="test", run_type="chain", inputs={}, outputs=MyOutput(answer="hi") ) tests/unit_tests/test_run_trees.py:707: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413280003923968 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________ test_runtree_end_accepts_pydantic_basemodel_outputs ______________ def test_runtree_end_accepts_pydantic_basemodel_outputs(): from pydantic import BaseModel as PydanticBaseModel class MyOutput(PydanticBaseModel): answer: str > rt = RunTree(name="test", run_type="chain", inputs={}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:719: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413280282171136 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ test_runtree_set_accepts_nested_pydantic_basemodel_inputs ___________ def test_runtree_set_accepts_nested_pydantic_basemodel_inputs(): from pydantic import BaseModel as PydanticBaseModel class Inner(PydanticBaseModel): val: int class MyNestedInput(PydanticBaseModel): query: str nested: Inner > rt = RunTree(name="test", run_type="chain", inputs={}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:734: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413280552301056 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________ test_runtree_set_accepts_pydantic_basemodel_outputs ______________ def test_runtree_set_accepts_pydantic_basemodel_outputs(): from pydantic import BaseModel as PydanticBaseModel class MyOutput(PydanticBaseModel): answer: str > rt = RunTree(name="test", run_type="chain", inputs={}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_run_trees.py:745: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413280819379968 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ test_patch_exclude_inputs_env_flag[None-None-None-False] ___________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f45609940> _reset_exclude_inputs_cache = ._clear at 0x3f45685a60> env_name = None, env_value = None, explicit = None, expect_inputs = False @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413281088387840 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-true-None-False] _ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f45609ef0> _reset_exclude_inputs_cache = ._clear at 0x3f45628510> env_name = 'LANGSMITH_EXCLUDE_INPUTS_ON_PATCH', env_value = 'true' explicit = None, expect_inputs = False @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413281358387968 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-TRUE-None-False] _ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f4560b070> _reset_exclude_inputs_cache = ._clear at 0x3f45628300> env_name = 'LANGSMITH_EXCLUDE_INPUTS_ON_PATCH', env_value = 'TRUE' explicit = None, expect_inputs = False @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413281631931904 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-1-None-False] _ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f4560b230> _reset_exclude_inputs_cache = ._clear at 0x3f45628b40> env_name = 'LANGSMITH_EXCLUDE_INPUTS_ON_PATCH', env_value = '1', explicit = None expect_inputs = False @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413281908602112 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-false-None-True] _ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f455db1c0> _reset_exclude_inputs_cache = ._clear at 0x3f456294e0> env_name = 'LANGSMITH_EXCLUDE_INPUTS_ON_PATCH', env_value = 'false' explicit = None, expect_inputs = True @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413282182292992 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-bogus-None-True] _ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f455dbcb0> _reset_exclude_inputs_cache = ._clear at 0x3f45629dd0> env_name = 'LANGSMITH_EXCLUDE_INPUTS_ON_PATCH', env_value = 'bogus' explicit = None, expect_inputs = True @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413282457443840 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ test_patch_exclude_inputs_env_flag[LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH-true-None-False] _ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f455da6d0> _reset_exclude_inputs_cache = ._clear at 0x3f456297a0> env_name = 'LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH', env_value = 'true' explicit = None, expect_inputs = False @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413282733024000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-true-False-True] _ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f455db8c0> _reset_exclude_inputs_cache = ._clear at 0x3f4562ae50> env_name = 'LANGSMITH_EXCLUDE_INPUTS_ON_PATCH', env_value = 'true' explicit = False, expect_inputs = True @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413283003080960 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ test_patch_exclude_inputs_env_flag[None-None-True-False] ___________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f455d9390> _reset_exclude_inputs_cache = ._clear at 0x3f4562bb60> env_name = None, env_value = None, explicit = True, expect_inputs = False @pytest.mark.parametrize( "env_name, env_value, explicit, expect_inputs", [ # Unset env var: inputs are not re-sent on patch. (None, None, None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "TRUE", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "1", None, False), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "false", None, True), ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "bogus", None, True), # The LANGCHAIN_ namespace is honoured too. ("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", "true", None, False), # An explicit argument always wins over the environment. ("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true", False, True), (None, None, True, False), ], ) def test_patch_exclude_inputs_env_flag( monkeypatch, _reset_exclude_inputs_cache, env_name, env_value, explicit, expect_inputs, ): monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) if env_name is not None: monkeypatch.setenv(env_name, env_value) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:795: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413283284719872 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______________ test_patch_exclude_inputs_env_flag_with_replicas _______________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ee2cbf4d0> _reset_exclude_inputs_cache = ._clear at 0x3f4562af00> def test_patch_exclude_inputs_env_flag_with_replicas( monkeypatch, _reset_exclude_inputs_cache ): """The replica patch path honours the flag as well.""" monkeypatch.setenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", "true") _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client, project_name="test-project", replicas=[run_trees.WriteReplica(project_name="replica-project")], ) tests/unit_tests/test_run_trees.py:815: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413283559910912 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________________ test_patch_exclude_inputs_flag_is_cached ___________________ monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ee2cbf930> _reset_exclude_inputs_cache = ._clear at 0x3f45629900> def test_patch_exclude_inputs_flag_is_cached(monkeypatch, _reset_exclude_inputs_cache): """The env var is read once per process, not on every patch.""" monkeypatch.delenv("LANGSMITH_EXCLUDE_INPUTS_ON_PATCH", raising=False) monkeypatch.delenv("LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH", raising=False) _reset_exclude_inputs_cache() client = MagicMock() > run_tree = RunTree( name="test_run", run_type="chain", inputs={"a": 1}, client=client ) tests/unit_tests/test_run_trees.py:835: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413283828941056 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ test_async_trace_context_propagates_under_override ______________ async def test_async_trace_context_propagates_under_override(): """End-to-end: with an override registered, async trace() still propagates tracing context — i.e. the override's ctx.run invocation, plus the run_helpers fallback that re-applies tracing state from ctx, together produce correct parent/child linkage inside an async context manager.""" from langsmith import get_current_run_tree, trace, tracing_context async def my_override(default_aio_to_thread, ctx, func, /, *args, **kwargs): return ctx.run(func, *args, **kwargs) set_runtime_overrides(aio_to_thread=my_override) with tracing_context(enabled="local"): assert get_current_run_tree() is None async with trace(name="outer", inputs={"step": "outer"}) as outer: assert get_current_run_tree() is not None assert get_current_run_tree().id == outer.id > async with trace(name="inner", inputs={"step": "inner"}) as inner: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_runtime_overrides.py:172: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:1228: in __aenter__ result = await aitertools.aio_to_thread(ctx, self._setup) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/_aiter.py:360: in aio_to_thread return await overrides.aio_to_thread( tests/unit_tests/test_runtime_overrides.py:163: in my_override return ctx.run(func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1126: in _setup self.new_run = parent_run_.create_child( langsmith/run_trees.py:662: in create_child run_id_ = uuid7_from_datetime(child_start_time) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413284300971008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________________ test_traceable_uses_override _________________________ async def test_traceable_uses_override(): """A traceable async function should route through the override.""" from unittest.mock import MagicMock from langsmith import traceable override_calls = 0 async def my_override(default_aio_to_thread, ctx, func, /, *args, **kwargs): nonlocal override_calls override_calls += 1 return ctx.run(func, *args, **kwargs) set_runtime_overrides(aio_to_thread=my_override) mock_client = MagicMock() mock_client.tracing_queue = None @traceable(client=mock_client) async def my_async_fn(x: int) -> int: return x + 1 with langsmith.tracing_context(enabled=True): > result = await my_async_fn(1) ^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_runtime_overrides.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:611: in async_wrapper run_container = await aitertools.aio_to_thread( langsmith/_internal/_aiter.py:360: in aio_to_thread return await overrides.aio_to_thread( tests/unit_tests/test_runtime_overrides.py:191: in my_override return ctx.run(func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413284855966208 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________________________ test_tracing_enabled _____________________________ def test_tracing_enabled(): ls_utils.get_env_var.cache_clear() with patch.dict( "os.environ", {"LANGCHAIN_TRACING_V2": "false", "LANGSMITH_TRACING": "false"} ): assert not ls_utils.tracing_is_enabled() with tracing_context(enabled=True): assert ls_utils.tracing_is_enabled() with tracing_context(enabled=False): assert not ls_utils.tracing_is_enabled() with tracing_context(enabled=False): assert not ls_utils.tracing_is_enabled() assert not ls_utils.tracing_is_enabled() @traceable def grandchild_function(): assert ls_utils.tracing_is_enabled() rt = get_current_run_tree() assert rt assert rt.parent_run_id is None assert "." not in rt.dotted_order assert rt.parent_dotted_order is None return 1 @traceable def child_function(): assert ls_utils.tracing_is_enabled() with tracing_context(parent=False): return grandchild_function() @traceable def untraced_child_function(): assert not ls_utils.tracing_is_enabled() return 1 @traceable def parent_function(): with patch.dict( "os.environ", {"LANGCHAIN_TRACING_V2": "false", "LANGSMITH_TRACING": "false"}, ): assert ls_utils.tracing_is_enabled() child_function() with tracing_context(enabled=False): assert not ls_utils.tracing_is_enabled() return untraced_child_function() ls_utils.get_env_var.cache_clear() with patch.dict( "os.environ", {"LANGCHAIN_TRACING_V2": "true", "LANGSMITH_TRACING": "true"} ): mock_client = MagicMock(spec=Client) > parent_function(langsmith_extra={"client": mock_client}) tests/unit_tests/test_utils.py:147: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_helpers.py:754: in wrapper run_container = _setup_run( langsmith/run_helpers.py:1694: in _setup_run new_run = run_trees.RunTree(**cast(Any, run_tree_kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413285619987968 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ test_traceable_uses_uuidv7_and_start_time_matches_run_id ___________ def test_traceable_uses_uuidv7_and_start_time_matches_run_id() -> None: captured: dict[str, Any] = {} # Use a parent run to ensure a child RunTree is created even if tracing is disabled > parent = RunTree(name="parent", run_type="chain", inputs={}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_uuid_v7.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413290993074944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ test_run_tree_default_uuidv7_and_start_time_match _______________ def test_run_tree_default_uuidv7_and_start_time_match() -> None: # Default RunTree should have v7 id and matching start_time > rt = RunTree(name="test", run_type="chain", inputs={}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_uuid_v7.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413291210213888 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________ test_run_tree_explicit_start_time_matches_id _________________ def test_run_tree_explicit_start_time_matches_id() -> None: fixed_start = datetime.datetime( 2024, 6, 7, 8, 9, 10, 123000, tzinfo=datetime.timezone.utc ) > rt = RunTree(name="test", run_type="chain", inputs={}, start_time=fixed_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/test_uuid_v7.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:394: in infer_defaults values["id"] = uuid7_from_datetime(values["start_time"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1717747750122999808 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________ test_post_and_patch_include_run_type_and_start_time ______________ def test_post_and_patch_include_run_type_and_start_time() -> None: client = MagicMock(spec=Client) fixed_start = datetime.datetime( 2024, 6, 7, 8, 9, 10, 123000, tzinfo=datetime.timezone.utc ) > rt = RunTree( name="post-patch-test", run_type="llm", inputs={"x": 1}, start_time=fixed_start, ) tests/unit_tests/test_uuid_v7.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/run_trees.py:394: in infer_defaults values["id"] = uuid7_from_datetime(values["start_time"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1717747750122999808 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___ TestMissingSubagentLLMRuns.test_creates_missing_llm_run_from_transcript ____ self = tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_creates_missing_llm_run_f0') def test_creates_missing_llm_run_from_transcript(self, tmp_path): import json from langsmith.integrations.claude_agent_sdk._client import TurnLifecycle from langsmith.integrations.claude_agent_sdk._transcripts import ( LLM_RUN_NAME, reconcile_from_transcripts, ) # Create a subagent run > parent = _make_parent_run() ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413295643286016 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestMissingSubagentLLMRuns.test_skips_already_seen_message_ids ________ self = tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_skips_already_seen_messag0') def test_skips_already_seen_message_ids(self, tmp_path): import json from langsmith.integrations.claude_agent_sdk._client import TurnLifecycle from langsmith.integrations.claude_agent_sdk._transcripts import ( LLM_RUN_NAME, reconcile_from_transcripts, ) > parent = _make_parent_run() ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:629: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413295915026944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________ TestSessionBinding.test_bound_hook_uses_client_session ____________ self = def test_bound_hook_uses_client_session(self): import asyncio import contextvars from langsmith.integrations.claude_agent_sdk._client import ( _bind_hook_to_session, ) from langsmith.integrations.claude_agent_sdk._hooks import ( SessionState, _set_session_root, pre_tool_use_hook, ) > parent_run = _make_parent_run() ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:683: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413296183918848 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestSessionBinding.test_bound_tool_handler_uses_client_session ________ self = def test_bound_tool_handler_uses_client_session(self): from langsmith._internal import _context from langsmith.integrations.claude_agent_sdk._client import _wrap_tool_handler from langsmith.integrations.claude_agent_sdk._hooks import SessionState session = SessionState() > tool_run = _make_parent_run().create_child(name="get_weather", run_type="tool") ^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:707: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413296451288064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _ TestSessionBinding.test_unbound_tool_handler_finds_registered_session_by_args _ self = def test_unbound_tool_handler_finds_registered_session_by_args(self): from langsmith._internal import _context from langsmith.integrations.claude_agent_sdk._client import _wrap_tool_handler from langsmith.integrations.claude_agent_sdk._hooks import ( SessionState, _register_session, _unregister_session, ) session = SessionState() > tool_run = _make_parent_run().create_child( ^^^^^^^^^^^^^^^^^^ name="mcp__weather__get_weather", run_type="tool", inputs={"input": {"city": "SF"}}, ) tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:733: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py:45: in _make_parent_run return RunTree(name="test-parent", run_type="chain", client=MagicMock()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413296717263872 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestWrapper.test_proxy_is_transparent_and_tracing_is_fail_open ________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f947ccad0> async def test_proxy_is_transparent_and_tracing_is_fail_open(self, monkeypatch): messages = [_message(user="hello"), _message(turn_complete=True)] raw = FakeSession(messages) monkeypatch.setattr( live_mod._GeminiLiveTracer, "observe", mock.Mock(side_effect=RuntimeError("broken tracer")), ) seen = [] response = {"id": "call-1", "name": "tool", "response": {"answer": 42}} > async with wrap_gemini_live(raw) as session: ^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_gemini_live.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/gemini_live/_session.py:424: in __aenter__ self._trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413300463035136 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ TestWrapper.test_transcript_usage_llm_and_markers _______________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ee2bfe7b0> async def test_transcript_usage_llm_and_markers(self, monkeypatch): created = _spy_children(monkeypatch) usage = NS( prompt_token_count=8, response_token_count=5, total_token_count=13, prompt_tokens_details=None, response_tokens_details=None, cached_content_token_count=None, thoughts_token_count=None, ) messages = [ _message(user="what is ", user_finished=False), _message(user="the weather?", user_finished=False), _message(agent="It is ", agent_finished=False), _message(agent="sunny.", agent_finished=False), _message(turn_complete=True, usage=usage), ] > async with wrap_gemini_live( FakeSession(messages), model="gemini-live", thread_id="thread-1" ) as session: tests/unit_tests/wrappers/test_gemini_live.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/gemini_live/_session.py:424: in __aenter__ self._trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413300804382976 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________ TestWrapper.test_function_call_span_and_interruption _____________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ee2b819b0> async def test_function_call_span_and_interruption(self, monkeypatch): created = _spy_children(monkeypatch) call = NS(id="call-1", name="lookup_weather", args={"city": "Tokyo"}) response = NS( id="call-1", name="lookup_weather", response={"city": "Tokyo", "condition": "sunny"}, ) messages = [ _message(calls=[call]), _message(interrupted=True), ] > async with wrap_gemini_live( FakeSession(messages), is_agent_speaking=lambda: True ) as session: tests/unit_tests/wrappers/test_gemini_live.py:285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/gemini_live/_session.py:424: in __aenter__ self._trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413301133713920 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________ TestWrapper.test_parallel_tool_calls_are_matched_by_id ____________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ee2b80440> async def test_parallel_tool_calls_are_matched_by_id(self, monkeypatch): created = _spy_children(monkeypatch) calls = [ NS(id="call-1", name="first", args={"value": 1}), NS(id="call-2", name="second", args={"value": 2}), ] responses = [ {"id": "call-2", "name": "second", "response": {"result": 2}}, {"id": "call-1", "name": "first", "response": {"result": 1}}, ] > async with wrap_gemini_live(FakeSession([_message(calls=calls)])) as session: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_gemini_live.py:319: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/gemini_live/_session.py:424: in __aenter__ self._trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413301493291008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ TestWrapper.test_incomplete_tool_call_is_closed_with_error __________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3fdd441400> async def test_incomplete_tool_call_is_closed_with_error(self, monkeypatch): created = _spy_children(monkeypatch) call = NS(id="call-1", name="lookup_weather", args={"city": "Tokyo"}) > async with wrap_gemini_live(FakeSession([_message(calls=[call])])) as session: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_gemini_live.py:332: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/gemini_live/_session.py:424: in __aenter__ self._trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413302513101056 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestWrapper.test_audio_is_bounded_and_replicas_propagate ___________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ee2b83690> async def test_audio_is_bounded_and_replicas_propagate(self, monkeypatch): created = _spy_children(monkeypatch) replicas = [{"project_name": "replica"}] > async with wrap_gemini_live( FakeSession([_message(user="hi")]), sample_rate=10, max_audio_seconds=1.0, replicas=replicas, ) as session: tests/unit_tests/wrappers/test_gemini_live.py:343: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/gemini_live/_session.py:424: in __aenter__ self._trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413302839044096 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________ TestWrapper.test_body_error_is_recorded_and_propagated ____________ self = async def test_body_error_is_recorded_and_propagated(self): context = wrap_gemini_live(FakeSession([])) with pytest.raises(RuntimeError, match="application failed"): > async with context as session: ^^^^^^^ tests/unit_tests/wrappers/test_gemini_live.py:365: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/gemini_live/_session.py:424: in __aenter__ self._trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413303167023872 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestFailOpen.test_broken_tracer_does_not_break_the_loop ____________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3fddf65160> async def test_broken_tracer_does_not_break_the_loop(self, monkeypatch): events = [NS(type="session.created"), NS(type="x"), NS(type="y")] # Every observe call blows up; the caller must still receive every event. monkeypatch.setattr( conn_mod._RealtimeTracer, "observe", mock.Mock(side_effect=RuntimeError("boom")), ) seen = [] > async with wrap_realtime(FakeConnection(events)) as connection: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_openai_realtime.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_connection.py:425: in __aenter__ self._session = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413309961939968 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______________ TestFailOpen.test_event_without_type_is_skipped ________________ self = async def test_event_without_type_is_skipped(self): # An object with no ``.type`` must not raise out of the loop. events = [object(), NS(type="session.created")] seen = [] > async with wrap_realtime(FakeConnection(events)) as connection: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_openai_realtime.py:189: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_connection.py:425: in __aenter__ self._session = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413310291695104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestEndToEnd.test_single_turn_transcript_latency_and_llm ___________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe45e970> async def test_single_turn_transcript_latency_and_llm(self, monkeypatch): created = _spy_children(monkeypatch) usage = NS(input_tokens=3, output_tokens=4, total_tokens=7) events = [ NS(type="session.created", session=NS(model="gpt-realtime")), NS(type="input_audio_buffer.speech_started"), NS(type="input_audio_buffer.speech_stopped"), NS( type="conversation.item.input_audio_transcription.completed", transcript="what's the weather?", ), NS(type="response.output_audio.delta", delta=b"\x00\x00"), NS(type="response.output_audio_transcript.done", transcript="It's sunny."), _response_done("It's sunny.", usage=usage), ] > async with wrap_realtime(FakeConnection(events), thread_id="t") as connection: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_openai_realtime.py:230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_connection.py:425: in __aenter__ self._session = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413310609486080 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ TestEndToEnd.test_barge_in_flags_interrupted_turn _______________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe45ce50> async def test_barge_in_flags_interrupted_turn(self, monkeypatch): created = _spy_children(monkeypatch) events = [ NS(type="input_audio_buffer.speech_started"), # turn 1 opens NS( type="conversation.item.input_audio_transcription.completed", transcript="first", ), NS(type="input_audio_buffer.speech_started"), # turn 2 — interrupts 1 NS( type="conversation.item.input_audio_transcription.completed", transcript="second", ), ] # Agent is "still audible" → the second speech_started is a barge-in. > async with wrap_realtime( FakeConnection(events), is_agent_speaking=lambda: True ) as connection: tests/unit_tests/wrappers/test_openai_realtime.py:277: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_connection.py:425: in __aenter__ self._session = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413310941750016 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____________ TestEndToEnd.test_max_audio_seconds_bounds_recording _____________ self = async def test_max_audio_seconds_bounds_recording(self): > async with wrap_realtime( FakeConnection([]), sample_rate=10, max_audio_seconds=1.0 ) as connection: tests/unit_tests/wrappers/test_openai_realtime.py:289: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_connection.py:425: in __aenter__ self._session = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413311266908928 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ TestEndToEnd.test_replicas_propagate_to_root_and_children ___________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe45d9b0> async def test_replicas_propagate_to_root_and_children(self, monkeypatch): created = _spy_children(monkeypatch) replicas = [{"project_name": "replica-project"}] # A speech_started event opens a "turn" child under the root. events = [NS(type="input_audio_buffer.speech_started")] > async with wrap_realtime( FakeConnection(events), replicas=replicas ) as connection: tests/unit_tests/wrappers/test_openai_realtime.py:306: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_connection.py:425: in __aenter__ self._session = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413311585385984 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______ TestTracer.test_history_turn_collapses_partials_and_emits_spans ________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3fdd86d0f0> def test_history_turn_collapses_partials_and_emits_spans(self, monkeypatch): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:198: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413312053113088 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestTracer.test_hold_last_defers_final_message_until_teardown _________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe480670> def test_hold_last_defers_final_message_until_teardown(self, monkeypatch): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:241: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413312357487872 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestTracer.test_tool_start_and_end_become_one_tool_span ____________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe482040> def test_tool_start_and_end_become_one_tool_span(self, monkeypatch): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:266: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413312653810944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______ TestTracer.test_tool_end_without_start_falls_back_to_point_in_time ______ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe482430> def test_tool_end_without_start_falls_back_to_point_in_time(self, monkeypatch): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:294: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413312964844032 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestTracer.test_orphan_tool_span_closed_with_error_at_teardown ________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe482dd0> def test_orphan_tool_span_closed_with_error_at_teardown(self, monkeypatch): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:315: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413313262809088 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ TestTracer.test_audio_interrupted_flags_open_turn _______________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe483d20> def test_audio_interrupted_flags_open_turn(self, monkeypatch): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:331: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413313568228096 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______________ TestTracer.test_raw_model_event_user_transcript ________________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe4815c0> def test_raw_model_event_user_transcript(self, monkeypatch): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:344: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413313870095104 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestTracer.test_response_done_usage_attached_to_assistant_span ________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe4d30e0> def test_response_done_usage_attached_to_assistant_span(self, monkeypatch): # The SDK has no semantic usage event, but forwards the raw response.done # (as raw_server_event); its usage must ride on the assistant model span, # with audio/cached detail preserved for correct pricing. > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:369: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413314178952960 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ TestTracer.test_response_done_usage_consumed_once _______________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebe4d0130> def test_response_done_usage_consumed_once(self, monkeypatch): # Usage is cleared after it's attached, so a later assistant turn without # its own response.done doesn't inherit the previous turn's counts. > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:423: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413314477633024 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ TestTracer.test_on_message_called_once_per_finalized_line ___________ self = def test_on_message_called_once_per_finalized_line(self): > session = start_session( thread_id="t", sample_rate=24_000, integration="openai-agents-realtime" ) tests/unit_tests/wrappers/test_openai_realtime_agents.py:450: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413314775186944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ TestProxy.test_enters_exits_underlying_and_traces _______________ self = async def test_enters_exits_underlying_and_traces(self): fake = FakeSession( [ _history_updated( _item("u1", "user", "hi"), _item("a1", "assistant", "yo") ) ] ) > async with wrap_realtime_session(fake, thread_id="t") as conn: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_openai_realtime_agents.py:519: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_session.py:554: in __aenter__ trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413315088807936 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______________ TestProxy.test_broken_tracer_does_not_break_loop _______________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebbb5b1c0> async def test_broken_tracer_does_not_break_loop(self, monkeypatch): events = [NS(type="audio"), NS(type="other")] monkeypatch.setattr( agents_mod._AgentsRealtimeTracer, "observe", mock.Mock(side_effect=RuntimeError("boom")), ) seen = [] > async with wrap_realtime_session(FakeSession(events)) as conn: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_openai_realtime_agents.py:543: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_session.py:554: in __aenter__ trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413315487160064 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestProxy.test_finalize_failure_still_exits_underlying_session ________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebbb6f2a0> async def test_finalize_failure_still_exits_underlying_session(self, monkeypatch): fake = FakeSession([]) monkeypatch.setattr( EventSession, "finalize", mock.Mock(side_effect=RuntimeError("boom")) ) # __aexit__ must swallow the finalize error and still exit the session. > async with wrap_realtime_session(fake) as conn: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_openai_realtime_agents.py:567: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_session.py:554: in __aenter__ trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413315885618944 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ______________ TestProxy.test_max_audio_seconds_bounds_recording _______________ self = async def test_max_audio_seconds_bounds_recording(self): > async with wrap_realtime_session( FakeSession([]), sample_rate=10, max_audio_seconds=1.0 ) as conn: tests/unit_tests/wrappers/test_openai_realtime_agents.py:572: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ langsmith/integrations/openai_realtime/_session.py:554: in __aenter__ trace = start_session( langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413316288301824 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________ TestAudioBound.test_start_session_converts_seconds_to_bytes __________ self = def test_start_session_converts_seconds_to_bytes(self): # 2s at 24kHz PCM16 = 2 * 24000 * 2 bytes per channel. > s = _session(max_audio_seconds=2.0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413318664518144 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________________ TestAudioBound.test_bounded_cap_by_default __________________ self = def test_bounded_cap_by_default(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413318949876992 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________________ TestAudioBound.test_none_disables_cap _____________________ self = def test_none_disables_cap(self): > s = _session(max_audio_seconds=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413319236204032 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestAudioBound.test_user_channel_capped_and_flagged_once ___________ self = def test_user_channel_capped_and_flagged_once(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413319528791808 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____________________ TestAudioBound.test_cap_is_per_channel ____________________ self = def test_cap_is_per_channel(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413319814235904 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestAudioBound.test_truncation_surfaced_in_root_metadata ___________ self = def test_truncation_surfaced_in_root_metadata(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413320099275008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________________ TestAudioBound.test_finalize_caps_wav_duration ________________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebfcb81a0> def test_finalize_caps_wav_duration(self, monkeypatch): > s = _session(max_audio_seconds=1.0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413320383603200 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____ TestAudioBound.test_natural_play_duration_cap_marks_audio_truncated ______ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ebfcba580> def test_natural_play_duration_cap_marks_audio_truncated(self, monkeypatch): > s = _session(sample_rate=10, max_audio_seconds=600) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:113: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413320683211008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _________________ TestIntegrationMetadata.test_stamped_on_root _________________ self = def test_stamped_on_root(self): > s = _session(integration="google-adk-live", integration_version="2.2.0") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413321733366016 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______ TestIntegrationMetadata.test_unresolved_version_recorded_as_none _______ self = def test_unresolved_version_recorded_as_none(self): # An unresolvable framework version records the integration id anyway, # with a null version (the RunTree metadata path allows null). > s = _session(integration="pipecat", integration_version=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413322028304128 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ____ TestIntegrationMetadata.test_caller_metadata_cannot_shadow_integration ____ self = def test_caller_metadata_cannot_shadow_integration(self): > s = _session( integration="livekit", integration_version="1.0.0", metadata={"ls_integration": "spoofed"}, ) tests/unit_tests/wrappers/test_voice_session.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413322318959872 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ________ TestTranscriptAndTitle.test_add_message_strips_and_drops_empty ________ self = def test_add_message_strips_and_drops_empty(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413322604345088 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ TestTranscriptAndTitle.test_set_title_first_nonempty_wins ___________ self = def test_set_title_first_nonempty_wins(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:163: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413322896388096 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______ TestTranscriptAndTitle.test_finalize_rolls_transcript_onto_root ________ self = def test_finalize_rolls_transcript_onto_root(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:171: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413323188555008 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestTurns.test_turn_groups_messages_and_carries_metadata ___________ self = def test_turn_groups_messages_and_carries_metadata(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413323475520000 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError ___________ TestTurns.test_add_turn_metadata_noop_without_open_turn ____________ self = def test_add_turn_metadata_noop_without_open_turn(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413323768621056 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError __________ TestRecordLlm.test_default_inputs_drop_trailing_assistant ___________ self = def test_default_inputs_drop_trailing_assistant(self): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:208: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413324060087040 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _______ TestRecordLlm.test_usage_lands_on_the_run_before_it_is_finalized _______ self = def test_usage_lands_on_the_run_before_it_is_finalized(self): # Cost is derived when the run is finalized, so usage must be set on the # run's extra.metadata before end/patch — never on a later patch. > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:229: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413324353431040 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError _____ TestFinalizeFailOpen.test_wav_build_failure_does_not_break_finalize ______ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3ec68cf9a0> def test_wav_build_failure_does_not_break_finalize(self, monkeypatch): > s = _session() ^^^^^^^^^^ tests/unit_tests/wrappers/test_voice_session.py:260: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/unit_tests/wrappers/test_voice_session.py:48: in _session return start_session(thread_id="t1", sample_rate=sample_rate, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/_internal/voice/session.py:507: in start_session run = RunTree( langsmith/run_trees.py:398: in infer_defaults values["id"] = uuid7_from_datetime(now) ^^^^^^^^^^^^^^^^^^^^^^^^ langsmith/uuid.py:36: in uuid7_from_datetime return _uuid7(nanoseconds) ^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nanoseconds = 1790413324643661056 def uuid7(nanoseconds: int | None = None) -> uuid.UUID: """Generate a UUID from a Unix timestamp in nanoseconds and random bits. UUIDv7 objects feature monotonicity within a millisecond. Args: nanoseconds: Optional ns timestamp. If not provided, uses current time. """ # --- 48 --- -- 4 -- --- 12 --- -- 2 -- --- 30 --- - 32 - # unix_ts_ms | version | counter_hi | variant | counter_lo | random # # 'counter = counter_hi | counter_lo' is a 42-bit counter constructed # with Method 1 of RFC 9562, §6.2, and its MSB is set to 0. # # 'random' is a 32-bit random value regenerated for every new UUID. # # If multiple UUIDs are generated within the same millisecond, the LSB # of 'counter' is incremented by 1. When overflowing, the timestamp is # advanced and the counter is reset to a random 42-bit integer with MSB # set to 0. # For now, just delegate to the uuid_utils implementation if nanoseconds is None: return _uuid_utils_uuid7() seconds, nanos = _to_timestamp_and_nanos(nanoseconds) > return _uuid_utils_uuid7(timestamp=seconds, nanos=nanos) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E TypeError: uuid7() got an unexpected keyword argument 'timestamp' langsmith/_internal/_uuid.py:46: TypeError =============================== warnings summary =============================== ../../../../../usr/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:188 /usr/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:188: UserWarning: OpenTelemetry packages are not installed. Install optional OpenTelemetry dependencies with: pip install langsmith[otel] exec(co, module.__dict__) ../../../../../usr/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:188 /usr/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:188: DeprecationWarning: langsmith.wrappers._openai_agents is deprecated and has been moved to langsmith.integrations.openai_agents_sdk. Please update your imports. exec(co, module.__dict__) tests/unit_tests/evaluation/test_runner.py: 22 warnings /build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py:490: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead asyncio.iscoroutinefunction(target) tests/unit_tests/evaluation/test_runner.py: 17 warnings /build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_arunner.py:1352: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead if not asyncio.iscoroutinefunction(target) and not _is_langchain_runnable(target): tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[False-False-False] /build/python-langsmith/src/langsmith-sdk/python/langsmith/evaluation/_runner.py:396: LangSmithBetaWarning: 'upload_results' parameter is in beta. _warn_once("'upload_results' parameter is in beta.") tests/unit_tests/test_async_client.py::test_async_create_feedback_includes_trace_id_and_feedback_id /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_async_client.py:432: LangSmithWarning: Creating feedback for a run without session_id is deprecated and will stop working in a future release. See https://docs.langchain.com/langsmith/smithdb-sdk-migration-feedback#feedback-create feedback = await client.create_feedback( tests/unit_tests/test_async_client.py::test_list_runs_child_run_ids_deprecation_warning /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_async_client.py:704: DeprecationWarning: list_runs() is deprecated and will be removed after Jan 31, 2027. Use client.runs.query() instead. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. async for _ in client.list_runs( tests/unit_tests/test_beta_evals.py::test_compute_test_metrics_deprecation_warning /build/python-langsmith/src/langsmith-sdk/python/langsmith/_internal/_beta_decorator.py:85: LangSmithBetaWarning: Function compute_test_metrics is in beta. return func(*args, **kwargs) tests/unit_tests/test_client.py: 123 warnings /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:895: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead and not asyncio.iscoroutinefunction(getattr(Client, method)) tests/unit_tests/test_client.py: 123 warnings /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:902: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead and asyncio.iscoroutinefunction(getattr(Client, method)) tests/unit_tests/test_client.py::test_create_feedback_string_source_type[api] tests/unit_tests/test_client.py::test_create_feedback_string_source_type[model] /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:2149: LangSmithWarning: Creating feedback for a run without session_id is deprecated and will stop working in a future release. See https://docs.langchain.com/langsmith/smithdb-sdk-migration-feedback#feedback-create client.create_feedback( tests/unit_tests/test_client.py::test_create_feedback_can_opt_out_of_extending_trace_retention /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:2170: LangSmithWarning: Creating feedback for a run without session_id is deprecated and will stop working in a future release. See https://docs.langchain.com/langsmith/smithdb-sdk-migration-feedback#feedback-create client.create_feedback( tests/unit_tests/test_client.py::test_create_feedback_opt_out_uses_direct_post_when_batching_available /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:2208: LangSmithWarning: Creating feedback for a run without session_id is deprecated and will stop working in a future release. See https://docs.langchain.com/langsmith/smithdb-sdk-migration-feedback#feedback-create client.create_feedback( tests/unit_tests/test_client.py::test_select_eval_results /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:3300: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ (1, expected.dict()), tests/unit_tests/test_client.py::test_select_eval_results /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:3302: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ (1, {"results": [expected.dict()]}), tests/unit_tests/test_client.py::test_select_eval_results tests/unit_tests/test_client.py::test_select_eval_results /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:3303: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ (2, {"results": [expected.dict(), expected.dict()]}), tests/unit_tests/test_client.py::test_select_eval_results /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:3319: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ **expected2.dict(exclude={"comment"}), tests/unit_tests/test_client.py::test_create_feedback_with_zstd_compression /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:4799: LangSmithWarning: Creating feedback for a run without session_id is deprecated and will stop working in a future release. See https://docs.langchain.com/langsmith/smithdb-sdk-migration-feedback#feedback-create client.create_feedback( tests/unit_tests/test_client.py::test_list_runs_child_run_ids_deprecation_warning /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_client.py:6616: DeprecationWarning: list_runs() is deprecated and will be removed after Jan 31, 2027. Use client.runs.query() instead. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. client.list_runs( tests/unit_tests/test_insights_report.py::test_get_insights_report_basic_metadata /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/test_insights_report.py:93: LangSmithBetaWarning: Function get_insights_report is in beta. result = client.get_insights_report( tests/unit_tests/wrappers/test_livekit.py::TestAutomaticSessionReport::test_configured_processor_installs_the_same_automatic_hook /build/python-langsmith/src/langsmith-sdk/python/tests/unit_tests/wrappers/test_livekit.py:734: LangSmithBetaWarning: Function configure_livekit is in beta. proc = configure_livekit(downstream_processor=MagicMock()) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ======================= the following tests were retried ======================= test_traceable_input_attachments failed on attempt 1! Retrying! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' test_traceable_input_attachments failed on attempt 2! Retrying! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' test_traceable_input_attachments failed on attempt 3! Retrying! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' test_traceable_input_attachments failed after 4 attempts! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' test_traceable_input_attachments failed on attempt 1! Retrying! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' test_traceable_input_attachments failed on attempt 2! Retrying! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' test_traceable_input_attachments failed on attempt 3! Retrying! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' test_traceable_input_attachments failed after 4 attempts! Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 361, in from_call result: TResult | None = func() ~~~~^^ TypeError: uuid7() got an unexpected keyword argument 'timestamp' =========================== end of test retry report =========================== =========================== short test summary info ============================ FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_feedback_includes_experiment_session_id_and_run_start_time FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_feedback_includes_experiment_id_and_start_time FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[False-False-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[False-False-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[False-True-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[False-True-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[True-False-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[True-False-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[True-True-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_evaluate_results[True-True-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[False-False-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[False-False-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[False-True-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[False-True-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[True-False-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[True-False-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[True-True-False] FAILED tests/unit_tests/evaluation/test_runner.py::test_aevaluate_results[True-True-True] FAILED tests/unit_tests/evaluation/test_runner.py::test_passing_kwargs_is_working FAILED tests/unit_tests/test_anonymizer.py::test_replacer_declared_in_traceable FAILED tests/unit_tests/test_anonymizer.py::test_secret_anonymizer_in_traceable FAILED tests/unit_tests/test_client.py::test_run_tree_get_url_uses_v2_endpoint[instance_flags0] FAILED tests/unit_tests/test_client.py::test_run_tree_get_url_uses_v2_endpoint[instance_flags1] FAILED tests/unit_tests/test_client.py::test_run_tree_get_url_builds_url_locally_on_clickhouse_only FAILED tests/unit_tests/test_client.py::test_run_tree_get_url_is_cached - Typ... FAILED tests/unit_tests/test_client.py::test_run_tree_get_url_falls_back_when_backend_call_fails[failure0] FAILED tests/unit_tests/test_client.py::test_run_tree_get_url_falls_back_when_backend_call_fails[failure1] FAILED tests/unit_tests/test_client.py::test_run_tree_get_url_without_session_uses_tracer_project FAILED tests/unit_tests/test_multiple_endpoints.py::TestLangsmithRunsEndpoints::test_run_tree_with_replicas FAILED tests/unit_tests/test_replica_endpoints.py::TestRunTreeReplicas::test_run_tree_with_write_replicas FAILED tests/unit_tests/test_replica_endpoints.py::TestRunTreeReplicas::test_run_tree_with_authorization_and_cookie FAILED tests/unit_tests/test_replica_endpoints.py::TestRunTreeReplicas::test_run_tree_with_new_replicas FAILED tests/unit_tests/test_replica_endpoints.py::TestRunTreeReplicas::test_run_tree_with_service_auth_replicas FAILED tests/unit_tests/test_replica_endpoints.py::TestRunTreeReplicas::test_run_tree_patch_with_replicas FAILED tests/unit_tests/test_replica_endpoints.py::TestRunTreeReplicas::test_run_tree_preserves_env_replica_project_names FAILED tests/unit_tests/test_replica_endpoints.py::TestBaggageReplicaParsing::test_run_tree_to_headers_does_not_propagate_replica_auth FAILED tests/unit_tests/test_replica_run_ids.py::test_ancestor_id_derives_identically_from_parent_and_child FAILED tests/unit_tests/test_run_helpers.py::test_traceable_iterator[None-True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_iterator[None-False] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_iterator[foo-True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_iterator[foo-False] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_stream[async0-True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_stream[async0-False] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_stream[async1-True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_stream[async1-False] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_iterator[True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_iterator[False] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_stream_context_manager_returns_wrapper FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_stream_context_manager_returns_wrapper FAILED tests/unit_tests/test_run_helpers.py::test_traceable_project_name - Ty... FAILED tests/unit_tests/test_run_helpers.py::test_async_generator - TypeError... FAILED tests/unit_tests/test_run_helpers.py::test_generator - TypeError: uuid... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_regular[True] - T... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_regular[local] - ... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async[True] - Typ... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async[local] - Ty... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_to_trace[True] - ... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_to_trace[local] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_to_atrace[True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_to_atrace[local] FAILED tests/unit_tests/test_run_helpers.py::test_trace_to_traceable[True] - ... FAILED tests/unit_tests/test_run_helpers.py::test_trace_to_traceable[local] FAILED tests/unit_tests/test_run_helpers.py::test_client_not_passed_when_traceable_parent FAILED tests/unit_tests/test_run_helpers.py::test_client_passed_when_trace_parent FAILED tests/unit_tests/test_run_helpers.py::test_client_not_called_when_enabled_local FAILED tests/unit_tests/test_run_helpers.py::test_from_runnable_config - Type... FAILED tests/unit_tests/test_run_helpers.py::test_trace_nested_enable_disable FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_exception[True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_exception[False] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_gen_exception[True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_gen_exception[False] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_gen_exception[True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_gen_exception[False] FAILED tests/unit_tests/test_run_helpers.py::test_process_inputs_outputs - Ty... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_input_attachments FAILED tests/unit_tests/test_run_helpers.py::test_traceable_iterator_process_chunk FAILED tests/unit_tests/test_run_helpers.py::test_first_token_event_only - Ty... FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_iterator_process_chunk FAILED tests/unit_tests/test_run_helpers.py::test_set_run_metadata_updates_current_run_tree FAILED tests/unit_tests/test_run_helpers.py::test_traceable_enabled_true_overrides_context FAILED tests/unit_tests/test_run_helpers.py::test_traceable_enabled_none_respects_context_enabled FAILED tests/unit_tests/test_run_helpers.py::test_traceable_async_enabled_true_overrides_context FAILED tests/unit_tests/test_run_helpers.py::test_traceable_enabled_does_not_propagate FAILED tests/unit_tests/test_run_helpers.py::test_traceable_nested_outer_enabled_inner_disabled FAILED tests/unit_tests/test_run_helpers.py::test_traceable_disabled_clears_parent_context FAILED tests/unit_tests/test_run_helpers.py::test_traceable_enabled_matrix[None-True-True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_enabled_matrix[True-True-True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_enabled_matrix[True-False-True] FAILED tests/unit_tests/test_run_helpers.py::test_traceable_triple_decorated FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[sync-True] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[sync-False] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[async-True] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[async-False] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[generator-True] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[generator-False] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[async_generator-True] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_handled_exceptions[async_generator-False] FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_unhandled_exceptions FAILED tests/unit_tests/test_run_helpers.py::TestTraceableExceptionsToHandle::test_multiple_exception_types FAILED tests/unit_tests/test_run_helpers.py::test_ls_message_view_exclude_metadata_round_trips_to_run FAILED tests/unit_tests/test_run_helpers.py::test_ls_message_view_exclude_metadata_cascades_to_child_runs FAILED tests/unit_tests/test_run_helpers.py::test_tracing_context_replicas_apply_to_distributed_root_run[dict] FAILED tests/unit_tests/test_run_helpers.py::test_tracing_context_replicas_apply_to_distributed_root_run[str] FAILED tests/unit_tests/test_run_tree_gc_leak.py::TestRunTreeGCLeak::test_runtree_leak_with_call_later FAILED tests/unit_tests/test_run_tree_gc_leak.py::TestRunTreeGCLeak::test_runtree_leak_with_create_task_long_running FAILED tests/unit_tests/test_run_tree_gc_leak.py::TestRunTreeGCLeak::test_runtree_no_leak_without_context_copy FAILED tests/unit_tests/test_run_tree_gc_leak.py::TestRunTreeGCLeak::test_runtree_weakref_collection FAILED tests/unit_tests/test_run_tree_gc_leak.py::TestRunTreeGCLeak::test_nested_traceable_leak FAILED tests/unit_tests/test_run_trees.py::test_run_tree_accepts_tpe - TypeEr... FAILED tests/unit_tests/test_run_trees.py::test_lazy_rt - TypeError: uuid7() ... FAILED tests/unit_tests/test_run_trees.py::test_json_serializable - TypeError... FAILED tests/unit_tests/test_run_trees.py::test_run_tree_events_not_null - Ty... FAILED tests/unit_tests/test_run_trees.py::test_nested_run_trees_from_dotted_order FAILED tests/unit_tests/test_run_trees.py::test_distributed_tracing_slice_parent_id FAILED tests/unit_tests/test_run_trees.py::test_distributed_tracing_remap_for_project FAILED tests/unit_tests/test_run_trees.py::test_distributed_parent_id_from_headers FAILED tests/unit_tests/test_run_trees.py::test_remap_for_project - TypeError... FAILED tests/unit_tests/test_run_trees.py::test_inputs_attachment_moved_to_attachments FAILED tests/unit_tests/test_run_trees.py::test_create_child_enforces_timestamp_order FAILED tests/unit_tests/test_run_trees.py::test_create_child_propagates_thread_metadata FAILED tests/unit_tests/test_run_trees.py::test_trace_start_time - TypeError:... FAILED tests/unit_tests/test_run_trees.py::test_to_headers_does_not_serialize_replicas FAILED tests/unit_tests/test_run_trees.py::test_runtree_accepts_pydantic_basemodel_as_constructor_inputs FAILED tests/unit_tests/test_run_trees.py::test_runtree_accepts_pydantic_basemodel_as_constructor_outputs FAILED tests/unit_tests/test_run_trees.py::test_runtree_end_accepts_pydantic_basemodel_outputs FAILED tests/unit_tests/test_run_trees.py::test_runtree_set_accepts_nested_pydantic_basemodel_inputs FAILED tests/unit_tests/test_run_trees.py::test_runtree_set_accepts_pydantic_basemodel_outputs FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[None-None-None-False] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-true-None-False] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-TRUE-None-False] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-1-None-False] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-false-None-True] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-bogus-None-True] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[LANGCHAIN_EXCLUDE_INPUTS_ON_PATCH-true-None-False] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[LANGSMITH_EXCLUDE_INPUTS_ON_PATCH-true-False-True] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag[None-None-True-False] FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_env_flag_with_replicas FAILED tests/unit_tests/test_run_trees.py::test_patch_exclude_inputs_flag_is_cached FAILED tests/unit_tests/test_runtime_overrides.py::test_async_trace_context_propagates_under_override FAILED tests/unit_tests/test_runtime_overrides.py::test_traceable_uses_override FAILED tests/unit_tests/test_utils.py::test_tracing_enabled - TypeError: uuid... FAILED tests/unit_tests/test_uuid_v7.py::test_traceable_uses_uuidv7_and_start_time_matches_run_id FAILED tests/unit_tests/test_uuid_v7.py::test_run_tree_default_uuidv7_and_start_time_match FAILED tests/unit_tests/test_uuid_v7.py::test_run_tree_explicit_start_time_matches_id FAILED tests/unit_tests/test_uuid_v7.py::test_post_and_patch_include_run_type_and_start_time FAILED tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestMissingSubagentLLMRuns::test_creates_missing_llm_run_from_transcript FAILED tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestMissingSubagentLLMRuns::test_skips_already_seen_message_ids FAILED tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestSessionBinding::test_bound_hook_uses_client_session FAILED tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestSessionBinding::test_bound_tool_handler_uses_client_session FAILED tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestSessionBinding::test_unbound_tool_handler_finds_registered_session_by_args FAILED tests/unit_tests/wrappers/test_gemini_live.py::TestWrapper::test_proxy_is_transparent_and_tracing_is_fail_open FAILED tests/unit_tests/wrappers/test_gemini_live.py::TestWrapper::test_transcript_usage_llm_and_markers FAILED tests/unit_tests/wrappers/test_gemini_live.py::TestWrapper::test_function_call_span_and_interruption FAILED tests/unit_tests/wrappers/test_gemini_live.py::TestWrapper::test_parallel_tool_calls_are_matched_by_id FAILED tests/unit_tests/wrappers/test_gemini_live.py::TestWrapper::test_incomplete_tool_call_is_closed_with_error FAILED tests/unit_tests/wrappers/test_gemini_live.py::TestWrapper::test_audio_is_bounded_and_replicas_propagate FAILED tests/unit_tests/wrappers/test_gemini_live.py::TestWrapper::test_body_error_is_recorded_and_propagated FAILED tests/unit_tests/wrappers/test_openai_realtime.py::TestFailOpen::test_broken_tracer_does_not_break_the_loop FAILED tests/unit_tests/wrappers/test_openai_realtime.py::TestFailOpen::test_event_without_type_is_skipped FAILED tests/unit_tests/wrappers/test_openai_realtime.py::TestEndToEnd::test_single_turn_transcript_latency_and_llm FAILED tests/unit_tests/wrappers/test_openai_realtime.py::TestEndToEnd::test_barge_in_flags_interrupted_turn FAILED tests/unit_tests/wrappers/test_openai_realtime.py::TestEndToEnd::test_max_audio_seconds_bounds_recording FAILED tests/unit_tests/wrappers/test_openai_realtime.py::TestEndToEnd::test_replicas_propagate_to_root_and_children FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_history_turn_collapses_partials_and_emits_spans FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_hold_last_defers_final_message_until_teardown FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_tool_start_and_end_become_one_tool_span FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_tool_end_without_start_falls_back_to_point_in_time FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_orphan_tool_span_closed_with_error_at_teardown FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_audio_interrupted_flags_open_turn FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_raw_model_event_user_transcript FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_response_done_usage_attached_to_assistant_span FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_response_done_usage_consumed_once FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestTracer::test_on_message_called_once_per_finalized_line FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestProxy::test_enters_exits_underlying_and_traces FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestProxy::test_broken_tracer_does_not_break_loop FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestProxy::test_finalize_failure_still_exits_underlying_session FAILED tests/unit_tests/wrappers/test_openai_realtime_agents.py::TestProxy::test_max_audio_seconds_bounds_recording FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_start_session_converts_seconds_to_bytes FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_bounded_cap_by_default FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_none_disables_cap FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_user_channel_capped_and_flagged_once FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_cap_is_per_channel FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_truncation_surfaced_in_root_metadata FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_finalize_caps_wav_duration FAILED tests/unit_tests/wrappers/test_voice_session.py::TestAudioBound::test_natural_play_duration_cap_marks_audio_truncated FAILED tests/unit_tests/wrappers/test_voice_session.py::TestIntegrationMetadata::test_stamped_on_root FAILED tests/unit_tests/wrappers/test_voice_session.py::TestIntegrationMetadata::test_unresolved_version_recorded_as_none FAILED tests/unit_tests/wrappers/test_voice_session.py::TestIntegrationMetadata::test_caller_metadata_cannot_shadow_integration FAILED tests/unit_tests/wrappers/test_voice_session.py::TestTranscriptAndTitle::test_add_message_strips_and_drops_empty FAILED tests/unit_tests/wrappers/test_voice_session.py::TestTranscriptAndTitle::test_set_title_first_nonempty_wins FAILED tests/unit_tests/wrappers/test_voice_session.py::TestTranscriptAndTitle::test_finalize_rolls_transcript_onto_root FAILED tests/unit_tests/wrappers/test_voice_session.py::TestTurns::test_turn_groups_messages_and_carries_metadata FAILED tests/unit_tests/wrappers/test_voice_session.py::TestTurns::test_add_turn_metadata_noop_without_open_turn FAILED tests/unit_tests/wrappers/test_voice_session.py::TestRecordLlm::test_default_inputs_drop_trailing_assistant FAILED tests/unit_tests/wrappers/test_voice_session.py::TestRecordLlm::test_usage_lands_on_the_run_before_it_is_finalized FAILED tests/unit_tests/wrappers/test_voice_session.py::TestFinalizeFailOpen::test_wav_build_failure_does_not_break_finalize ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestToolUseSuccessFlow::test_success_flow ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestToolUseFailureFlow::test_failure_flow ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestSubagentFlow::test_subagent_nested_under_agent_tool ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestSubagentFlow::test_tool_inside_subagent_nests_under_subagent ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestSubagentFlow::test_subagent_findable_after_stop ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestSubagentFlow::test_subagent_stop_and_post_tool_use_set_outputs ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestTranscriptPathCapture::test_captures_transcript_path_from_first_hook ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestTranscriptPathCapture::test_does_not_overwrite_on_subsequent_hooks ERROR tests/unit_tests/wrappers/test_claude_agent_sdk_hooks.py::TestTranscriptPathCapture::test_clear_active_tool_runs_resets_transcript_path = 196 failed, 1801 passed, 7 skipped, 9 deselected, 1 xfailed, 304 warnings, 9 errors, 2 retried, 1 rerun in 313.11s (0:05:13) = ==> ERROR:(B A failure occurred in check().(B  Aborting...(B ]3008;end=c71e458d19f24898aefbfd542a235321\[!p]104\[?7h]3008;end=3de6ac746d9544e2a75d0574add0174b\==> ERROR:(B Build failed, check /var/lib/archbuild/extra-riscv64/felix-0/build(B [?12l[?25h[?12l[?25h]3008;end=18ff7518b0404f34b0026824c67a5c97\[?12l[?25hreceiving incremental file list python-langsmith-0.11.2-1.2-riscv64-build.log python-langsmith-0.11.2-1.2-riscv64-check.log python-langsmith-0.11.2-1.2-riscv64-prepare.log sent 81 bytes received 66,198 bytes 44,186.00 bytes/sec total size is 1,114,235 speedup is 16.81