Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/unifyai/ivy into tensor_train
Browse files Browse the repository at this point in the history
  • Loading branch information
mobley-trent committed Sep 12, 2023
2 parents b1f3372 + 61ddd4c commit 8f6711a
Show file tree
Hide file tree
Showing 328 changed files with 17,416 additions and 6,760 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
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
2 changes: 1 addition & 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 Down
18 changes: 9 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@

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

# PR Description
# PR Description

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

## Related Issue
## Related Issue

<!--
Please use this format to link other issues with their numbers: Close #123
<!--
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
## Checklist

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

### Socials:
### 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
2 changes: 1 addition & 1 deletion .github/workflows/auto-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
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:
Expand Down
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
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
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
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
repos:
- 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
rev: 23.7.0
hooks:
Expand All @@ -7,7 +13,7 @@ repos:
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 Down
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
63 changes: 3 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,63 +322,6 @@ The model\'s output can be visualized as follows:
<img width="50%" class="dark-light" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/regressor_lq.gif">
</div>

Last but not least, we are also working on specific extensions totally
written in Ivy and therefore usable within any framework, covering
topics like [Mechanics](https://github.com/unifyai/mech), [Computer
Vision](https://github.com/unifyai/vision),
[Robotics](https://github.com/unifyai/robot), a [Reinforcement Learning
Gym](https://github.com/unifyai/gym),
[Memory](https://github.com/unifyai/memory) and implementation of
various [Models](https://github.com/unifyai/models) or [Builder
tools](https://github.com/unifyai/builder) with trainers, data loaders
and more!

<br/>
<div align="center">
<a class="only-dark" href="https://github.com/unifyai/mech#gh-dark-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_mech_dark.png#gh-dark-mode-only">
</a>
<a class="only-light" href="https://github.com/unifyai/mech#gh-light-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_mech.png#gh-light-mode-only">
</a>
<a class="only-dark" href="https://github.com/unifyai/vision#gh-dark-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_vision_dark.png#gh-dark-mode-only">
</a>
<a class="only-light" href="https://github.com/unifyai/vision#gh-light-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_vision.png#gh-light-mode-only">
</a>
<a class="only-dark" href="https://github.com/unifyai/robot#gh-dark-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_robot_dark.png#gh-dark-mode-only">
</a>
<a class="only-light" href="https://github.com/unifyai/robot#gh-light-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_robot.png#gh-light-mode-only">
</a>
<a class="only-dark" href="https://github.com/unifyai/gym#gh-dark-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_gym_dark.png#gh-dark-mode-only">
</a>
<a class="only-light" href="https://github.com/unifyai/gym#gh-light-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_gym.png#gh-light-mode-only">
</a>
<a class="only-dark" href="https://github.com/unifyai/memory#gh-dark-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_memory_dark.png#gh-dark-mode-only">
</a>
<a class="only-light" href="https://github.com/unifyai/memory#gh-light-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_memory.png#gh-light-mode-only">
</a>
<a class="only-dark" href="https://github.com/unifyai/builder#gh-dark-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_builder_dark.png#gh-dark-mode-only">
</a>
<a class="only-light" href="https://github.com/unifyai/builder#gh-light-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_builder.png#gh-light-mode-only">
</a>
<a class="only-dark" href="https://github.com/unifyai/models#gh-dark-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_models_dark.png#gh-dark-mode-only">
</a>
<a class="only-light" href="https://github.com/unifyai/models#gh-light-mode-only">
<img class="only-dark" width="12.5%" style="padding-right: 4px; padding-bottom: 4px;" src="https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/logos/ivy_models.png#gh-light-mode-only">
</a>
</div>
<br clear="all" />

As always, you can find more information about [Ivy as a framework in
the
Expand Down Expand Up @@ -437,7 +380,7 @@ expected. :sweat_smile:

``` bash
git clone https://github.com/unifyai/ivy.git
cd ivy
cd ivy
pip install --user -e .
```

Expand Down Expand Up @@ -1526,7 +1469,7 @@ device = "cuda:0" if ivy.gpu_is_available() else "cpu"

# training hyperparams
optimizer= ivy.Adam(1e-4)
batch_size = 64
batch_size = 64
num_epochs = 20
num_classes = 10

Expand Down Expand Up @@ -1600,7 +1543,7 @@ def train(images, classes, epochs, model, device, num_classes=10, batch_size=32)
f.writerows(metrics)


# assuming the dataset(images and classes) are already prepared in a folder
# assuming the dataset(images and classes) are already prepared in a folder
train(images, classes, num_epochs, model, device, num_classes = num_classes, batch_size = batch_size)
```

Expand Down
8 changes: 4 additions & 4 deletions automation_tools/checklists/frontend_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The [Ivy Docs](https://unify.ai/docs/ivy/) represent the ground truth for the ta
Please note that the contributor is not expected to understand everything in the checklist. It's mainly here for the reviewer to make sure everything has been done correctly πŸ™‚

#### LEGEND πŸ—Ί:
- ❌ : Check item is not completed.
- ❌ : Check item is not completed.
- βœ… : Check item is ready for review.
- πŸ†˜ : Stuck/Doubting implementation (PR author should add comments explaining why).
- ⏩ : Check is not applicable to function (skip).
Expand All @@ -24,15 +24,15 @@ Please note that the contributor is not expected to understand everything in the
2. - [ ] ❌: A ToDo comment has been added prompting to pass the frontend argument to the ivy function whose behavior is to be extended.
6. - [ ] ❌: In case a frontend function is being added:
1. - [ ] ❌: It is a composition of ivy functions.
2. - [ ] ❌: In case the needed composition is long (using numerous ivy functions), a `Missing Function Suggestion` issue has been opened to suggest a new ivy function should be added to shorten the frontend implementation.
2. - [ ] ❌: In case the needed composition is long (using numerous ivy functions), a `Missing Function Suggestion` issue has been opened to suggest a new ivy function should be added to shorten the frontend implementation.
3. - [ ] ❌: `@to_ivy_arrays_and_back` has been added to the function.
7. - [ ] ❌: In case a frontend method is being added:
1. - [ ] ❌: It is composed of existing frontend functions or methods.
1. - [ ] ❌: It is composed of existing frontend functions or methods.
2. - [ ] ❌: If a required frontend function has not yet been added, the method may be implemented as a composition of ivy functions, making sure that:
- [ ] ❌: `@to_ivy_arrays_and_back` has been added to the method.
- [ ] ❌: A ToDo comment has been made prompting to remove the decorator and update the implementation as soon as the missing function has been added.
8. - [ ] ❌: The function/method's test has been added (except in the alias case mentioned in <2>):
1. - [ ] ❌: All supported arguments are being generated in `handle_frontend_test`/`handle_frontend_method` and passed to `test_frontend_function`/`test_frontend_method`.
1. - [ ] ❌: All supported arguments are being generated in `handle_frontend_test`/`handle_frontend_method` and passed to `test_frontend_function`/`test_frontend_method`.
2. - [ ] ❌: The argument generation covers all possible supported values. Array sizes, dimensions, and axes adhere to the full supported set of the original function/method.
3. - [ ] ❌: The `available_dtypes` parameter passed to the helper generating the function/method's input array is set to `helpers.get_dtypes("valid")`. If there are unsupported dtypes that cause the test to fail, they should be handled by adding `@with_supported_dtypes`/`@with_unsupported_dtype` to the function/method.
9. - [ ] ❌: The PR is not introducing any test failures.
Expand Down
Loading

0 comments on commit 8f6711a

Please sign in to comment.