| 9 Nov 2023 |
matthewcroughan | There are other programs in this python chain, that use the safetensors that is being provided correctly | 19:17:52 |
matthewcroughan | The first thing I did was put safetensors in the propagatedBuildInputs of eveyrthing I could think of | 19:18:12 |
matthewcroughan | it did not seem to change anything | 19:18:17 |
matthewcroughan | * The first thing I did was put safetensors in the propagatedBuildInputs of everything I could think of | 19:18:31 |
matthewcroughan | Why does safetensors have no metadata? That's what I don't understand. And how do I give it the metadata it needs? K900 ⚡️ | 19:21:49 |
matthewcroughan | safetensors = super.safetensors.overridePythonAttrs
(
old: {
sourceRoot = "safetensors-0.4.0/bindings/python";
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = ./nix/safetensors/Cargo.lock;
};
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
pkgs.rustPlatform.cargoSetupHook
pkgs.rustPlatform.maturinBuildHook
];
}
);
| 19:21:54 |
K900 | It doesn't have "no metadata" | 19:21:58 |
K900 | It's missing something | 19:22:06 |
matthewcroughan | Oh, it can't find the package | 19:22:17 |
matthewcroughan | * Oh, it can't find the package? | 19:22:19 |
K900 | You can try calling importlib.metadata.version("safetensors") in a Python shell yourself | 19:22:20 |
matthewcroughan | PackageNotFoundError | 19:22:23 |
K900 | And see why it fails | 19:22:24 |
matthewcroughan | ls result/lib/python3.11/site-packages/safetensors_
safetensors_python-0.4.0.dist-info/ safetensors_rust/
| 19:24:05 |
matthewcroughan | grrr | 19:24:21 |
matthewcroughan | it's not ending up in the site-packages | 19:24:26 |
matthewcroughan | but the dist-info is | 19:24:44 |
K900 | The dist-info is for safetensors_python | 19:25:56 |
K900 | But the package it's looking for is safetensors | 19:26:04 |
K900 | Have fun | 19:26:07 |
matthewcroughan | safetensors definitely gets built as part of building this application, I'm not sure why it doesn't end up in site-packages | 19:26:52 |
matthewcroughan | is it because the package is misnamed as safetensors_rust ? | 19:28:41 |
matthewcroughan | result/lib/python3.11/site-packages/safetensors_rust:
__init__.py __pycache__ safetensors_rust.cpython-311-x86_64-linux-gnu.so
| 19:28:48 |
K900 | I don't know | 19:29:21 |
matthewcroughan | hmm nope, tokenizers is a rust binding that is built in the same way, and it is correctly positioned | 19:29:32 |
matthewcroughan | ls result/lib/python3.11/site-packages/tokenizers
tokenizers/ tokenizers_python-0.14.1.dist-info/
user: matthew 🌐 swordfish in privateGPT on main [!?⇡] is 📦 v0.1.0 via 🐍
✦ ❯ ls result/lib/python3.11/site-packages/tokenizers
__init__.py __pycache__ tokenizers.cpython-311-x86_64-linux-gnu.so
| 19:29:40 |