Skip to content

Commit

Permalink
Merge pull request #1 from unifyai/main
Browse files Browse the repository at this point in the history
updating my fork
  • Loading branch information
keshavkrishna authored Feb 16, 2024
2 parents 7a9d7b5 + 7ee4aae commit 48a3255
Show file tree
Hide file tree
Showing 1,244 changed files with 182,396 additions and 87,297 deletions.
3 changes: 1 addition & 2 deletions .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 Expand Up @@ -59,4 +59,3 @@
}
}
}

61 changes: 61 additions & 0 deletions .devcontainer/build_apple_silicon/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.236.0/containers/docker-existing-dockerfile
{
"name": "Ivy Apple Silicon Development Environment (build)",

"build": {
"dockerfile": "../../docker/DockerfileAppleSilicon",
"context": "../..",
"args": {
"pycon": ["3.10"]
}
},

"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
],
"settings": {
"python.defaultInterpreterPath": "/opt/miniconda/envs/multienv/bin/python3"
}
}
},

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

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

// Uncomment the next line to run commands after the container is created - for example installing curl.

// 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": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": false
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
"installDockerBuildx": true,
"version": "20.10",
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest"
}
}
}
10 changes: 5 additions & 5 deletions .devcontainer/build_gpu/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "Ivy GPU Development Environment (build)",

"build": {
"dockerfile": "../../docker/DockerfileGPUMultiCuda",
"dockerfile": "../../docker/DockerfileGPU",
"context": "../..",
"args": {
"IMAGE_NAME": "unifyai/multicuda",
"IMAGE_TAG": "base_and_requirements"
"IMAGE_NAME": "unifyai/ivy",
"IMAGE_TAG": "latest-gpu"
}
},

Expand All @@ -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 Expand Up @@ -59,4 +59,4 @@
"version": "latest"
}
}
}
}
3 changes: 1 addition & 2 deletions .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 Expand Up @@ -62,4 +62,3 @@
}
}
}

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 All @@ -48,4 +48,4 @@
"version": "latest"
}
}
}
}
14 changes: 7 additions & 7 deletions .devcontainer/image_gpu/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Ivy GPU Development Environment (image)",

"image": "unifyai/multicuda:base_and_requirements",
"image": "unifyai/ivy:latest-gpu",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -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 All @@ -50,4 +50,4 @@
"version": "latest"
}
}
}
}
2 changes: 1 addition & 1 deletion .devcontainer/post_create_commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ python3 -m pip install pre-commit

git config --global --add safe.directory /workspaces/ivy

( cd /workspaces/ivy/ && pre-commit install)
( cd /workspaces/ivy/ && pre-commit install)
11 changes: 3 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@ docs/make_docs.sh @KareemMAX
docs/partial_conf.py @KareemMAX
docs/prebuild.sh @KareemMAX
docs/overview/contributing/building_the_docs.rst @KareemMAX
docs/overview/deep_dive/building_the_docs_pipline.rst @KareemMAX
docs/overview/deep_dive/building_the_docs_pipeline.rst @KareemMAX
docs/_templates @KareemMAX

# Docker
docker/* @ricksanchezstoic

# Idea files
.idea/* @Aarsh2001 @zaeemansari70
docs/demos @KareemMAX

# README
README.rst @guillesanbri
README.md @guillesanbri
44 changes: 44 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

<!--
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
-->

Closes #

## Checklist

- [ ] Did you add a function?
- [ ] Did you add the tests?
- [ ] Did you run your tests and are your tests passing?
- [ ] Did pre-commit not fail on any check?
- [ ] Did you follow the steps we provided?

<!--
Please mark your PR as a draft if you realise after the fact that your tests are not passing or
that your pre-commit check has some failures.
Here are some relevant resources regarding tests and pre-commit:
https://unify.ai/docs/ivy/overview/deep_dive/ivy_tests.html
https://unify.ai/docs/ivy/overview/deep_dive/formatting.html#pre-commit
-->

### Socials

<!--
If you have Twitter, please provide it here otherwise just ignore this.
-->
13 changes: 10 additions & 3 deletions .github/workflows/array-api-det-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: array-api-determine-test-coverage
on:
workflow_dispatch:
schedule:
- cron: "30 20 * * 6"

permissions:
actions: read
jobs:
determine_coverage:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: [ 1, 2, 3, 4 ]
steps:
- name: Checkout Ivy 🛎
uses: actions/checkout@v2
Expand All @@ -19,7 +26,7 @@ jobs:
run: |
pip install pydriller tqdm
cd ivy
python run_tests_CLI/array_api_det_coverage.py
python scripts/determine_tests/array_api_det_coverage.py ${{ matrix.branch }}
cd ..
mkdir tests
cp ivy/tests.pbz2 tests/
Expand All @@ -32,6 +39,6 @@ jobs:
source-directory: tests/
destination-github-username: 'unifyai'
destination-repository-name: 'Mapping'
user-email: [email protected]
user-email: [email protected]
commit-message: Update Array API Tests Mapping
target-branch: master
target-branch: main${{ matrix.branch }}
69 changes: 58 additions & 11 deletions .github/workflows/array-api-intelligent-tests-pr.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,84 @@
name: array-api-intelligent-tests-pr
on:
pull_request:
types: [ labeled, opened, synchronize, reopened, review_requested ]
types: [opened, synchronize, reopened, review_requested ]

permissions:
actions: read

jobs:
display_test_results:
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- run_tests

steps:
- name: Download all test results
uses: actions/download-artifact@v3

- name: Combined Test Results
run: |
find . -name "test_results_*.txt" -exec cat {} + > combined_test_results.txt
echo "Test results summary:"
cat combined_test_results.txt
- name: New Failures Introduced
run: |
find . -name "new_failures_*.txt" -exec cat {} + > combined_failures.txt
if [ -s combined_failures.txt ]
then
echo "This PR introduces the following new failing tests:"
cat combined_failures.txt
else
echo "This PR does not introduce any new test failures! Yippee!"
fi
run_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: [ 1, 2, 3, 4 ]

steps:
- name: Checkout Ivy 🛎
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: ivy
persist-credentials: false
submodules: "recursive"
fetch-depth: 100

- name: Determine Tests
- name: Get Job URL
uses: Tiryoh/gha-jobid-action@v0
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: ${{ github.job }}

- name: Determine and Run Tests
run: |
git clone -b master https://github.com/unifyai/Mapping.git --depth 1
git clone -b main${{ matrix.branch }} https://github.com/unifyai/Mapping.git --depth 1
pip install pydriller
cp Mapping/tests.pbz2 ivy/
cd ivy
python run_tests_CLI/array_api_determine_tests.py
python scripts/determine_tests/array_api_determine_tests.py
python scripts/run_tests/array_api_run_tests_pr.py new_failures_${{ matrix.branch }}.txt | tee test_results_${{ matrix.branch }}.txt
cd ..
continue-on-error: true

- name: Run Tests
id: tests
run: |
cd ivy
python run_tests_CLI/array_api_run_tests_pr.py
continue-on-error: true
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: test_results_${{ matrix.branch }}
path: ivy/test_results_${{ matrix.branch }}.txt

- name: Upload New Failures
uses: actions/upload-artifact@v3
with:
name: new_failures_${{ matrix.branch }}
path: ivy/new_failures_${{ matrix.branch }}.txt

- name: Check on failures
if: steps.tests.outcome != 'success'
Expand Down
Loading

0 comments on commit 48a3255

Please sign in to comment.