This repository was archived by the owner on Apr 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
83 lines (71 loc) · 1.92 KB
/
flake.nix
File metadata and controls
83 lines (71 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
python-packages = ps: with ps; [
jupyterlab
torch
tqdm
matplotlib
langchain
sentence-transformers
transformers
tokenizers
tiktoken
pandas
psycopg
annoy
openai
black
ipython
coverage
(
buildPythonPackage rec {
pname = "mentat";
version = "1.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-r+rWxTLL4g1qJjfep9Uf4zdzZ4ISenonNq4k9P/tPvk=";
};
doCheck = false;
propagatedBuildInputs = [
# Specify dependencies
pkgs.python3Packages.backoff
pkgs.python3Packages.termcolor
pkgs.python3Packages.sentry-sdk
pkgs.python3Packages.python-dotenv
];
}
)
];
in
{
devShell.${system} = pkgs.mkShell {
buildInputs = with pkgs; with pkgs.python310Packages; [
(pkgs.python3.withPackages python-packages)
pyright
(writeShellScriptBin "ipython-simple-prompt" ''
ipython --simple-prompt --nosep "$@"
'')
# (writeShellScriptBin "wb" ''
# docker run --rm -it maxlath/wikibase-cli "$@"
# '')
];
shellHook = ''
${pkgs.figlet}/bin/figlet "askwikidata"
cat << _EOF
# Unzip all cache files provided with the askwikidata repository.
bunzip2 --force --keep *.bz2
# Generate text representations of Wikidata items.
python text_representation.py > /tmp/text_representations.log
# Start interactive REPL.
python repl.py
# Run evaluation.
python eval.py
_EOF
'';
};
};
}