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

Added recipe for crypten #15720

Merged
merged 22 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions recipes/crypten/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Facebook, Inc. and its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 58 additions & 0 deletions recipes/crypten/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{% set name = "crypten" %}
{% set version = "0.4.0" %}


package:
name: {{ name|lower }}
version: {{ version }}

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: f9d76bc0ba1468cb77261b8d5486ee875266363310353a18aba948429aa24fda
- url: https://raw.githubusercontent.com/facebookresearch/CrypTen/main/requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need this file? It repeats the information in the meta.yaml file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will make a PR once this recipe is ready, and then make the change appropriately.

Copy link
Contributor

Choose a reason for hiding this comment

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

this recipe is nearly ready once you remove the requirements.txt source. You can then remove one level of nesting in your url list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but since I am not sure when the other PR would get merged, I was hoping to have the recipe available. I could then make for a stronger case for the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added the PR: facebookresearch/CrypTen#350

Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need to make the PR. that file is not necessary to be distributed. it is distributed as metadata along with the wheel or the conda package. Simply remove it from the recipe. You've copied the contents in the meta already.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, the commit right before that, 88f9835, did not run with the error that the requirements.txt file is not present [ref]:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/home/conda/staged-recipes/build_artifacts/crypten_1644693818666/work/setup.py", line 20, in <module>
      with open("requirements.txt") as f:
  FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh that is too bad. Yeah. this seems OK. however you aren't taking a specific tag or commit. I suspect this will be problematic in the future. You should for yourself include a cross refernece to the issue / PR you raised upstream. But this looks good now.

sha256: 14569c02e2bb5233d9d75a13646a7e9eaee0a1bcc8e7ffe4044ad9a3511d8eca

build:
number: 0
noarch: python
script: {{ PYTHON }} -m pip install . -vv

requirements:
build:
sarthakpati marked this conversation as resolved.
Show resolved Hide resolved
- setuptools
- pytest-runner
host:
- pip
- python >=3.6
- setuptools
- pytest-runner
run:
- future
- setuptools
- omegaconf >=2.0.6
- onnx >=1.7.0
- pandas >=1.2.2
- python >=3.6
- pyyaml >=5.3.1
- scipy >=1.6.0
- scikit-learn
- tensorboard
- pytorch >=1.7.0
- torchvision >=0.9.1
- pytest-runner
sarthakpati marked this conversation as resolved.
Show resolved Hide resolved

test:
imports:
- crypten
requires:
sarthakpati marked this conversation as resolved.
Show resolved Hide resolved
- pip

about:
home: https://github.com/facebookresearch/CrypTen
summary: 'CrypTen: secure machine learning in PyTorch.'
license: MIT
license_file: LICENSE
sarthakpati marked this conversation as resolved.
Show resolved Hide resolved

extra:
recipe-maintainers:
- sarthakpati