Skip to content

Instantly share code, notes, and snippets.

View samuela's full-sized avatar

Samuel Ainsworth samuela

View GitHub Profile
let
# Last updated: 2023-09-29. Check for new commits at https://status.nixos.org.
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/f3dab3509afca932f3f4fd0908957709bb1c1f57.tar.gz";
stage0 = import nixpkgs {};
nixpkgs-patched = stage0.applyPatches {
name = "nixpkgs-patched";
src = nixpkgs;
patches = [
# https://github.com/NixOS/nixpkgs/pull/258084
{ lib
, stdenv
, buildPythonPackage
, cmake
, fetchFromGitHub
, gtest
, nbval
, numpy
, parameterized
, protobuf
{
outputs = { nixpkgs, ... }:
{ devShell.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.mkShell { }; };
}
{
inputs = { flake-utils.url = "github:numtide/flake-utils"; };
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
{
devShell = nixpkgs.legacyPackages."${system}".mkShell { };
});
}
=================================== FAILURES ===================================
___ LaxControlFlowTest.testScanGrad_jit_scan=False_jit_f=False_impl=unroll2 ____
[gw3] darwin -- Python 3.10.10 /nix/store/7rjqb838snvvxcmpvck1smfxhkwzqal5-python3-3.10.10/bin/python3.10
self = <lax_control_flow_test.LaxControlFlowTest testMethod=testScanGrad_jit_scan=False_jit_f=False_impl=unroll2>
jit_scan = False, jit_f = False
scan = functools.partial(<function scan at 0x1197827a0>, unroll=2)
@parameterized.named_parameters(
{"testcase_name": f"_{jit_scan=}_{jit_f=}_impl={scan_name}",
This file has been truncated, but you can view the full file.
❯ nix-build -A python3Packages.apache-beam
this derivation will be built:
/nix/store/xwlaidkqf3v08xz239mflhbr5aharbs4-python3.10-apache-beam-2.44.0.drv
building '/nix/store/xwlaidkqf3v08xz239mflhbr5aharbs4-python3.10-apache-beam-2.44.0.drv'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
❯ nixpkgs-review pr --post-result --build-args "--max-jobs 64" 211301
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/211301/head:refs/nixpkgs-review/1
remote: Enumerating objects: 240, done.
remote: Counting objects: 100% (205/205), done.
remote: Compressing objects: 100% (79/79), done.
remote: Total 240 (delta 146), reused 166 (delta 123), pack-reused 35
Receiving objects: 100% (240/240), 711.46 KiB | 11.29 MiB/s, done.
Resolving deltas: 100% (147/147), completed with 54 local objects.
From https://github.com/NixOS/nixpkgs
a4f710e8584..a1b2177ec47 master -> refs/nixpkgs-review/0
❯ nixpkgs-review pr --post-result --build-args "--max-jobs 64" 211301
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/211301/head:refs/nixpkgs-review/1
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (5/5), done.
remote: Total 7 (delta 5), reused 5 (delta 5), pack-reused 2
Unpacking objects: 100% (7/7), 624 bytes | 52.00 KiB/s, done.
From https://github.com/NixOS/nixpkgs
0b3471bb54a..a4f710e8584 master -> refs/nixpkgs-review/0
+ c9f82d5d590...0fe2a8087dc refs/pull/211301/head -> refs/nixpkgs-review/1 (forced update)
$ git worktree add /home/sam.ainsworth/.cache/nixpkgs-review/pr-211301/nixpkgs a4f710e8584dea15a801b75a03abc400bec6c683
sam.ainsworth@cs-tze7x4cv-gpu-homedir-350808:~$ sudo rm /etc/bashrc.backup-before-nix /etc/zshrc.backup-before-nix /etc/profile.d/nix.sh.backup-before-nix /etc/bash.bashrc.backup-before-nix /etc/zsh/zshrc.backup-before-nix
rm: cannot remove '/etc/bashrc.backup-before-nix': No such file or directory
rm: cannot remove '/etc/zshrc.backup-before-nix': No such file or directory
rm: cannot remove '/etc/profile.d/nix.sh.backup-before-nix': No such file or directory
rm: cannot remove '/etc/bash.bashrc.backup-before-nix': No such file or directory
sam.ainsworth@cs-tze7x4cv-gpu-homedir-350808:~$ { echo "60a518fa8b820b87fb6dbba01532aab0 /tmp/install-nix.sh" | md5sum --check -; } && { yes | sh /tmp/install-nix.sh --daemon; }
/tmp/install-nix.sh: OK
downloading Nix 2.12.0 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.12.0/nix-2.12.0-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.2R8fuFmqso'...
% Total % Received % Xferd Average Speed Time Time Time Current
@samuela
samuela / bug.py
Created June 23, 2022 00:30
wandb Artifacts bug
# See https://github.com/wandb/client/issues/3823
import wandb
with wandb.init(tags=["DELETEME"]) as wandb_run:
artifact = wandb.Artifact("deleteme", type="deleteme")
for epoch in range(100):
print(f"Epoch {epoch}")
with artifact.new_file(f"checkpoint{epoch}", mode="wb") as f:
contents = open("/dev/urandom", "rb").read(975244241)