!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

310 Members
https://github.com/nix-community/poetry2nix56 Servers

Load older messages


SenderMessageTime
9 Nov 2023
@k900:0upti.meK900Could also not work23:33:14
@matthewcroughan:defenestrate.itmatthewcroughan because in this case, the transformers can't import tokenizers.models and the one from nixpkgs can 23:33:23
@matthewcroughan:defenestrate.itmatthewcroughanthey seem in the logs to build the same 23:33:45
10 Nov 2023
@matthewcroughan:defenestrate.itmatthewcroughan K900 ⚡️: the reason is because the version of transformers in the poetry.lock of privateGPT is 0.14.1 01:00:02
@matthewcroughan:defenestrate.itmatthewcroughanwhereas the version that had the method is 0.14.0, not 0.14.101:00:04
@matthewcroughan:defenestrate.itmatthewcroughanthey removed the method it's looking for in 0.14.101:04:20
@matthewcroughan:defenestrate.itmatthewcroughansemantic versioning fail01:04:21
@adis:blad.isadisbladisThis is really cool if I say so myself https://github.com/adisbladis/pdm2nix/tree/master/tests/nested-poetry 03:31:10
@adis:blad.isadisbladis a is a PDM project
b is a Poetry project
03:31:20
@adis:blad.isadisbladishttps://github.com/adisbladis/pdm2nix/blob/master/lib/lock.nix#L314-L32803:32:19
@connorbaker:matrix.org@connorbaker:matrix.org changed their display name from connor (he/him) (UTC-4) to connor (he/him) (UTC-5).12:33:39
@pareto-optimal-dev:matrix.orgpareto-optimal-devmatthewcroughan Your flake built for me just now, I thought you'd want to know. I don't do much python programming anymore though, so I'm not sure what to do at the python prompt it drops me into to further test PrivateGPT. I tried `import PrivateGPT` so that later I could do `dir(PrivateGPT)` and discover how to run it, but that didn't work.16:31:58
@matthewcroughan:defenestrate.itmatthewcroughan pareto-optimal-dev: python -m private_gpt 17:22:42
@matthewcroughan:defenestrate.itmatthewcroughanpython is not for the faint of heart, it's the hardest ecosystem and language ever devised17:23:09
@pareto-optimal-dev:matrix.orgpareto-optimal-dev
In reply to @matthewcroughan:defenestrate.it
pareto-optimal-dev: python -m private_gpt
Oh... I should use nix shell rather than nix run then
21:49:38
@pareto-optimal-dev:matrix.orgpareto-optimal-dev
$ nix shell --refresh github:MatthewCroughan/privateGPT -c "python -m mem_gpt"
error: unable to execute 'python -m mem_gpt': No such file or directory

Maybe I'm still in a bad state because I cloned it before you force pushed?

21:51:16
@pareto-optimal-dev:matrix.orgpareto-optimal-dev *
$ nix shell --refresh github:MatthewCroughan/privateGPT -c bash -c "python -m mem_gpt"
/nix/store/zg2n0brrnziyb3cj37sqhlhikkvwn61h-python3-3.11.5-env/bin/python3.11: No module named mem_gpt

Maybe I'm still in a bad state because I cloned it before you force pushed?

21:52:00
@pareto-optimal-dev:matrix.orgpareto-optimal-devoh I feel silly21:54:54
@pareto-optimal-dev:matrix.orgpareto-optimal-devthat's what I get for not copy pasting21:55:12
@pareto-optimal-dev:matrix.orgpareto-optimal-dev
nix develop --refresh -c bash -c "python -m private_gpt"

seems working so far

21:55:26
11 Nov 2023
@maxpowerextreme:matrix.orgmaxpowerextreme joined the room.06:06:56
12 Nov 2023
@flomonster:matrix.orgflomonster joined the room.14:23:46
@flomonster:matrix.orgflomonster changed their display name from Florian Amsallem to flomonster.14:25:14
@flomonster:matrix.orgflomonsterHello, I've just made my first small contribution to the project. I'd love to get some feedback. https://github.com/nix-community/poetry2nix/pull/141315:11:52
@k900:0upti.meK900Thanks, queued for merge15:15:51
@captainkranch:matrix.orgDaniel García M joined the room.20:41:14
@captainkranch:matrix.orgDaniel García Mdid you solved this? I'm having the same issue21:26:38
@captainkranch:matrix.orgDaniel García M

I'm trying to build a project. It uses pydantic, which uses maturin. How do I add maturin to the overrides? maturin is written in rust... here is my default.nix:

{ pkgs ? import <nixpkgs> {} }:
let
  pypkgs-build-requirements = {
    annotated-types = [ "hatchling" ];
    urllib3 = [ "hatchling" ];
    pydantic-core = [ pkgs.maturin ];
  };
  overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend (self: super:
    builtins.mapAttrs (package: build-requirements:
      (builtins.getAttr package super).overridePythonAttrs (old: {
        buildInputs = (old.buildInputs or [ ]) ++ (builtins.map (pkg: if builtins.isString pkg then builtins.getAttr pkg super else pkg) build-requirements);
      })
    ) pypkgs-build-requirements
  );
in pkgs.poetry2nix.mkPoetryApplication {
  projectDir = ./.;
  overrides = overrides;
}

21:32:25
@captainkranch:matrix.orgDaniel García M

here is the pyproject.toml:

[tool.poetry]
name = "app"
version = "0.1.0"
description = ""
authors = ["danielg"]
readme = "README.md"
#packages = [{include = "src/scripts/*.py"}]

[tool.poetry.dependencies]
python = "^3.10"
dash = "^2.11.0"
plotly = "^5.15.0"
pandas = "^2.0.2"
dash-bootstrap-components = "^1.4.1"
python-dotenv = "^1.0.0"
pymysql = "^1.1.0"
sqlalchemy = "^2.0.17"
openpyxl = "^3.1.2"
pydantic = "^2.0"

[tool.poetry.scripts]
web-app = "poetry.console.application:main"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


21:33:41
@captainkranch:matrix.orgDaniel García M set a profile picture.21:34:22

Show newer messages


Back to Room ListRoom Version: 6