Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hovo7 authored Sep 13, 2023
2 parents e359749 + dfcbb15 commit 8b368e9
Show file tree
Hide file tree
Showing 713 changed files with 94,572 additions and 70,640 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/build/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},

"postCreateCommand": {
"post_create": "bash .devcontainer/post_create_commands.sh",
"post_create": "bash .devcontainer/post_create_commands.sh",
"bashrc": "echo \"alias python=python3\" >> ~/.bashrc"
},

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/build_gpu/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},

"postCreateCommand": {
"post_create": "bash .devcontainer/post_create_commands.sh",
"post_create": "bash .devcontainer/post_create_commands.sh",
"bashrc": "echo \"alias python=python3\" >> ~/.bashrc"
},

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/build_multiversion/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dockerfile": "../../docker/DockerfileMultiversion",
"context": "../..",
"args": {
"fw": ["numpy/1.24.2 tensorflow/2.11.0 tensorflow/2.12.0 jax/0.4.10 jax/0.4.8"]
"fw": ["numpy/1.24.2 tensorflow/2.11.0 tensorflow/2.12.0 jax/0.4.10 jax/0.4.8"]

}
},
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/image/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
},

"postCreateCommand": {
"post_create": "bash .devcontainer/post_create_commands.sh",
"post_create": "bash .devcontainer/post_create_commands.sh",
"bashrc": "echo \"alias python=python3\" >> ~/.bashrc"
},
"initializeCommand": "docker pull unifyai/ivy:latest",

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode",
"features": {
Expand Down
10 changes: 5 additions & 5 deletions .devcontainer/image_gpu/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
"runArgs": ["--gpus","all"],

"postCreateCommand": {
"post_create": "bash .devcontainer/post_create_commands.sh",
"post_create": "bash .devcontainer/post_create_commands.sh",
"bashrc": "echo \"alias python=python3\" >> ~/.bashrc"
},
"initializeCommand": "docker pull unifyai/ivy:latest",

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode",
"features": {
Expand Down
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ivy/utils/backend @VedPatwardhan @CatB1t
ivy/utils/backend/ast_helpers.py @CatB1t

# Ivy Testing
ivy_tests/test_ivy/helpers/ @CatB1t
ivy_tests/test_ivy/helpers/ @sherry30 @CatB1t
ivy_tests/array_api_testing/ @aarsh2001 @hirwa-nshuti

# Docs builder
Expand All @@ -16,6 +16,7 @@ docs/prebuild.sh @KareemMAX
docs/overview/contributing/building_the_docs.rst @KareemMAX
docs/overview/deep_dive/building_the_docs_pipline.rst @KareemMAX
docs/_templates @KareemMAX
docs/demos @KareemMAX

# Docker
docker/* @ricksanchezstoic
Expand Down
31 changes: 31 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

<!--
This template will help you to have a meaningful PR, please follow it and do not leave it blank.
-->

# PR Description

<!--
If there is no related issue, please add a short description about your PR.
-->

## Related Issue

<!--
Please use this format to link other issues with their numbers: Close #123
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->

Close #

## Checklist

- [ ] Did you add a function?
- [ ] Did you add the tests?
- [ ] Did you follow the steps we provided?

### Socials:

<!--
If you have Twitter, please provide it here otherwise just ignore this.
-->
2 changes: 1 addition & 1 deletion .github/workflows/array-api-intelligent-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
run: |
source ./ivy/clone_mapping.sh main
pip install pydriller pymongo
pip install pydriller pymongo
cp Mapping/tests.pbz2 ivy/
cd ivy
python run_tests_CLI/array_api_determine_tests.py
Expand Down
74 changes: 54 additions & 20 deletions .github/workflows/auto-comment.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,62 @@
name: Auto Comment
name: Check Semantic and welcome new contributors

on:
pull_request_target:
types: [opened]
types:
- opened
- edited
- synchronize
- reopened
workflow_call:

permissions:
pull-requests: write

jobs:
auto_comment:
semantics:
name: Semantics
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pr-compliance-checks:
name: PR Compliance Checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Comment
uses: actions/github-script@v6
- uses: mtfoley/[email protected]
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Thanks for contributing to Ivy! 😊👏
Here are some of the important points from our Contributing Guidelines 📝:
1. Feel free to ignore the \`run_tests (1)\`, \`run_tests (2)\`, … jobs, and only look at the \`display_test_results\` job. 👀 It contains the following two sections:
- **Combined Test Results:** This shows the results of all the ivy tests that ran on the PR. ✔️
- **New Failures Introduced:** This lists the tests that are passing on main, but fail on the PR Fork. Please try to make sure that there are no such tests. 💪
2. The \`lint / Check formatting / check-formatting\` tests check for the formatting of your code. 📜 If it fails, please check the exact error message in the logs and fix the same. ⚠️🔧
3. Finally, the \`test-docstrings / run-docstring-tests\` check for the changes made in docstrings of the functions. This may be skipped, as well. 📚
Happy coding! 🎉👨‍💻`
})
body-auto-close: false
protected-branch-auto-close: false
body-comment: >
## Issue Reference
In order to be considered for merging, the pull request description must refer to a
specific issue number. This is described in our
[contributing guide](https://unify.ai/docs/ivy/overview/contributing/the_basics.html#todo-list-issues) and our PR template.
This check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue
number that this PR is meant to address.
welcome:
name: Welcome
runs-on: ubuntu-latest
timeout-minutes: 10
needs: semantics
if: github.event.action == 'opened'
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |-
Congrats on making your first Pull Request and thanks for supporting Ivy! 🎉
Joing the conversation in our [Discord](https://discord.com/invite/sXyFF8tDtm)
Here are some notes to understand our tests:
- We have merged all the tests in one file called \`display_test_results\` job. 👀 It contains the following two sections:
- **Combined Test Results:** This shows the results of all the ivy tests that ran on the PR. ✔️
- **New Failures Introduced:** This lists the tests that are passing on main, but fail on the PR Fork.
Please try to make sure that there are no such tests. 💪
2 changes: 1 addition & 1 deletion .github/workflows/checklist_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
comment-id: ${{ github.event.comment.id }}
body: ${{ steps.template.outputs.result }}
edit-mode: replace

frontend_pr_commented:
name: Frontend PR comment
if: ${{ github.event.issue.pull_request && github.event.comment.body == 'add_frontend_checklist' }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/dockerfile-multiversion-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dockerfile Mutiversion Push

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:

build:
runs-on: ubuntu-latest

steps:
- name: Checkout Ivy 🛎
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Dockerfile
run: |
docker build --progress=plain --no-cache -t unifyai/multiversion:latest -f docker/DockerfileMultiversion .
docker push unifyai/multiversion:latest
2 changes: 1 addition & 1 deletion .github/workflows/dockerfile-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
-
-
name: Checkout 🛎 Ivy
uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/intelligent-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
run: |
source ./ivy/clone_mapping.sh master${{ matrix.branch }}
pip install pydriller pymongo
pip install pydriller pymongo
cp Mapping/tests.pbz2 ivy/
cd ivy
mkdir .ivy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
mkdir .ivy
touch .ivy/key.pem
echo -n ${{ secrets.USER_API_KEY }} > .ivy/key.pem
python setup_tests.py ${{ github.event.inputs.test }}
python setup_tests.py ${{ github.event.inputs.test }}
python run_tests_pr.py new_failures.txt
continue-on-error: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
mkdir .ivy
touch .ivy/key.pem
echo -n ${{ secrets.USER_API_KEY }} > .ivy/key.pem
python3 setup_tests.py ${{ github.event.inputs.test }}
python3 setup_tests.py ${{ github.event.inputs.test }}
python3 run_tests.py ${{ secrets.REDIS_CONNECTION_URL }} ${{ secrets.REDIS_PASSWORD }} ${{ secrets.MONGODB_PASSWORD }} 'false' ${{ github.event.inputs.gpu }} ${{ github.run_id }} 'false' ${{ steps.jobs.outputs.html_url }}
continue-on-error: true

Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
mkdir .ivy
touch .ivy/key.pem
echo -n ${{ secrets.USER_API_KEY }} > .ivy/key.pem
python setup_tests.py "${{ github.event.inputs.test }}"
python setup_tests.py "${{ github.event.inputs.test }}"
python run_tests.py ${{ secrets.REDIS_CONNECTION_URL }} ${{ secrets.REDIS_PASSWORD }} ${{ secrets.MONGODB_PASSWORD }} ${{ github.event.inputs.version}} 'false' ${{ github.run_id }} 'false' ${{ steps.jobs.outputs.html_url }}
continue-on-error: true

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/synchronize-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Synchronize DB
on:
workflow_dispatch:
permissions:
actions: read
jobs:
synchronize-db:
runs-on: ubuntu-latest
steps:
- name: Checkout Ivy 🛎
uses: actions/checkout@v3
with:
path: ivy
persist-credentials: false
submodules: "recursive"
fetch-depth: 1

- name: Synchronize DB
run: |
pip install pymongo
cd ivy
python run_tests_CLI/synchronize_db.py ${{ secrets.MONGODB_PASSWORD }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
[submodule "ivy_tests/array_api_testing/test_array_api"]
path = ivy_tests/array_api_testing/test_array_api
url = https://github.com/data-apis/array-api-tests.git
[submodule "docs/demos"]
path = docs/demos
url = https://github.com/unifyai/demos.git
16 changes: 13 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
repos:
- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- id: check-toml
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
language_version: python3
args:
- "--preview"
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.0
rev: v2.2.1
hooks:
- id: autoflake
- repo: https://github.com/pycqa/flake8
Expand All @@ -25,3 +31,7 @@ repos:
- id: pydocstyle
# Exclude everything in frontends except __init__.py, and func_wrapper.py
exclude: 'ivy/functional/(frontends|backends)/(?!.*/func_wrapper\.py$).*(?!__init__\.py$)'
- repo: https://github.com/unifyai/lint-hook
rev: 2ea80bc854c7f74b09620151028579083ff92ec2
hooks:
- id: ivy-lint
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ Copyright 2021 The Ivy Authors. All rights reserved.
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
10. The software in this directory and its subdirectories is licensed under the Apache License,
Version 2.0, except for the software contained within the ivy/compiler directory,

10. The software in this directory and its subdirectories is licensed under the Apache License,
Version 2.0, except for the software contained within the ivy/compiler directory,
which is subject to the license set forth in the LICENSE file located within that directory.

END OF TERMS AND CONDITIONS
Expand Down
Loading

0 comments on commit 8b368e9

Please sign in to comment.