Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpt2tc: init at 2020-12-30 #116287

Merged
merged 1 commit into from Apr 6, 2021
Merged

gpt2tc: init at 2020-12-30 #116287

merged 1 commit into from Apr 6, 2021

Conversation

anna328p
Copy link
Member

Motivation for this change

gpt2tc: Text Completion and Compression using GPT-2
gpt2tc is a small program using the GPT-2 language model to complete and compress (English) texts. It has no external dependency, requires no GPU and is quite fast.

Program by Fabrice Bellard. Source not available.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@r-rmcgibbo
Copy link

Result of nixpkgs-review pr 116287 at c51001ae run on x86_64-linux 1

1 package built successfully:
1 suggestion:
  • warning: missing-patch-comment

    Please add a comment on the line above, explaining the purpose of this patch.
    Near pkgs/tools/text/gpt2tc/default.nix:13:5:

       |
    13 |     ./0001-add-python-shebang.patch
       |     ^
    

@anna328p
Copy link
Member Author

Result of nixpkgs-review pr 116287 at c51001a run on x86_64-linux 1
1 package built successfully:
1 suggestion:

* warning: [missing-patch-comment](https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-patch-comment.md)
  Please add a comment on the line above, explaining the purpose of this patch.
  Near pkgs/tools/text/gpt2tc/default.nix:13:5:
  ```
     |
  13 |     ./0001-add-python-shebang.patch
     |     ^
  ```

Revised.

pkgs/tools/text/gpt2tc/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/gpt2tc/default.nix Outdated Show resolved Hide resolved
pkgs/tools/text/gpt2tc/default.nix Outdated Show resolved Hide resolved
@anna328p
Copy link
Member Author

Revised.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the project isn't hosted on a normal version control platform, but it would be nice to upstream the fixes, and then package a new version with the enhancements

Comment on lines +23 to +25
buildInputs = [
(python3.withPackages (p: with p; [ numpy tensorflow ]))
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is needed at runtime, you should use a wrapProgram passing it on the PATH before executing the program.

Otherwise this python environment will only be present during the build.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The program seems to be automatically getting wrapped (the shebang gets modified)?

Comment on lines +6 to +7
+#!/usr/bin/env python3
+
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be upstreamed as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to email Fabrice Bellard about this.

@SuperSandro2000
Copy link
Member

@ofborg eval

@SuperSandro2000 SuperSandro2000 merged commit 75bef08 into NixOS:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants