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 check-json to pre-commit linters, and fix invalid ann-bench JSON config #1894

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

benfred
Copy link
Member

@benfred benfred commented Oct 12, 2023

The ann-bench conf files had a couple of datasets with invalid JSON config files, causing them to fail to run.

This adds a check-json pre-commit hook to detect invalid json, which would have failed on these files with:

python/raft-ann-bench/src/raft-ann-bench/run/conf/mnist-784-euclidean.json: Failed to json decode (Expecting value: line 1 column 1 (char 0))
python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-inner.json: Failed to json decode (Expecting ',' delimiter: line 686 column 7 (char 15218))

…files

The ann-bench conf files had a couple of datasets with invalid JSON config files,
causing them to fail to run.

This adds a check-json pre-commit hook to detect invalid json, which would have
failed on these files with:

```
python/raft-ann-bench/src/raft-ann-bench/run/conf/mnist-784-euclidean.json: Failed to json decode (Expecting value: line 1 column 1 (char 0))
python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-inner.json: Failed to json decode (Expecting ',' delimiter: line 686 column 7 (char 15218))
```
@benfred benfred added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Oct 12, 2023
@benfred benfred requested a review from a team as a code owner October 12, 2023 17:28
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

LGTM!

@cjnolet
Copy link
Member

cjnolet commented Oct 12, 2023

/merge

@rapids-bot rapids-bot bot merged commit 637019e into rapidsai:branch-23.12 Oct 12, 2023
59 checks passed
@benfred benfred deleted the json_lint branch October 12, 2023 21:08
divyegala pushed a commit to divyegala/raft that referenced this pull request Oct 17, 2023
…config (rapidsai#1894)

The ann-bench conf files had a couple of datasets with invalid JSON config files, causing them to fail to run.

This adds a check-json pre-commit hook to detect invalid json, which would have failed on these files with:

```
python/raft-ann-bench/src/raft-ann-bench/run/conf/mnist-784-euclidean.json: Failed to json decode (Expecting value: line 1 column 1 (char 0))
python/raft-ann-bench/src/raft-ann-bench/run/conf/glove-100-inner.json: Failed to json decode (Expecting ',' delimiter: line 686 column 7 (char 15218))
```

Authors:
  - Ben Frederickson (https://github.com/benfred)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#1894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python
Projects
Development

Successfully merging this pull request may close these issues.

2 participants