Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed imports, docstrings, removed unneeded tests #129

Merged
merged 10 commits into from
Feb 2, 2024
Merged

fixed imports, docstrings, removed unneeded tests #129

merged 10 commits into from
Feb 2, 2024

Conversation

evelynmitchell
Copy link
Contributor

Polishing the apple a bit.

Tests are now fully running again.

@@ -1,3 +1,7 @@
""" sky_api module """
""" This module provides a simplified interface for launching, executing,

Check warning

Code scanning / Prospector (reported by Codacy)

String statement has no effect (pointless-string-statement) Warning

String statement has no effect (pointless-string-statement)
@@ -1,3 +1,7 @@
""" sky_api module """
""" This module provides a simplified interface for launching, executing,

Check warning

Code scanning / Pylint (reported by Codacy)

Trailing whitespace Warning

Trailing whitespace
attention = FlashAttention(causal=False, dropout=0.1, flash=True)
output = attention(q, k, v)

assert(output.shape == (2, 4, 6, 8))

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
attention = FlashAttention(causal=False, dropout=0.1, flash=True)
output = attention(q, k, v)

assert(output.shape == (2, 4, 6, 8))

Check notice

Code scanning / Semgrep (reported by Codacy)

The application was found using assert in non-test code. Note test

The application was found using assert in non-test code.
attention = FlashAttention(causal=False, dropout=0.1, flash=True)
output = attention(q, k, v)

assert(output.shape == (2, 4, 6, 8))

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
@@ -120,6 +122,21 @@
# Check if flash attention configuration is correct
assert out.shape == (1, 8, 32, 64)

# Test case for configuring flash attention
def test_flash_attention():
import torch

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Import outside toplevel (torch) Warning test

Import outside toplevel (torch)
output = attention(q, k, v)

assert(output.shape == (2, 4, 6, 8))

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Trailing whitespace Warning test

Trailing whitespace
# Test case for configuring flash attention
def test_flash_attention():
import torch
from zeta.nn import FlashAttention

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Import outside toplevel (zeta.nn.FlashAttention) Warning test

Import outside toplevel (zeta.nn.FlashAttention)
attention = FlashAttention(causal=False, dropout=0.1, flash=True)
output = attention(q, k, v)

assert(output.shape == (2, 4, 6, 8))

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Unnecessary parens after 'assert' keyword Warning test

Unnecessary parens after 'assert' keyword
@@ -120,6 +122,21 @@
# Check if flash attention configuration is correct
assert out.shape == (1, 8, 32, 64)

# Test case for configuring flash attention
def test_flash_attention():

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning test

Missing function or method docstring
@kyegomez kyegomez merged commit 2e50e6f into kyegomez:master Feb 2, 2024
20 of 37 checks passed
kyegomez added a commit that referenced this pull request Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants