Skip to content

Commit

Permalink
pilot test script
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Nov 4, 2023
1 parent 4fbb3b9 commit 188a897
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pilot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Doc-Pilot
on: [push, pull_request, workflow_dispatch, workflow_call]

permissions:
contents: write

jobs:
add-docstring:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️ ${{ github.event.repository.name }}
uses: actions/checkout@v4
with:
path: DoCPilot
persist-credentials: false
submodules: "recursive"
set-safe-directory: false

- name: Get changed files
id: changed-files
uses: lots0logs/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN}}

- name: Run Claude Script
run: |
echo "steps.changed-files.outputs.all"
echo "claude magic"
- name: Cleanup Process
run: |
echo "We have now run cleanup"
56 changes: 56 additions & 0 deletions dummy-files/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# global
from numbers import Number
import numpy as np
from typing import Union, Optional, List, Sequence, Tuple

import jax.dlpack
import jax.numpy as jnp
import jax._src as _src
import jaxlib.xla_extension

# local
import ivy
from ivy import as_native_dtype
from ivy.functional.backends.jax import JaxArray
from ivy.functional.ivy.creation import (
_asarray_to_native_arrays_and_back,
_asarray_infer_device,
_asarray_infer_dtype,
_asarray_handle_nestable,
NestedSequence,
SupportsBufferProtocol,
_asarray_inputs_to_native_shapes,
)


# Array API Standard #
# ------------------ #

@_asarray_to_native_arrays_and_back
@_asarray_infer_device
@_asarray_handle_nestable
@_asarray_inputs_to_native_shapes
@_asarray_infer_dtype
def asarray(
obj: Union[
JaxArray,
bool,
int,
float,
tuple,
NestedSequence,
SupportsBufferProtocol,
np.ndarray,
],
/,
*,
copy: Optional[bool] = None,
dtype: Optional[jnp.dtype] = None,
device: jaxlib.xla_extension.Device = None,
out: Optional[JaxArray] = None,
) -> JaxArray:
ivy.utils.assertions._check_jax_x64_flag(dtype)
if copy is True:
return jnp.array(obj, dtype=dtype, copy=True)
else:
return jnp.asarray(obj, dtype=dtype)

0 comments on commit 188a897

Please sign in to comment.