Skip to content

Commit

Permalink
fix: Fixed spelling mistakes (used codespell hook to find the mista…
Browse files Browse the repository at this point in the history
…kes). (ivy-llc#26626)
  • Loading branch information
Sai-Suraj-27 authored Oct 6, 2023
1 parent f567960 commit d6b485c
Show file tree
Hide file tree
Showing 80 changed files with 165 additions and 165 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ train(images, classes, num_epochs, model, device, num_classes = num_classes, bat

# Diving deeper

Altough the [Docs](https://unify.ai/docs/ivy/) are the best place to learn more, in the next section we will take a look at how Ivy works as both a transpiler and a framework in a bit more of detail to get an idea of why and where to use it.
Although the [Docs](https://unify.ai/docs/ivy/) are the best place to learn more, in the next section we will take a look at how Ivy works as both a transpiler and a framework in a bit more of detail to get an idea of why and where to use it.

<details>
<summary><b>Ivy as a transpiler</b></summary>
Expand Down
4 changes: 2 additions & 2 deletions docs/overview/contributing/setting_up.rst
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ Ubuntu
d. Choosing "Docker" from the left panel.
Type python3 (with the number) in python interpreter path and press ok.

**Docker Connection not Successfull**
**Docker Connection not Successful**

This is a common error which you might face. If you are not successfully able to connect docker with Pycharm(point 4a) and your docker is also running, the issue is that you are not able to use your docker socket. So, executing the below two commands should solve this.

Expand Down Expand Up @@ -762,7 +762,7 @@ If you want to setup a GPU instance on codespaces and also have access to it, ki
.. image:: https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/contributing/setting_up/github_codespaces/Selecting_the_GPU.png?raw=true
:width: 420

2. Refer to the ref:`Setting up Codespaces` section for the other configurations such as the "Dev conatiner configuration". Your Machine Type section will look like the following image shown below. Feel free to click on the green button to create the instance.
2. Refer to the ref:`Setting up Codespaces` section for the other configurations such as the "Dev container configuration". Your Machine Type section will look like the following image shown below. Feel free to click on the green button to create the instance.

.. image:: https://raw.githubusercontent.com/unifyai/unifyai.github.io/main/img/externally_linked/contributing/setting_up/github_codespaces/Interface_after_selecting_the_GPU_1.png?raw=true
:width: 420
Expand Down
2 changes: 1 addition & 1 deletion docs/overview/deep_dive/array_api_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Instead, the change must be made to the array-api repository directly and then o

.. code-block:: none
# to initialise local config file and fetch + checkout submodule (not needed everytime)
# to initialise local config file and fetch + checkout submodule (not needed every time)
git submodule update --init --recursive
# pulls changes from the upstream remote repo and merges them
Expand Down
4 changes: 2 additions & 2 deletions docs/overview/deep_dive/building_the_docs_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ This is a custom documenter for ``autodoc`` that documents Ivy data attributes t
in ``ivy.functional.ivy``, it will replace the module to ``ivy.`` instead of
``ivy.functional.ivy.<submodule>``.

It's used instead of simply using ``ivy.<data atribute>`` because data attributes have
no ``__doc__`` atribute, instead docs are discovered by parsing the source code itself.
It's used instead of simply using ``ivy.<data attribute>`` because data attributes have
no ``__doc__`` attribute, instead docs are discovered by parsing the source code itself.
So for Sphinx to find the required docs, it needs to be supplied the full module name,
then using the ``autoivydata`` directive will replace the module name to ``ivy.``.

Expand Down
6 changes: 3 additions & 3 deletions docs/overview/deep_dive/data_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Only one of these decorators can be specified for any given function.
In the case of :attr:`@with_supported_dtypes` it is assumed that all unmentioned data types are unsupported, and in the case of :attr:`@with_unsupported_dtypes` it is assumed that all unmentioned data types are supported.

The decorators take two arguments, a dictionary with the unsupported dtypes mapped to the corresponding version of the backend framework and the current version of the backend framework on the user's system.
Based on that, the version specific unsupported dtypes and devices are set for the given function everytime the function is called.
Based on that, the version specific unsupported dtypes and devices are set for the given function every time the function is called.

For Backend Functions:

Expand Down Expand Up @@ -528,7 +528,7 @@ The attributes are set for functions that don't have a specific backend implemen

An example of an ivy function which does not have a specific backend implementation for each backend is the :attr:`einops_reduce` function. `This function <https://github.com/unifyai/ivy/blob/8516d3f12a8dfc4ec5f819789937d196c7e28566/ivy/functional/ivy/general.py#L1964>`_ , makes use of a third-party library :attr:`einops` which has its own backend-agnostic implementations.

The :attr:`unsupported_dtypes` and :attr:`supported_dtypes` attributes take two arguments, a dictionary with the unsupported dtypes mapped to the corresponding backend framework. Based on that, the specific unsupported dtypes are set for the given function everytime the function is called.
The :attr:`unsupported_dtypes` and :attr:`supported_dtypes` attributes take two arguments, a dictionary with the unsupported dtypes mapped to the corresponding backend framework. Based on that, the specific unsupported dtypes are set for the given function every time the function is called.
For example, we use the :attr:`unsupported_dtypes` attribute for the :attr:`einops_reduce` function within the ivy functional API as shown below:

.. code-block:: python
Expand All @@ -539,7 +539,7 @@ For example, we use the :attr:`unsupported_dtypes` attribute for the :attr:`eino
"paddle": ("complex", "uint8", "int8", "int16", "float16"),
}
With the above aproach, we ensure that anytime the backend is set to torch, the :attr:`einops_reduce` function does not support float16, likewise, complex dtypes are not supported with a tensorflow backend and
With the above approach, we ensure that anytime the backend is set to torch, the :attr:`einops_reduce` function does not support float16, likewise, complex dtypes are not supported with a tensorflow backend and
complex, uint8, int8, int16, float16 are not supported with a paddle backend.

Backend Data Type Bugs
Expand Down
2 changes: 1 addition & 1 deletion docs/overview/deep_dive/devices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ This is the exception you will get while running the code above:
File "/content/ivy/ivy/func_wrapper.py", line 863, in _handle_device_shifting
raise ivy.utils.exceptions.IvyException(
During the handling of the above exception, another exception occurred:
Expected all input arrays to be on the same device, but found atleast two devices - ('cpu', 'gpu:0'),
Expected all input arrays to be on the same device, but found at least two devices - ('cpu', 'gpu:0'),
set `ivy.set_soft_device_mode(True)` to handle this problem.
b. If all the input arrays are on the same device, the operation is executed without raising any device exceptions.
Expand Down
8 changes: 4 additions & 4 deletions docs/overview/deep_dive/docstring_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Let's start with the functional examples, with :class:`ivy.Array` instances in t
These examples cover points 1, 2, 3, 4 and 5.

Please note that in the above case of `x` having multi-line input, it is necessary for each line of the input to be seperated by a '...\' so that they can be parsed by the script that tests the examples in the docstrings.
Please note that in the above case of `x` having multi-line input, it is necessary for each line of the input to be separated by a '...\' so that they can be parsed by the script that tests the examples in the docstrings.

Point 1 is simple to satisfy.
Ignoring the union over :class:`ivy.Array` and :class:`ivy.NativeArray` which is covered by points 6 and 7, and ignoring the *nestable* nature of the function which is covered by points 8 and 9, then as far as point 1 is concerned, the input :code:`x` only has one possible variation.
Expand Down Expand Up @@ -349,7 +349,7 @@ Let's start with the functional examples, with :class:`ivy.Array` instances in t
These examples cover points 1, 2, 3, 4 and 5.

Again, please note that in the above case of `x` having multi-line input, it is necessary for each line of the input to be seperated by a '...\' so that they can be parsed by the script that tests the examples in the docstrings.
Again, please note that in the above case of `x` having multi-line input, it is necessary for each line of the input to be separated by a '...\' so that they can be parsed by the script that tests the examples in the docstrings.

Point 1 is a bit less trivial to satisfy than it was for :func:`ivy.tan` above.
While :code:`x` again only has one variation (for the same reason as explained in the :func:`ivy.tan` example above), :code:`shift` has two variations (:code:`int` or sequence of :code:`int`), and :code:`axis` has three variations (:code:`int`, :sequence of :code:`int`, or :code:`None`).
Expand Down Expand Up @@ -497,7 +497,7 @@ Let's start with the functional examples, with :class:`ivy.Array` instances in t
These examples cover points 1, 2, 3, 4 and 5.

Again, please note that in the above case of `x` having multi-line input, it is necessary for each line of the input to be seperated by a '...\' so that they can be parsed by the script that tests the examples in the docstrings.
Again, please note that in the above case of `x` having multi-line input, it is necessary for each line of the input to be separated by a '...\' so that they can be parsed by the script that tests the examples in the docstrings.

Point 1 is again trivial to satisfy, as was the case for :func:`ivy.tan`.
Ignoring the union over :class:`ivy.Array` and :class:`ivy.NativeArray` which is covered by points 6 and 7, and also ignoring the *nestable* nature of the function which is covered by points 8 and 9, then as far as point 1 is concerned, inputs :code:`x1` and :code:`x2` both only have one possible variation.
Expand Down Expand Up @@ -533,7 +533,7 @@ We then also add an example with an :class:`ivy.Container` for one of the inputs
[8.1, 9.3, 3.4]])
}
Again, unlike :func:`ivy.tan`, point 7 is relevant in this case, as there are two function inputs in total (exluding :code:`out`).
Again, unlike :func:`ivy.tan`, point 7 is relevant in this case, as there are two function inputs in total (excluding :code:`out`).
We can therefore add an example with multiple :class:`ivy.Container` inputs, in order to satisfy point 7.

.. parsed-literal::
Expand Down
2 changes: 1 addition & 1 deletion docs/overview/deep_dive/formatting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ be applied by the ``ivy-gardener`` properly.
On the other hand, ``ivy-gardener`` itself can fail if the bot handling it (ivy-branch) can not apply the changes
suggested by the linters, for example, when it does not have access to edit the target branch. In this case, you
should try to give the maintainer bot the access to your branch (which is an option shown in GitHub UI) and give it
another try, or manually resolve the formatting errors by commiting the changes yourself.
another try, or manually resolve the formatting errors by committing the changes yourself.

**Round Up**

Expand Down
2 changes: 1 addition & 1 deletion docs/overview/deep_dive/ivy_frontends_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ Frontend Instance Method Tests
The frontend instance method tests are similar to the frontend function test, but instead of testing the function directly we test the instance method of the frontend class.
major difference is that we have more flags to pass now, most initialization functions take an array as an input. also some methods may take an array as input,
for example, :code:`ndarray.__add__` would expect an array as input, despite the :code:`self.array`. and to make our test **complete** we need to generate seperate flags for each.
for example, :code:`ndarray.__add__` would expect an array as input, despite the :code:`self.array`. and to make our test **complete** we need to generate separate flags for each.
**Important Helper Functions**
Expand Down
2 changes: 1 addition & 1 deletion docs/overview/deep_dive/operating_modes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Some of them are:
#. `warning_level`_: Determines the warning level to be shown when one occurs.
#. `nan_policy`_: Determines the policy of handling related to ``nan``.
#. `dynamic_backend`_: Determines if the global dynamic backend setting is active or not.
#. `precise_mode`_: Determines whether to use a promotion table that avoids any precision loss or a compute effecient table that avoids most wider-than-necessary promotions.
#. `precise_mode`_: Determines whether to use a promotion table that avoids any precision loss or a compute efficient table that avoids most wider-than-necessary promotions.
#. `array_mode`_: Determines the mode of whether to convert inputs to ``ivy.NativeArray``, then convert the outputs back to ``ivy.Array``.
#. `nestable_mode`_: Determines the mode of whether to check if function inputs are ``ivy.Container``.
#. `exception_trace_mode`_: Determines how much details of the ivy exception traces to be shown in the log.
Expand Down
6 changes: 3 additions & 3 deletions ivy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,12 +790,12 @@ class Node(str):
try:
from .engines import XLA as xla
from .engines import ivy2xla
except:
except: # noqa: E722
pass
try:
from .compiler.compiler import transpile, trace_graph, unify
except: # noqa: E722
pass # Added for the finally statment
pass # Added for the finally statement
finally:
# Skip framework imports done by Ivy compiler for now
for backend_framework in _not_imported_backends.copy():
Expand Down Expand Up @@ -993,7 +993,7 @@ def _assert_array_significant_figures_formatting(sig_figs):
ivy.utils.assertions.check_greater(sig_figs, 0, as_array=False)


# ToDo: SF formating for complex number
# ToDo: SF formatting for complex number
def vec_sig_fig(x, sig_fig=3):
if isinstance(x, np.bool_):
return x
Expand Down
2 changes: 1 addition & 1 deletion ivy/data_classes/array/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def empty_like(
input array from which to derive the output array shape.
dtype
output array data type. If dtype is None, the output array data type must be
inferred from ``self``. Deafult: ``None``.
inferred from ``self``. Default: ``None``.
device
device on which to place the created array. If device is None, the output
array device must be inferred from ``self``. Default: ``None``.
Expand Down
2 changes: 1 addition & 1 deletion ivy/data_classes/array/experimental/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def logit(
self
Input array.
eps
When eps is None the function outpus NaN where x < 0 or x > 1.
When eps is None the function outputs NaN where x < 0 or x > 1.
and inf or -inf where x = 1 or x = 0, respectively.
Otherwise if eps is defined, x is clamped to [eps, 1 - eps]
complex_mode
Expand Down
2 changes: 1 addition & 1 deletion ivy/data_classes/array/experimental/elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ def gradient(
Note: jax supports edge_order=1 case only
axis
dimension(s) to approximate the gradient over
by default partial gradient is computed in every dimention
by default partial gradient is computed in every dimension
Returns
Expand Down
2 changes: 1 addition & 1 deletion ivy/data_classes/array/experimental/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def dct(
type
The type of the dct. Must be 1, 2, 3 or 4.
n
The lenght of the transform. If n is less than the input signal lenght,
The length of the transform. If n is less than the input signal length,
then x is truncated, if n is larger than x is zero-padded.
norm
The type of normalization to be applied. Must be either None or "ortho".
Expand Down
4 changes: 2 additions & 2 deletions ivy/data_classes/array/experimental/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def top_k(
self
The array to compute top_k for.
k
Number of top elements to retun must not exceed the array size.
Number of top elements to return must not exceed the array size.
axis
The axis along which we must return the top elements default value is 1.
largest
Expand Down Expand Up @@ -1392,7 +1392,7 @@ def column_stack(
Parameters
----------
self
Array that will be stacked at the begining of the provided array iterable.
Array that will be stacked at the beginning of the provided array iterable.
arrays
Arrays to be stacked.
out
Expand Down
2 changes: 1 addition & 1 deletion ivy/data_classes/array/experimental/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def poisson(
Parameters
----------
self
Input Array of rate paramter(s). It must have a shape that is broadcastable
Input Array of rate parameter(s). It must have a shape that is broadcastable
to the requested shape
shape
If the given shape is, e.g '(m, n, k)', then 'm * n * k' samples are drawn.
Expand Down
2 changes: 1 addition & 1 deletion ivy/data_classes/array/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ def fourier_encode(
Default is ``False``.
concat
Whether to concatenate the position, sin and cos values, or return
seperately. Default is ``True``.
separately. Default is ``True``.
flatten
Whether to flatten the position dimension into the batch dimension.
Default is ``False``.
Expand Down
4 changes: 2 additions & 2 deletions ivy/data_classes/array/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def dropout(
) -> ivy.Array:
"""
ivy.Array instance method variant of ivy.dropout. This method simply wraps the
function, and so the docstring for ivy.droput also applies to this method with
function, and so the docstring for ivy.dropout also applies to this method with
minimal changes.
Parameters
Expand Down Expand Up @@ -327,7 +327,7 @@ def scaled_dot_product_attention(
Default is None. The shape of mask input should be in
*[batch_shape,num_queries,num_keys]*.
dropout_p
Specifies the dropout probablity, if greater than 0.0, dropout is applied
Specifies the dropout probability, if greater than 0.0, dropout is applied
is_causal
If true, assumes causal attention masking and errors if both `mask` and
`is_causal` are set.
Expand Down
2 changes: 1 addition & 1 deletion ivy/data_classes/array/searching.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def argmax(
input array. Should have a numeric data type.
axis
axis along which to search. If None, the function must return the index of
the maximum value of the flattened array. Deafult: ``None``.
the maximum value of the flattened array. Default: ``None``.
keepdims
If this is set to True, the axes which are reduced are left in the result as
dimensions with size one. With this option, the result will broadcast
Expand Down
Loading

0 comments on commit d6b485c

Please sign in to comment.