-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Situation: Fawkes is a brilliant research project. I personally enjoy…
…ed reading the research paper. However, numerous issues and pull requests have resulted from how difficult it is to run after initially downloading it due to poorly documented python version requirements and compatibility collapse with numerous dependencies following ~4 years of drift. Example links in the last paragraph for brevity. Action: I rewrote the setup code to depend on pyenv and poetry allowing us to explicitly require the use of python 3.9.0 rather than having users guess at how best to execute the code. I've used stricter dependency requirements (lots of ~= in pyproject.toml dependencies) as the project is unlikely to be maintained regularly and reviving the code required a lot of dependency incompatibility navigation we should avoid for future users. Result: A new user can build this great research project with ~10 lines! A big win in my opinion. Some relevant pull requests and issues. #168 #158 #186 #178
- Loading branch information
Showing
8 changed files
with
1,509 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# Publish the package | ||
poetry publish --build | ||
|
||
# Get the current version | ||
VERSION=$(poetry version -s) | ||
|
||
# Create and push a Git tag | ||
git tag v$VERSION | ||
git push origin v$VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[project] | ||
name = "fawkes" | ||
version = "0.1.0" | ||
description = "" | ||
authors = [ | ||
{name = "Shawn Shan", email = "[email protected]"} | ||
] | ||
license = "BSD" | ||
homepage = "https://github.com/Shawn-Shan/fawkes" | ||
keywords = ["fawkes", "privacy", "ML"] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: System :: Monitoring", | ||
] | ||
|
||
readme = "README.md" | ||
requires-python = "~=3.9" | ||
dependencies = [ | ||
"numpy (>=1.22,<2.0)", | ||
"tensorflow-io-gcs-filesystem (>=0.23.1,<0.24.0)", | ||
"tensorflow (==2.12)", | ||
"keras (>=2.12.0,<2.13.0)", | ||
"setuptools (>=75.8.0,<76.0.0)", | ||
"mtcnn (>=0.1.0,<0.2.0)", | ||
"pillow (>=11.1.0,<12.0.0)", | ||
"bleach (>=6.2.0,<7.0.0)", | ||
"pyqt5 (==5.15.2)", | ||
# Despite the name amd runs this implementation fine. | ||
# There's no built in poetry env variable that'll tell us if an AMD GPU is present (which would imply tensorflow-rocm could be a more efficient implementation). | ||
# A script could probably be built that intelligently runs pip install under the hood but this is hard to track for a newbie. | ||
"tensorflow-intel (==2.12.0)" | ||
|
||
] | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "~3.9" | ||
|
||
[tool.poetry.scripts] | ||
fawkes = "fawkes:main" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core>=2.0.0,<3.0.0"] | ||
build-backend = "poetry.core.masonry.api" |