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

add test for shape validation #7195

Merged
merged 8 commits into from May 24, 2024
Merged

add test for shape validation #7195

merged 8 commits into from May 24, 2024

Conversation

jbkyang-nvi
Copy link
Contributor

@jbkyang-nvi jbkyang-nvi commented May 8, 2024

@jbkyang-nvi jbkyang-nvi force-pushed the kyang-validate-input-shapes branch from b492572 to 005c650 Compare May 8, 2024 00:48
@jbkyang-nvi jbkyang-nvi marked this pull request as ready for review May 14, 2024 23:45
RET=1
fi
set -e

kill $SERVER_PID
wait $SERVER_PID

pip install torch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why pytorch? Should be more flexible using Python backend

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is taken from this reproducer

FIXED_LAST_DIM = 8


def repo_dir():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the idea of moving all logic within Python, can this be common utils?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree but will push back for now. This function needs to be generic then we can refactor other tests.

# server.terminate()
# assert np.allclose(
# bob_result.as_numpy("OUTPUT0"), input_data_2
# ), "Bob's result should be the same as input"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncomment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove? I think anything past the assert is not needed



@pytest.mark.asyncio
async def test_shape_overlapped(repo_dir: str):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add summary on how the test operates?

@yinggeh yinggeh requested a review from GuanLuo May 24, 2024 10:09
@yinggeh yinggeh merged commit b8b0cad into main May 24, 2024
3 checks passed
@yinggeh yinggeh deleted the kyang-validate-input-shapes branch May 24, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants