instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Legit-Labs__legitify__283 | Legit-Labs/legitify | 283 | defect | 17f645eb67847883b4489587994bbe76a44f3d87 | 58063149d95d716378f14e717c11ab79e1021ae3 | feat: added a new format of output for csv files | <!--
Thank you for contributing to this project! Please fill out the information below to help us review this pull request. By explaining why you're making a change (or linking to an issue) and what changes you've made, we can best triage your pull request.
See our [CONTRIBUTING.md](/main/CONTRIBUTING.md) for infor... | diff --git a/internal/outputer/formatter/formatter_csv.go b/internal/outputer/formatter/formatter_csv.go
new file mode 100644
index 00000000..16c24936
--- /dev/null
+++ b/internal/outputer/formatter/formatter_csv.go
@@ -0,0 +1,135 @@
+package formatter
+
+import (
+ "encoding/csv"
+ "bytes"
+ "fmt"
+ "strconv"
+ "strin... | 2 | 2 | 1 | [{"id": "G0", "claim": "The method name formatSummery is misspelled and should be renamed to formatSummary.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The CSV output should write the summary section first and then the failed-policy details, ... | null |
Legit-Labs__legitify__306 | Legit-Labs/legitify | 306 | defect | c4118c9fe69c57474d08bc2b4396211d7b07e4bc | 1216c7de77e05e51ae07b68ca7950b3318b7b1c9 | feat: added stale secret policies for repo and org |
#### Check off the following:
- [x] This PR follows the CONTRIBUTION.md guidelines
- [x] I have self-reviewed my changes before submitting the PR
| diff --git a/internal/clients/github/client.go b/internal/clients/github/client.go
index 94931248..0724c81d 100644
--- a/internal/clients/github/client.go
+++ b/internal/clients/github/client.go
@@ -4,12 +4,6 @@ import (
"bytes"
"context"
"fmt"
- "log"
- "net/http"
- "regexp"
- "strings"
- "sync"
-
"github.com/... | 5 | 5 | 3 | [{"id": "G0", "claim": "collectOrgSecrets should return ([]*Secrets, err) so the error from GetOrganizationSecrets reaches the caller instead of being swallowed.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "In collectOrgSecrets the GetOrganizationSecre... | null |
Legit-Labs__legitify__307 | Legit-Labs/legitify | 307 | defect | b09cbd3040216bc221e1f97993c273fc6804d130 | 730caf054c4f43be4da22d0d813c55f7fbebf929 | docs: align policy structure | #### What's being changed?
- Rego Policies Structure Alignment:
- Ensure that all policies are following the same structure
- For remediationSteps and threat, use sequence dashes if they’re defined as arrays.
- Add line numbers to each item in the multi-line array.
- Avoid wrapping each “sequenc... | diff --git a/policies/github/actions.rego b/policies/github/actions.rego
index 8d10bd3e..808ff549 100644
--- a/policies/github/actions.rego
+++ b/policies/github/actions.rego
@@ -6,16 +6,21 @@ package actions
# description: By not limiting GitHub Actions to specific repositories, every user in the organization is able... | 7 | 6 | 0 | [{"id": "G0", "claim": "Trailing periods are still left on numbered list items - the threat item in policies/github/member.rego and the remediation step in policies/github/actions.rego - and should be removed to match the aligned style.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "... | null |
Legit-Labs__legitify__31 | Legit-Labs/legitify | 31 | defect | 61fffc6dcd95f7fb9ba6d3a02de2de9632c7b122 | 3242be316b02bc51f83815d3ee9053e9fbd62136 | feat: runner group policies | #### What's being changed?
added runner_group namespace and policies
#### Is this PR related to an existing issue?
No
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/README.md b/README.md
index c27aad5d..9a5a6fd2 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,8 @@ go run main.go analyze ...
```
admin:org, read:enterprise, admin:org_hook, read:org, repo, read:repo_hook
```
-See [Creating a Personal Access Token](https://docs.github.com/en/authentication/ke... | 11 | 8 | 1 | [{"id": "G0", "claim": "The new collectors field makes collectorCreators redundant, and collector creation should stay delayed to the concurrent-execution phase as previously intended.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "ExtendedOrg should exp... | null |
Legit-Labs__legitify__311 | Legit-Labs/legitify | 311 | defect | a2204c61b75295d9434ac9b909fda79785747488 | 8f65f60b341a7e8c3cb4e6035fdbfc38080a858c | feat: Add policy for detecting GitHub Secret-Scanning | * Add collection of 'Security and Analysis' settings for github repos
<!--
Thank you for contributing to this project! Please fill out the information below to help us review this pull request. By explaining why you're making a change (or linking to an issue) and what changes you've made, we can best triage your pu... | diff --git a/internal/analyzers/skippers/skippers.go b/internal/analyzers/skippers/skippers.go
index 8234334c..48fdbb81 100644
--- a/internal/analyzers/skippers/skippers.go
+++ b/internal/analyzers/skippers/skippers.go
@@ -39,6 +39,14 @@ func NewSkipper(ctx context.Context) Skipper {
"enterprise": func(_ collectors... | 6 | 4 | 2 | [{"id": "G0", "claim": "The policy description needs rephrasing because the secret-scanning issue applies to private repositories as well, not only public ones.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new withSecurityAndAnalysis handlin... | null |
Legit-Labs__legitify__318 | Legit-Labs/legitify | 318 | defect | 286b90bb626acbe827df612d18a09f0d86c31be8 | 2337eabe748dfb5ec6a6e177693316528d5cf308 | feat: modified too many admins policy from flat number to percentage based |
- [V ] This PR follows the CONTRIBUTION.md guidelines
- [V ] I have self-reviewed my changes before submitting the PR
| diff --git a/policies/github/repository.rego b/policies/github/repository.rego
index ebecfb03..eaa3c833 100644
--- a/policies/github/repository.rego
+++ b/policies/github/repository.rego
@@ -32,7 +32,7 @@ repository_not_maintained := false {
# METADATA
# scope: rule
# title: Repository Should Have Fewer Than Three A... | 2 | 2 | 1 | [{"id": "G0", "claim": "The policy's title metadata should also be altered, since it still reads 'Repository Should Have Fewer Than Three Admins' after the rule became percentage-based.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The parentheti... | null |
Legit-Labs__legitify__46 | Legit-Labs/legitify | 46 | defect | b9c5a2b5575085a5804ed64cd7c68efbbd395a30 | 73a6ca87ac71e4aaeaa86521dedbed3f6c61b3b2 | feat: policy GitHub actions default permissions | #### What's being changed?
Added GitHub actions policies for the repository & actions namespaces.
#### Is this PR related to an existing issue?
https://github.com/Legit-Labs/legitify/issues/28
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my ch... | diff --git a/go.mod b/go.mod
index fddc442c..dc3f0600 100644
--- a/go.mod
+++ b/go.mod
@@ -44,6 +44,7 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
+ github.com/google/go-github v17... | 5 | 5 | 1 | [{"id": "G0", "claim": "The threat description of the 'Default workflow token permission is not read only' rule in actions.rego should be rewritten to say what an attacker can do with the compromised token.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl... | null |
Legit-Labs__legitify__51 | Legit-Labs/legitify | 51 | defect | 55c3422c0cea101c5572fe8707adc0937366c35a | f40715b47577f5d52bcc7a2dfce106d01dfc75ea | fix: GHES intergration | #### What's being changed?
Separated the get deps graph API call to support gh versions that don't support it
#### Is this PR related to an existing issue?
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/internal/collected/github/repository.go b/internal/collected/github/repository.go
index 4fceb3dc..7c0451fe 100644
--- a/internal/collected/github/repository.go
+++ b/internal/collected/github/repository.go
@@ -28,17 +28,16 @@ type GitHubQLRepositoryCollaborators struct {
}
type GitHubQLRepository struc... | 1 | 1 | 0 | [{"id": "G0", "claim": "The helper getDependencyGraphManifestsCount should be renamed (e.g. to withDependencyGraphManifestsCount) so its name makes clear the field is added to the repo rather than just returned.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Legit-Labs__legitify__65 | Legit-Labs/legitify | 65 | defect | 6fd720aaa278a870cfdced4230d3768125ddc688 | c136aa7f22ac148d332f100f836fa2fa72295b2b | policy: gitlab server policies | #### What's being changed?
- Added GitLab server policies
- Generic hooksList enrichment
-
#### Is this PR related to an existing issue?
No
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/go.mod b/go.mod
index db55f8b2..d4577ae4 100644
--- a/go.mod
+++ b/go.mod
@@ -12,11 +12,13 @@ require (
github.com/olekukonko/tablewriter v0.0.5
github.com/open-policy-agent/opa v0.43.1
github.com/ossf/scorecard/v4 v4.4.0
+ github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/shurcooL/githu... | 1 | 1 | 1 | [{"id": "G0", "claim": "PaginateResults should stop when resp.CurrentPage == resp.TotalPages instead of when resp.NextPage == 0.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Legit-Labs__legitify__71 | Legit-Labs/legitify | 71 | defect | 066a48870fe117beba44a26f5161e1efe28b6ed3 | 93a17fdfe429075987e195546a02dc0e9af2154f | fix: added repos unit tests and fixed policy bugs | #### What's being changed?
Added unit tests and fixed bugs
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/policies/github/repository.rego b/policies/github/repository.rego
index c5f87145..3c4ca0d4 100644
--- a/policies/github/repository.rego
+++ b/policies/github/repository.rego
@@ -19,6 +19,8 @@ repository_not_maintained {
monthsIndex := 1
inactivityMonthsThreshold := 3
+ yearIndex := 0
+ diff[y... | 3 | 3 | 2 | [{"id": "G0", "claim": "The added `diff[yearIndex] > 0` guard makes `repository_not_maintained` fail to flag repositories inactive for more than 3 months but less than a year (diff_year == 0 and diff_month > 3) in both the GitHub and GitLab policies.", "category": "correctness", "verdict": "supported", "priority": "P1"... | null |
Legit-Labs__legitify__73 | Legit-Labs/legitify | 73 | defect | 066a48870fe117beba44a26f5161e1efe28b6ed3 | f1d3c356d19c8dfddec8583bb2cd1c8e62369557 | feat: gitlab e2e tests | #### What's being changed?
Added e2e for gitlab
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/.github/workflows/e2e_testing.yaml b/.github/workflows/e2e_testing.yaml
index 97de8781..e96a9736 100644
--- a/.github/workflows/e2e_testing.yaml
+++ b/.github/workflows/e2e_testing.yaml
@@ -8,7 +8,8 @@ on:
permissions:
contents: read
env:
- REPORT_FILE_PATH: /tmp/out.json
+ GITHUB_REPORT_FILE_PATH: ... | 4 | 4 | 0 | [{"id": "G0", "claim": "Set LEGITIFY_TOKEN as a step-level env instead of prefixing it inline on the run command, for both the GitHub and the GitLab test steps.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Better to run the tests in a separate... | null |
Legit-Labs__legitify__75 | Legit-Labs/legitify | 75 | defect | b83edcb7c18a7ef1ae14b5803d614fa9ebfb0044 | 8b6c28ce38c2eb2d702f8bfc5fe916b2c4a562fa | feat: added reject unsinged commits policy | <!--
Thank you for contributing to this project! Please fill out the information below to help us review this pull request. By explaining why you're making a change (or linking to an issue) and what changes you've made, we can best triage your pull request.
See our [CONTRIBUTING.md](/main/CONTRIBUTING.md) for infor... | diff --git a/internal/collected/gitlab_collected/repository.go b/internal/collected/gitlab_collected/repository.go
index 55c5672f..987d1616 100644
--- a/internal/collected/gitlab_collected/repository.go
+++ b/internal/collected/gitlab_collected/repository.go
@@ -10,6 +10,7 @@ type Repository struct {
Members ... | 3 | 3 | 2 | [{"id": "G0", "claim": "Rename the new collector function extendProjectWithPushRul to fix the typo (Rul -> Rule).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Do not use the rules value when GetProjectPushRules returns an error, since it is no... | null |
Legit-Labs__legitify__77 | Legit-Labs/legitify | 77 | defect | 08a814f531308ce033ed7d8a238e688b16b3e3fa | 6556f6d7ceac2ac42e766ec279bd43ea0373cfee | test: e2e for GitHub branch protection | #### What's being changed?
added e2e test for the GitHub repository policies
#### Is this PR related to an existing issue?
No
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/.github/workflows/e2e_testing.yaml b/.github/workflows/e2e_testing.yaml
index 02255b6e..08853087 100644
--- a/.github/workflows/e2e_testing.yaml
+++ b/.github/workflows/e2e_testing.yaml
@@ -17,10 +17,12 @@ jobs:
report_file_path: /tmp/gh_out.json
scm: github
test_plan... | 1 | 1 | 0 | [{"id": "G0", "claim": "Please add upload of the error log as an artifact to the e2e workflow.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Legit-Labs__legitify__79 | Legit-Labs/legitify | 79 | defect | 1c4785a185d8a7a343480ff9a28c3cfd544be328 | 76dbd1300f357fea3267da5dfc1b2d43979e92fc | feat: add gitlab policies | #### What's being changed?
Added Policies:
- Minimum required approvals
- Merge request authors may override the approvers list
- Repository Allows Review Requester To Approve Their Own Request
- Repository Dismiss Stale Reviews
- Repository Allows Committer Approvals Policy
- Code review is not limited to cod... | diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go
index 6e632319..e1bc4858 100644
--- a/e2e/e2e_test.go
+++ b/e2e/e2e_test.go
@@ -70,6 +70,41 @@ func TestGitLab(t *testing.T) {
failedEntity: "failed_repo",
passedEntity: "passed_repo",
},
+ {
+ path: "data.repository.code_review_by_two_members_not_req... | 2 | 1 | 0 | [{"id": "G0", "claim": "Delete the tutorial-style comments in the new extendProjectWith* functions (e.g. '// Initialize minimum required approvals to 0').", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the comments remaining in extendProj... | null |
Legit-Labs__legitify__81 | Legit-Labs/legitify | 81 | defect | 98d79cc0285c66774ab7a417eb38858c6ef62826 | 1ae6224d49003397de92c004a41cc725a775aaf5 | test: gitlab e2e | #### What's being changed?
added gitlab e2e
#### Is this PR related to an existing issue?
No
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/cmd/common_providers.go b/cmd/common_providers.go
index dd1c6984..34dbb440 100644
--- a/cmd/common_providers.go
+++ b/cmd/common_providers.go
@@ -60,5 +60,7 @@ func provideContext(client Client, logger *log.Logger) (context.Context, error)
logger.Printf("Note: to get the OpenSSF scorecard results for th... | 3 | 3 | 1 | [{"id": "G0", "claim": "Move the hardcoded jq path \"aux->entityName\" in e2e/e2e_test.go into a const.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replace the duplicated passed/failed/skipped assertion blocks in e2e/e2e_test.go with a shared... | null |
Legit-Labs__legitify__91 | Legit-Labs/legitify | 91 | defect | 7c96ee192f7f5658a7aab7787637468525e8647e | b9bd7fbe899421b24ef053aacfd74b1212bbf7e9 | feat: generalized SCM terms | #### What's being changed?
README.MD file - general SCM terms
#### Check off the following:
- [X] This PR follows the CONTRIBUTION.md guidelines
- [X] I have self-reviewed my changes before submitting the PR
| diff --git a/README.md b/README.md
index b5c53f3f..ed9edffe 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,8 @@
<img width="250" alt="Legitify Logo" src="https://user-images.githubusercontent.com/74864790/174815311-746a0c98-9a1f-44a9-808c-035788edfd4d.png">
-Strengthen the security posture of your GitHub orga... | 8 | 8 | 0 | [{"id": "G0", "claim": "Move the Requirements section under the Usage section, above GitHub Enterprise Support.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tagline should read 'Strengthen the security posture of your GitHub/GitLab servers' ... | null |
LeonHartley__Coerce-rs__21 | LeonHartley/Coerce-rs | 21 | defect | 78f0490486495cba47cceeabfcb213bf6767fd84 | 5a16c7c134a859f42cb2d25941ffff59df902184 | Feature/add notify and clone to receiver | Hi Leon,
here is the pull request we discussed. I attempted to to add tests in the style of your code base. Please let me know if you require me to change anything. | diff --git a/Cargo.lock b/Cargo.lock
index 0900b3c1..d80a0586 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -349,6 +349,8 @@ dependencies = [
[[package]]
name = "coerce-k8s"
version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1a9e728f28e9fd7f093d84db77bae88f2d9e461cc00cc4b... | 1 | 1 | 0 | [{"id": "G0", "claim": "Please run `cargo fmt` — the added trait declaration line is misformatted (missing space before `{`) and other lines have stray trailing whitespace.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
LiamBindle__MQTT-C__51 | LiamBindle/MQTT-C | 51 | defect | f0415152232ecf2ef73a858ccf346e7376515573 | 06f782c5367abb5d60548689cbb698274ab1fa41 | Add anonymous client functionality | > 3.1.3.1 Client Identifier
> ...
> A Server MAY allow a Client to supply a ClientId that has a length of zero bytes, however if it does so the Server MUST treat this as a special case and assign a unique ClientId to that Client. It MUST then process the CONNECT packet as if the Client had provided that unique Client... | diff --git a/examples/reconnect_subscriber.c b/examples/reconnect_subscriber.c
index 04748ab..05c0058 100644
--- a/examples/reconnect_subscriber.c
+++ b/examples/reconnect_subscriber.c
@@ -157,9 +157,13 @@ void reconnect_client(struct mqtt_client* client, void **reconnect_state_vptr)
reconnect_state->s... | 4 | 3 | 2 | [{"id": "G0", "claim": "The server may refuse a NULL/empty client id with CONNACK return code 0x02, so the library must handle that return code and surface the refusal clearly to the user (e.g. a dedicated error code) instead of blindly assuming the anonymous connect succeeds.", "category": "correctness", "verdict": "s... | null |
LibrePCB__LibrePCB__1233 | LibrePCB/LibrePCB | 1,233 | defect | b4a8640404eb07c83464713129561a7914fdf0e3 | 591cb23b641f187a956ac801171532fc741fb9b6 | Add unit test for FileUtils | This PR realizes issue #121
During testing, I found two bugs inside `FileUtils::getFilesInDirectory` functions.
I created issues #1234 and #1236 for them.
One of them is simple copy-paste mistake inside `FileUtils::getFilesInDirectory` and can be simply corrected in #1234.
But the second needs deeper exa... | diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt
index 25babd62e9..4411e0d661 100644
--- a/tests/unittests/CMakeLists.txt
+++ b/tests/unittests/CMakeLists.txt
@@ -34,6 +34,7 @@ add_executable(
core/fileio/csvfiletest.cpp
core/fileio/directorylocktest.cpp
core/fileio/filepathtest.cpp... | 7 | 7 | 1 | [{"id": "G0", "claim": "The capitalization of the SetupFile helper does not comply with the project naming conventions and the name could be more descriptive, e.g. createFile().", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "setupFile silently i... | null |
LibrePCB__LibrePCB__1237 | LibrePCB/LibrePCB | 1,237 | defect | 8d5a2b1bdba8f8ba96433ee11676386d4c1549e2 | e7e94f53c02679f81004801249bb61a2d4e4bfa9 | Use std::hypot() for Point::getLength() calculation | The Testsuite for #1204 revealed maximum value of Point +/- 2m without losing precision
When the qt function `qSqrt` get out and using `std::hypot` instead, The point can be 1e15nm (100km) large in size without loss of precision and any overflow (test on that succeeded)
Amazing that there is no `qHypot` function ... | diff --git a/libs/librepcb/core/types/point.h b/libs/librepcb/core/types/point.h
index 3a67aab539..ab8d5d1041 100644
--- a/libs/librepcb/core/types/point.h
+++ b/libs/librepcb/core/types/point.h
@@ -210,7 +210,7 @@ class Point final {
*/
UnsignedLength getLength() const noexcept {
LengthBase_t length = stat... | 10 | 8 | 0 | [{"id": "G0", "claim": "The reviewer would also be fine with the shorter names PointGetLengthTestData/PointGetLengthTest for the new test, since from his point of view it is just a test for getLength().", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "clai... | null |
LibrePCB__LibrePCB__1755 | LibrePCB/LibrePCB | 1,755 | defect | b2d17863820bf47fd58c02f532f13822b61e4fc4 | 950da8b8a88965a7af8c3897303113789415f2dc | Support loading semi-transparent STEP models | This PR implements support for loading and rendering semi-transparent (RGBA) STEP models in the 3D viewer, enabling more realistic rendering of components such as LEDs.
## Key Changes:
* **Infrastructure**: Updated `OccModel::Color`, `StepExport::Color`, and `OpenGlSceneBuilder::Color` from RGB (3-element tuple)... | diff --git a/libs/librepcb/core/3d/occmodel.cpp b/libs/librepcb/core/3d/occmodel.cpp
index e06ef9fcc0..0599e534c7 100644
--- a/libs/librepcb/core/3d/occmodel.cpp
+++ b/libs/librepcb/core/3d/occmodel.cpp
@@ -50,6 +50,9 @@
#include <Poly_Triangulation.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Version.hxx>
... | 4 | 3 | 3 | [{"id": "G0", "claim": "The new test hard-codes the alpha expectation of the current OCCT 7.9.2 build environment and should be made compatible with older OCC versions (e.g. by adding an #if conditional), since tests may also run locally on developers' computers with unknown OCC versions.", "category": "testing", "verd... | null |
LibrePCB__LibrePCB__211 | LibrePCB/LibrePCB | 211 | defect | cb3f9f576295ff2f80459ff659fe6ea99538a66c | 7c9e76e805d9aba39ac4dc856eef6e8fe763e3c6 | Device editor: Sort pad names numerically, then alphanumerically | I have no idea what I'm doing 😂

Fixes #210 | diff --git a/libs/librepcb/common/toolbox.cpp b/libs/librepcb/common/toolbox.cpp
index 742529c54f..a2f86278a0 100644
--- a/libs/librepcb/common/toolbox.cpp
+++ b/libs/librepcb/common/toolbox.cpp
@@ -76,6 +76,16 @@ Length Toolbox::shortestDistanceBetweenPointAndLine(const Point& p, const Point&
return (p - np).getL... | 4 | 3 | 0 | [{"id": "G0", "claim": "The sorting logic should live in libs/librepcb/common (as a Toolbox helper converting a QString to a numeric-or-string QVariant used with setData) instead of as a separate class.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ... | null |
LibrePCB__LibrePCB__57 | LibrePCB/LibrePCB | 57 | defect | c11b01d39e3369041cefc318f769ceabe9f0f8bc | 60b880d4e21830750a4d8ab090165d083af52d45 | Add ScopeGuard implementation | - [x] Cleanup commit messages
- [x] Add ASCII art according to the project style
- [x] Add some documentation
- [x] ScopeGuardList should call cleanup actions in reverse order
Inspired by
https://channel9.msdn.com/Shows/Going+Deep/C-and-Beyond-2012-Andrei-Alexandrescu-Systematic-Error-Handling-in-C
| diff --git a/libs/librepcbcommon/librepcbcommon.pro b/libs/librepcbcommon/librepcbcommon.pro
index 8f5bc91cf4..15e0e127ee 100644
--- a/libs/librepcbcommon/librepcbcommon.pro
+++ b/libs/librepcbcommon/librepcbcommon.pro
@@ -64,7 +64,8 @@ HEADERS += \
geometry/polygon.h \
geometry/ellipse.h \
geometry/text... | 6 | 2 | 0 | [{"id": "G0", "claim": "Classes with no virtual members (not even the destructor), such as ScopeGuard, should be declared with the \"final\" keyword.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "If mF() throws inside the ScopeGuard destructor there is ... | null |
LibrePDF__OpenPDF__1166 | LibrePDF/OpenPDF | 1,166 | defect | 4429464bb3ffaca54ff7f768e422f8d478a7b5b1 | bd7ab68df5c63dee6a548c99580906015fc20574 | Allow PdfCopy to be used for writing new pages | ## Description of the new Feature/Bugfix
Remove unnecessary overridden methods from PdfCopy thus allowing it to be used to write new pages as well as copy them.
Related Issue: This fixes #1165
## Unit-Tests for the new Feature/Bugfix
- [X] Unit-Tests added to reproduce the bug
- [X] Unit-Tests added to th... | diff --git a/openpdf/src/main/java/com/lowagie/text/pdf/PdfCopy.java b/openpdf/src/main/java/com/lowagie/text/pdf/PdfCopy.java
index dcdb79eb2e..f8e3211547 100644
--- a/openpdf/src/main/java/com/lowagie/text/pdf/PdfCopy.java
+++ b/openpdf/src/main/java/com/lowagie/text/pdf/PdfCopy.java
@@ -489,17 +489,6 @@ public void ... | 2 | 1 | 1 | [{"id": "G0", "claim": "It is not certain that allowing PdfCopy to manipulate the content of the document (by removing the no-op overrides so PdfWriter's real methods are called) is what the original author planned for the class.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, ... | null |
LibrePDF__OpenPDF__125 | LibrePDF/OpenPDF | 125 | defect | ce6099ccfd53ca781ac26cb6cebb3bb918d4d52e | 20539e4dbf8431a2c737dd39e46f2f7d10864e84 | refactor: constraining alignment settings | Current API for vertical/horizontal alignment setting for table elements is not constrained at all, leading to errors. Also, in absence of documentation, it's not obvious (for me, actually) how to set alignment properly.
PR introduces enum types for available alignment modes as well as its application to table elemen... | diff --git a/openpdf/src/main/java/com/lowagie/text/Cell.java b/openpdf/src/main/java/com/lowagie/text/Cell.java
index 50bcf591c..dbabb0b31 100644
--- a/openpdf/src/main/java/com/lowagie/text/Cell.java
+++ b/openpdf/src/main/java/com/lowagie/text/Cell.java
@@ -50,6 +50,10 @@
package com.lowagie.text;
+import com.l... | 3 | 1 | 0 | [{"id": "G0", "claim": "Add JavaDoc to the new methods this pull request introduces, such as the new override methods in Cell.java.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add JavaDoc to the new setHorizontalAlignment(HorizontalAlignment) m... | null |
LibrePDF__OpenPDF__612 | LibrePDF/OpenPDF | 612 | defect | c6650ad2a9ab615bcbf135aa8bfcbf6bc175416a | 605904dcab69e4da82430b75971f3ce2fdb48005 | Remove ITXT from PdfName |
## Description of the Feature
- removed ITXT and usage of it from code
- Added Test for PdfStamperImp due to signature change
Related Issue: #610
## Unit-Tests for the new Feature/Bugfix
- [x] Unit-Tests added
## Compatibilities Issues
None expected.
| diff --git a/openpdf/src/main/java/com/lowagie/text/pdf/PdfName.java b/openpdf/src/main/java/com/lowagie/text/pdf/PdfName.java
index 44d4cd9a0..0b5d65df2 100644
--- a/openpdf/src/main/java/com/lowagie/text/pdf/PdfName.java
+++ b/openpdf/src/main/java/com/lowagie/text/pdf/PdfName.java
@@ -74,31 +74,44 @@
* @see ... | 1 | 1 | 1 | [{"id": "G0", "claim": "Removing the PdfName constant ITXT is not a good idea because it is part of OpenPDF's public API; it should first be declared deprecated and only be removed after a deprecation period (half a year, a full year, or a major version change).", "category": "design", "verdict": "supported", "priority... | null |
Lightning-AI__LitServe__113 | Lightning-AI/LitServe | 113 | defect | aea07b97bac6498b9ed69f6cb1f2e002f68d76ea | 2f27ef848dd4d51a8ced4cb3b3ea562b225508f0 | feat: Update OpenAI spec to include image url in message content | <details>
<summary><b>Before submitting</b></summary>
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [x] Did... | diff --git a/README.md b/README.md
index d16c33f55..456008503 100644
--- a/README.md
+++ b/README.md
@@ -640,7 +640,90 @@ if __name__ == "__main__":
server = ls.LitServer(GPT2LitAPI(), spec=ls.OpenAISpec())
server.run(port=8000)
```
+
+
+LitServe's OpenAISpec also enables capability to handle images in... | 6 | 6 | 1 | [{"id": "G0", "claim": "Add a test and a minimal end-to-end example in the README, covering sending a request with image content and checking it parses without breaking.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The README example would be nicer if... | null |
Lightning-AI__LitServe__126 | Lightning-AI/LitServe | 126 | defect | 3758b1e3d81f06844a11f8cb9f5e82210bf0cb63 | 7dba41f3caeddcd042d0bbec39b381eec74a841a | pre-populate context with OpenAISpec | ## User motivation
While using OpenAISpec users have to track the openai ChatCompletion request parameters manually in decode_request and most of the time users will need these parameters. LitServe can automatically pre-populate `context` with the parameters so that user don't have to do it manually in decode_reques... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index def5c69d6..829b01dbb 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -170,6 +170,8 @@ def run_streaming_loop(lit_api: LitAPI, lit_spec, request_queue: Queue, request_
try:
context = {}
+ if isinstan... | 3 | 3 | 1 | [{"id": "G0", "claim": "The streaming loop should not be specific to OpenAISpec; the condition should be to call populate_context whenever the spec implements it (capability check instead of the isinstance check).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl... | null |
Lightning-AI__LitServe__136 | Lightning-AI/LitServe | 136 | defect | 5e6eeddf4e6f4c5cb363286aaa825bc1d979d5ab | 5b0e6b80ec7bf28d29f7de6209be85490f254d42 | custom api endpoint path | As discussed in #90, a public facing endpoint path should match the functionality to reduce confusion. Example, `/classify` to be used for classification and `/segment` to be used for segmentation.
The default endpoint remains to be `/predict`.
| diff --git a/README.md b/README.md
index 10b873722..8d3eac596 100644
--- a/README.md
+++ b/README.md
@@ -821,6 +821,26 @@ if __name__ == "__main__":
</details>
+<details>
+ <summary>Customize endpoint path</summary>
+
+
+
+By default, LitServe exposes the `/predict` endpoint for serving the model.
+You can... | 1 | 1 | 0 | [{"id": "G0", "claim": "The README summary should read \"Customize the endpoint path\" instead of \"Customize endpoint path\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Lightning-AI__LitServe__174 | Lightning-AI/LitServe | 174 | defect | b090c25c9e4783da133e9b5898c4e40c3b2afa2f | 0e01535ceb71eb16eca016ced04c8e3674ba4915 | Add max payload size middleware | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index d8131bd44..b5cbcbd3b 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -32,6 +32,9 @@
from fastapi.security import APIKeyHeader
from starlette.middleware.gzip import GZipMiddleware
from starlette.formparsers import MultiPartParser
+... | 2 | 2 | 2 | [{"id": "G0", "claim": "The middleware should be verified against a bad actor who spoofs the content-length header (e.g. sending a smaller content-length), since the check trusts that header.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The actual re... | null |
Lightning-AI__LitServe__178 | Lightning-AI/LitServe | 178 | defect | 0574073e4a3f583be32312f1444da73b4d77432a | df564c95739c4921e400cbdf9d30fa5f92e28338 | Make mp.Queue.get async for response queue | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml
index 06cc8e5eb..30e4f47ee 100644
--- a/.github/workflows/ci-testing.yml
+++ b/.github/workflows/ci-testing.yml
@@ -63,7 +63,9 @@ jobs:
pip list
- name: Tests
- run: coverage run --source litserve -m pytest src t... | 1 | 1 | 0 | [{"id": "G0", "claim": "The CI Tests step should run the test suite via `python -m pytest --cov=litserve src/ tests/ -v` instead of the multi-line coverage invocation with the debug echo of \"Test completed!\".", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Lightning-AI__LitServe__185 | Lightning-AI/LitServe | 185 | defect | 4d5d1466ad4c43a87c189ac418ef179ae5b508e0 | e1b062883baf6ced23058e3cfe0c75d081215aee | Add warning message if `batch` and `unbatch` is implemented but max_batch_size is unset. | <details>
<summary><b>Before submitting</b></summary>
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index 3d5b7e499..5dca7df31 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -22,6 +22,8 @@
import sys
import time
import uuid
+import warnings
+from collections import deque
from concurrent.futures import ThreadPoolExecutor
from contex... | 1 | 1 | 1 | [{"id": "G0", "claim": "LitAPI always has default `batch` and `unbatch` methods, so the warning's condition on `lit_api.__class__.__dict__` might always be true; the check should instead detect whether the user actually implemented `batch` and `unbatch`, as done in api.py.", "category": "correctness", "verdict": "suppo... | null |
Lightning-AI__LitServe__192 | Lightning-AI/LitServe | 192 | defect | 482363035d048088b6958ddab9b226ede3d933e0 | 4eceba29aec63748e948200d208b3e77fe47815d | properly shutdown litserve workers | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index 68f90053a..58337d1bb 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -717,15 +717,16 @@ def run(
elif uvicorn_worker_type is None:
uvicorn_worker_type = "process"
- servers = self._start_server(port, nu... | 2 | 1 | 1 | [{"id": "G0", "claim": "A test should be added that makes the run path raise via a side-effect and asserts that worker shutdown/termination is actually called.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Borda questions why the finally block is neede... | null |
Lightning-AI__LitServe__205 | Lightning-AI/LitServe | 205 | defect | 8ff924a3dc174146d53ea25cf7d5fb17e660ece2 | 8f508c4308c858432a2e5266daff0c78d0c90e04 | Enable parity test for GPU | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml
index 110abd8ae..0c2fde863 100644
--- a/.azure/gpu-tests.yml
+++ b/.azure/gpu-tests.yml
@@ -30,7 +30,7 @@ jobs:
PIP_CACHE_DIR: "/var/tmp/pip"
container:
- image: "pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime"
+ image: "pytorch/pytorch:2.3... | 3 | 1 | 0 | [{"id": "G0", "claim": "The GPU test container image should be bumped to the latest PyTorch release (2.4.0-cuda12.1-cudnn8-runtime) instead of 2.3.1.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The pip install line in the GPU parity job shoul... | null |
Lightning-AI__LitServe__269 | Lightning-AI/LitServe | 269 | defect | 788e960963afe803cf3044df87fcc2ab725da0f4 | 3ae2331d7c35146657344c96b1d353ed7930d156 | add perf test CI 1/3 | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml
index 198296ced..b0136ea85 100644
--- a/.azure/gpu-tests.yml
+++ b/.azure/gpu-tests.yml
@@ -86,7 +86,12 @@ jobs:
displayName: "Statistics"
- bash: |
- pip install jsonargparse torch torchvision -U -q --find-links=${TORCH_URL}
+ ... | 5 | 3 | 0 | [{"id": "G0", "claim": "Move the hard-coded sample phrases in simple_benchmark.py into a data folder/file.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The server-start polling should use shorter sleeps with more iterations, since accumulating such wai... | null |
Lightning-AI__LitServe__284 | Lightning-AI/LitServe | 284 | defect | 44e0fe9ab671be4df560fc78e0cb32af96634328 | f5ed64cd0ade0d54cc7259a5b2eb0f29bd64af77 | [Feat]: add Logger API | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/__init__.py b/src/litserve/__init__.py
index 41f3efea7..6b41589a4 100644
--- a/src/litserve/__init__.py
+++ b/src/litserve/__init__.py
@@ -17,5 +17,6 @@
from litserve import test_examples
from litserve.specs.openai import OpenAISpec
from litserve.callbacks import Callback
+from litserve.log... | 5 | 4 | 4 | [{"id": "G0", "claim": "The reviewer asks for tests covering self.log in LitAPI without callbacks/loggers and with a logger, plus the untested combination of no self.log with a logger and a callback, which the author confirms is not yet covered.", "category": "testing", "verdict": "supported", "priority": "P1", "scope"... | null |
Lightning-AI__LitServe__300 | Lightning-AI/LitServe | 300 | defect | e4d6b4aab221c3cc93daa49b413700e6d2d6a6ef | 353b0fcfbf93fdaa42c3740ec7a49a4303dd779f | Add warning for unexpected model output in batched prediction | <details>
<summary><b>Before submitting</b></summary>
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
#294
- [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- ... | diff --git a/src/litserve/loops.py b/src/litserve/loops.py
index f6537cd8d..c0fa15a44 100644
--- a/src/litserve/loops.py
+++ b/src/litserve/loops.py
@@ -208,9 +208,14 @@ def run_batched_loop(
callback_runner.trigger_event(EventTypes.BEFORE_PREDICT, lit_api=lit_api)
y = _inject_context(contexts... | 2 | 2 | 1 | [{"id": "G0", "claim": "The cleanest way to warn about unexpected string output is to put the check in LitAPI (src/litserve/api.py) as discussed in issue #294, instead of inside run_batched_loop in loops.py.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
Lightning-AI__LitServe__309 | Lightning-AI/LitServe | 309 | defect | 6b1ccc7fd86671062ad8fca7f03e5d48ad630340 | 4e38369c36bdbabe017af4f62a663064916ad955 | switch to `argparse` for CLI | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/requirements.txt b/requirements.txt
index 28e7b3ea2..b04675820 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,3 @@
fastapi >=0.100
httpx
uvicorn[standard] >=0.29.0
-jsonargparse[signatures]>=4.29.0
diff --git a/src/litserve/__main__.py b/src/litserve/__main__.py
index 6f8aa6cee..76e4c71... | 3 | 2 | 0 | [{"id": "G0", "claim": "os.remove(dummy_server_file) should be called before the assertions in test_dockerize_command, so the dummy file is deleted even if an assertion fails.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The commented-out placeholder ... | null |
Lightning-AI__LitServe__336 | Lightning-AI/LitServe | 336 | defect | 6dbb793a09ba9384fa55107f7197d6211e94fe9d | 74cecb7e7dfa3de4e46c4716b2a9e6b85169d0f6 | Test multiple Python version compatibility | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/.github/workflows/ci-minimal-dependency-check.yml b/.github/workflows/ci-minimal-dependency-check.yml
index 5acea8dbe..159b00bb2 100644
--- a/.github/workflows/ci-minimal-dependency-check.yml
+++ b/.github/workflows/ci-minimal-dependency-check.yml
@@ -21,7 +21,7 @@ jobs:
- name: Set up Python
... | 3 | 3 | 0 | [{"id": "G0", "claim": "The include entry for windows-latest in ci-testing.yml should run Python 3.11 instead of 3.12.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Drop \"3.12\" from the ci-testing.yml python-version matrix for now, leaving a \"# todo... | null |
Lightning-AI__LitServe__356 | Lightning-AI/LitServe | 356 | defect | 23ba5e2386d34afaac77ec5881ef5f4959885a89 | c97e5d94a116ec82112f41b094234ec3952b619e | Fail fast when LitAPI.setup has error | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/loops.py b/src/litserve/loops.py
index d01c3d6f9..21dab5eb7 100644
--- a/src/litserve/loops.py
+++ b/src/litserve/loops.py
@@ -26,7 +26,7 @@
from litserve import LitAPI
from litserve.callbacks import CallbackRunner, EventTypes
from litserve.specs.base import LitSpec
-from litserve.utils imp... | 2 | 1 | 0 | [{"id": "G0", "claim": "Add documentation (docstrings) explaining the meaning of the workers_setup_status parameter in inference_worker, or sample values for it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use strEnum (from lightning_utilities)... | null |
Lightning-AI__LitServe__37 | Lightning-AI/LitServe | 37 | defect | e5b296ee8dea9f7e84f54799f18d5b41181ca321 | 78860fca689e108bcdf8d6e3c01c6611e6fa5649 | add streaming | <details>
<summary><b>Before submitting</b></summary>
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index a2640e2c9..bfe5f2224 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -45,7 +45,7 @@ def batch(self, inputs):
@abstractmethod
def predict(self, x):
- """Run the model on the input and return the output."""
+ """Run the m... | 6 | 4 | 3 | [{"id": "G0", "claim": "LitServer should verify with inspect.isgeneratorfunction that lit_api.predict and lit_api.encode_response actually yield when streaming=True and return a nice error message if they do not, and tests should cover this behavior.", "category": "correctness", "verdict": "supported", "priority": "P1"... | null |
Lightning-AI__LitServe__375 | Lightning-AI/LitServe | 375 | defect | 7d4e112631887586c55271ce3d6f577de0a86ea1 | ee5ae9299696b0cc1d84d74be36d7bb5770b80a8 | Fix: Replace Deprecated `max_tokens` with `max_completion_tokens` in OpenAI Spec | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/specs/openai.py b/src/litserve/specs/openai.py
index ebcd2880c..8664d9237 100644
--- a/src/litserve/specs/openai.py
+++ b/src/litserve/specs/openai.py
@@ -156,7 +156,7 @@ class ChatCompletionRequest(BaseModel):
temperature: Optional[float] = 0.7
top_p: Optional[float] = 1.0
n: O... | 1 | 1 | 1 | [{"id": "G0", "claim": "Keep the `max_tokens` field with default None in `ChatCompletionRequest` for backward compatibility instead of removing it.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Lightning-AI__LitServe__376 | Lightning-AI/LitServe | 376 | defect | 7d4e112631887586c55271ce3d6f577de0a86ea1 | bdf177973e06d20d8bcb038a1999da3a8ad3c85c | Fix CI: async tests with ASGITransport | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/tests/test_batch.py b/tests/test_batch.py
index 15d12b6e0..dd0cec305 100644
--- a/tests/test_batch.py
+++ b/tests/test_batch.py
@@ -21,7 +21,7 @@
import torch.nn as nn
from asgi_lifespan import LifespanManager
from fastapi import Request, Response
-from httpx import AsyncClient
+from httpx import ASGITr... | 1 | 1 | 1 | [{"id": "G0", "claim": "The pull request should pin a minimum httpx version (the version at which the new ASGITransport argument was introduced), since httpx 0.28.0 deprecated the old AsyncClient(app=...) initialization the PR's tests moved away from.", "category": "correctness", "verdict": "supported", "priority": "P1... | null |
Lightning-AI__LitServe__380 | Lightning-AI/LitServe | 380 | defect | 9a17d2ff6e90cb0d64f1555f7ea14c9f1f208af5 | dcbd59b2a9a6a4d7e96cf164d28c215a75a74cdf | check device format while initialising litserver | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index 4e7e93a52..6288e000b 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -223,9 +223,31 @@ def __init__(
device_list = range(devices)
self.devices = [self.device_identifiers(accelerator, device) for device i... | 4 | 3 | 1 | [{"id": "G0", "claim": "The device-wrap logic should treat not only list but also set or tuple as iterable devices, per the suggested rewrite of the isinstance check.", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tests should be added for the new d... | null |
Lightning-AI__LitServe__393 | Lightning-AI/LitServe | 393 | defect | 75c6d0eb57fe3e22a7d5dae6ddda38caa061de82 | d5e30ef5ae5d58dbf9b3c464659d48aedf6fd518 | Add `loop.pre_setup` to allow fine-grained LitAPI validation based on inference loop | ## What does this PR do?
This PR allows fine-grained validation of LitAPI based on inference loop.
Default loops - will have the same validation as of now but new inference loops such as continuous batching will be able to add more validations such as check `lit_api.predict_start` method exists and won't force a... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index c54a7b80d..7dca4c7ce 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations... | 4 | 2 | 0 | [{"id": "G0", "claim": "LitAPI.max_batch_size is used as a plain in/out value, so wrapping it in a property is unnecessary and it should be removed.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The get_request method should have a docstring that at lea... | null |
Lightning-AI__LitServe__394 | Lightning-AI/LitServe | 394 | defect | 35129f7dc84d8e796a43611358abbb67a34a0c01 | 1fa71aba74de797bf8b9c4a58cf5e52de8ddef43 | Make `LitAPI.predict` optional and validate API implementation | ## What does this PR do?
This PR enables Continuous batching loop to use `LitAPI.step` method and validate methods using the `pre_setup` method.
**Continuous batching with vLLM engine in 40 lines of code.**
```python
from vllm import LLMEngine, EngineArgs, SamplingParams
from litserve.loops import Continuou... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index e2dd9eead..a1f0b8fa4 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -56,10 +56,9 @@ def batch(self, inputs):
return inputs
- @abstractmethod
def predict(self, x, **kwargs):
"""Run the model on the input and return ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Using a dataclass for `seq` instead of a dict would make the code easier to work with in an IDE, since a dataclass is trackable while a dict holds anything.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}] | null |
Lightning-AI__LitServe__411 | Lightning-AI/LitServe | 411 | defect | 23bcb303c9a166e68641b7334000accd0e6c3632 | d64648e6fadf137a2796a224bb3ea41b2572e302 | enable multiple workers for ZMQ | ## What does this PR do?
This PR, enables fast queue using ZMQ for multiple inference workers and encapsulates the socket connection and zmq details for better code readability.
<details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and ... | diff --git a/src/litserve/loops/base.py b/src/litserve/loops/base.py
index 2e9d20707..999a3a3bc 100644
--- a/src/litserve/loops/base.py
+++ b/src/litserve/loops/base.py
@@ -27,6 +27,7 @@
from litserve.callbacks import CallbackRunner
from litserve.specs.base import LitSpec
from litserve.utils import LitAPIStatus
+fro... | 2 | 1 | 1 | [{"id": "G0", "claim": "Resource cleanup in __del__ is not guaranteed to run, so an exit signal handler should be registered instead.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A ZMQ wrapper mirroring the base-queue API would remove the backend switc... | null |
Lightning-AI__LitServe__430 | Lightning-AI/LitServe | 430 | defect | 62b12431dcac0428d6055254c91bafad5ac2d1f5 | 891e4d13714c631d537f335572782ea3e129a88a | Feat: add custom health check logic | ## What does this PR do?
This PR introduces the ability to define custom health check logic in LitAPI, allowing users to tailor health checks to their specific needs.
Fixes #426.
<details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos a... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index 8e3a2b98a..fb760fbad 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -143,3 +143,7 @@ def has_active_requests(self) -> bool:
def has_capacity(self) -> bool:
raise NotImplementedError("has_capacity is not implemented")
+
+ def ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The new health() method needs proper documentation.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test should sleep 1 in the first wait and 4 below, because depending on setup time of the test and client the current sl... | null |
Lightning-AI__LitServe__435 | Lightning-AI/LitServe | 435 | defect | b7e3f6f9a79b6ac0bac0d0a654d0a586e3d6d4c7 | 97e750bba8cb4278b11e4520f09eb3dc08ab6a8e | fix: update type hints for _default_unbatch and _spec attributes in LitAPI class | ### **What does this PR do?**
**fix:** Update type hints for `_default_unbatch` and `_spec` attributes in `LitAPI` class
**Changes:**
- `callable` (lowercase) is not a valid type hint; replaced with `Callable` from `typing`.
- Update type hints for `_default_unbatch` and `_spec` attributes
- Added a val... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index 5e0bb302d..ddaeaff04 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -15,7 +15,7 @@
import warnings
from abc import ABC, abstractmethod
from queue import Queue
-from typing import Optional
+from typing import Callable, Optional
from pydant... | 1 | 1 | 0 | [{"id": "G0", "claim": "The ValueError raised when the default unbatch implementation is unset should be more user friendly, with wording like \"Default implementation for `LitAPI.unbatch` method was not found, please implement LitAPI.unbatch method.\"", "category": "design", "verdict": "supported", "priority": "P2", "... | null |
Lightning-AI__LitServe__465 | Lightning-AI/LitServe | 465 | defect | e9dc9bb839902940ae9d78e5a8260f016017c24d | d8c707b5968ca6922cf083ba4e750c1e098bfbdd | [pre-commit.ci] pre-commit suggestions | <!--pre-commit.ci start-->
updates:
- [github.com/PyCQA/docformatter: 06907d0267368b49b9180eed423fae5697c1e909 → v1.7.5](https://github.com/PyCQA/docformatter/compare/06907d0267368b49b9180eed423fae5697c1e909...v1.7.5)
- [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](https://github.com/astral-sh/ruff-pre-commi... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e8c0413ac..20f121d46 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -38,14 +38,14 @@ repos:
args: ["--print-width=120"]
- repo: https://github.com/PyCQA/docformatter
- rev: 06907d0267368b49b9180eed423fae5697c1e9... | 1 | 1 | 1 | [{"id": "G0", "claim": "The docformatter rev should be reverted to the pinned commit 06907d0267368b49b9180eed423fae5697c1e909 instead of the v1.7.5 tag, keeping the todo that marks the pin as the fix for docformatter after 1.7.5.", "category": "maintainability", "verdict": "supported", "priority": "P1", "scope": "intro... | null |
Lightning-AI__LitServe__468 | Lightning-AI/LitServe | 468 | defect | 509a301d92a732256a8ea1b0f4e77f370409c385 | 0558bd0975f509b89705852e0e66a65bbc5c59e3 | Move batch size to LitAPI | ## What does this PR do?
Batch size is closely attached to LitAPI for batched processing. LitServer doesn't make any use of this value.
Decoupling batch size and batch timeout from LitServer will help in enabling multiple endpoints with a cleaner architecture.
### Old
```py
api = LitAPI()
server = LitSe... | diff --git a/README.md b/README.md
index 7f5f460a7..d3774680b 100644
--- a/README.md
+++ b/README.md
@@ -92,7 +92,7 @@ class SimpleLitAPI(ls.LitAPI):
# (STEP 2) - START THE SERVER
if __name__ == "__main__":
# scale with advanced features (batching, GPUs, etc...)
- server = ls.LitServer(SimpleLitAPI(), acceler... | 4 | 2 | 1 | [{"id": "G0", "claim": "Removing max_batch_size and batch_timeout from the public loop methods' signatures is a breaking change to the public API of these classes.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The BERT perf test should be updated to not... | null |
Lightning-AI__LitServe__479 | Lightning-AI/LitServe | 479 | defect | 005b0ca7118d4a33a6aba23297505a10d394e947 | a5d8a0a8e9c3f2949f883739aa924e18b068d0e0 | Enable true concurrency in async loop | ## What does this PR do?
Follow-up to #477.
The async loop now processes tasks concurrently, so new requests don't have to wait for previous ones to finish.
## PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high ... | diff --git a/src/litserve/loops/simple_loops.py b/src/litserve/loops/simple_loops.py
index c993912f2..a65d12198 100644
--- a/src/litserve/loops/simple_loops.py
+++ b/src/litserve/loops/simple_loops.py
@@ -223,12 +223,16 @@ async def process_requests():
)
continue
- ... | 2 | 1 | 0 | [{"id": "G0", "claim": "Rewrite the concurrency test to use a fixed sleep time (4s) and send about 10 concurrent requests from the client, asserting that all responses arrive within 4 seconds instead of num_requests x 4.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "... | null |
Lightning-AI__LitServe__487 | Lightning-AI/LitServe | 487 | defect | 755a2191daacca3649b1b196bcf7e616909273fe | 856e2d6b43c4f0030affc71d18015a5399dd4057 | Fix: CLI entry point to use lightning_sdk directly | ## What does this PR do?
Updated LitServe cli.py to import and call the lightning_sdk CLI entrypoint instead of invoking subprocess which can lead to infinite process calls.
<details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and do... | diff --git a/src/litserve/cli.py b/src/litserve/cli.py
index 8e6d334bf..1a87dd825 100644
--- a/src/litserve/cli.py
+++ b/src/litserve/cli.py
@@ -12,6 +12,16 @@ def _ensure_lightning_installed():
def main():
_ensure_lightning_installed()
- # Forward CLI arguments to the real lightning command
- cli_args = ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The ImportError message should print the package name wrapped in backticks: \"Please ensure `lightning-sdk` is installed correctly.\"", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
Lightning-AI__LitServe__488 | Lightning-AI/LitServe | 488 | defect | 755a2191daacca3649b1b196bcf7e616909273fe | dcc4ea24b790951d1488acfa3b47419ed5d1f27e | Enable true concurrency in async streaming loop and add tests | ## What does this PR do ?
Follow-up to #478
The async streaming loop now processes tasks concurrently, so new requests don't have to wait for previous ones to finish.
Also, adds tests for async streaming functionality and concurrent request handling. | diff --git a/src/litserve/loops/streaming_loops.py b/src/litserve/loops/streaming_loops.py
index 82f175b55..cf4eaed07 100644
--- a/src/litserve/loops/streaming_loops.py
+++ b/src/litserve/loops/streaming_loops.py
@@ -185,11 +185,13 @@ def run_streaming_loop_async(
callback_runner: CallbackRunner,
):
... | 2 | 2 | 0 | [{"id": "G0", "claim": "Remove the `await asyncio.sleep(0.1)` delay that the pull request added to the `except (Empty, ValueError)` branch of `process_requests` — the reviewer's empty suggestion block asks to delete that line.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}... | null |
Lightning-AI__LitServe__499 | Lightning-AI/LitServe | 499 | defect | 4ec47ba534a698c01f9ba746569a3dfaeb34f7a2 | c9a2275fadb7b32d3da42827bbe7b39f2cbbdfc0 | fix: OpenAI Spec validations to work with async LitAPI | ## What does this PR do ?
Introduce validation messages for async LitAPI functions in the OpenAISpec and add tests to ensure compliance with async requirements. | diff --git a/src/litserve/specs/openai.py b/src/litserve/specs/openai.py
index de3428834..11afeb79a 100644
--- a/src/litserve/specs/openai.py
+++ b/src/litserve/specs/openai.py
@@ -263,6 +263,67 @@ def encode_response(self, output):
```
"""
+ASYNC_LITAPI_VALIDATION_MSG = """LitAPI.decode_request, LitAPI.predict, an... | 5 | 4 | 3 | [{"id": "G0", "claim": "The new enable_async validation should also cover decode_request — raise when it is not async (the suggestion proposed an isasyncgenfunction check, which the reviewer later revised to just checking that the method is async).", "category": "correctness", "verdict": "supported", "priority": "P1", ... | null |
Lightning-AI__LitServe__500 | Lightning-AI/LitServe | 500 | defect | a8787a365e9d6e53e84d157414b8a20ad42e50a6 | 6fda294bd9dea63d5333b7ee43920d0dee4b5c5e | fix OpenAI embedding spec for batching | ## What does this PR do?
This PR addresses two key issues related to request decoding and response formatting when using the OpenAIEmbeddingSpec:
**1. Request Input Wrapping:**
The decode_request function always wraps request.input in a list, which breaks the downstream logic for certain input formats. This PR e... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index 091ed9e22..421680a9a 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -176,6 +176,7 @@ def pre_setup(self, spec: Optional[LitSpec]):
if spec:
self._spec = spec
+ spec._max_batch_size = self.max_batch_size
... | 6 | 1 | 0 | [{"id": "G0", "claim": "The reviewer asks whether there is a reason to hardcode the spec's default max batch size to 1 in LitSpec.__init__.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks whether the test's expected values can be obtaine... | null |
Lightning-AI__LitServe__507 | Lightning-AI/LitServe | 507 | defect | 6eb983b5051f1c6ce87622bdb23006fd83d3dc59 | f97ccaca5553de03688c220dcb4c37dd2e51508f | add shutdown endpoint w/ test | ## What does this PR do?
As a user, I want the ability to shutdown a LitServe server programmatically instead of force quitting. This pull request adds a POST endpoint to the Uvicorn server (labeled /shutdown) which terminates the server using FastAPI's built-in `.should_exit()` function. A unit test has also been add... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index 290176872..10b90f492 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -130,6 +130,7 @@ def __init__(
api_path: str = "/predict",
healthcheck_path: str = "/health",
info_path: str = "/info",
+ shutdown... | 2 | 2 | 2 | [{"id": "G0", "claim": "Also add a test that a request sent after shutdown fails.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Paste the whole terminal trace after shutdown so the reviewer can make sure the shutdown also terminates all the inference p... | null |
Lightning-AI__LitServe__508 | Lightning-AI/LitServe | 508 | defect | 7fcbdfb8d887989df47d294a2a71e16cd1577f67 | b0ede24dc39bed516de546a65c500b2c2f4ca878 | add fpdb for multiprocess debugging using pdb | ## What does this PR do?
Users will be able to set_trace for debugging.
<img width="1109" alt="image" src="https://github.com/user-attachments/assets/ddad896d-ed7d-4872-b06c-d470f6a33e11" />
### Example
```
import litserve as ls
class SimpleLitAPI(ls.LitAPI):
def setup(self, device):
self... | diff --git a/requirements.txt b/requirements.txt
index c2b750867..17e0fdf88 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
fastapi >=0.100
uvicorn[standard] >=0.29.0
pyzmq >=22.0.0
+fpdb
diff --git a/src/litserve/__init__.py b/src/litserve/__init__.py
index d3dd4e210..133424794 100644
--- a/src... | 1 | 1 | 0 | [{"id": "G0", "claim": "The fpdb dependency added to requirements.txt should be pinned to a version.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Lightning-AI__LitServe__512 | Lightning-AI/LitServe | 512 | defect | 4ae91c183bf6eb593aa8aa6503f24eac723c4033 | 429bddc42fc2bf9b52a38d91856ef192277efe5d | move stream, endpoint path, loop to LitAPI initialization | ## What does this PR do?
A part of #492
This PR refactors the initialization of stream, endpoint path, and loop parameters by shifting their management to the LitAPI and updating related references throughout the codebase.
### Changes to `LitAPI` and `LitServer` Configuration:
* **`LitAPI` Initialization**... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index 421680a9a..072af5a3b 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -17,27 +17,43 @@
import warnings
from abc import ABC, abstractmethod
from queue import Queue
-from typing import Callable, Optional
+from typing import TYPE_CHECKING, Callab... | 4 | 4 | 0 | [{"id": "G0", "claim": "The debug print statement in the loop property getter of src/litserve/api.py should be removed or replaced with a logging call (e.g. logging.debug) to avoid unwanted console output in production.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {... | null |
Lightning-AI__LitServe__525 | Lightning-AI/LitServe | 525 | defect | 500b3dfe09a343dc95ef61db810f41680fc1cd9a | 753e359628f4ce4b53c60dd3e496ad31d389dc37 | created shutdown endpoint with API key security and custom passed tests | ## What does this PR do?
Fixes #505.
https://github.com/user-attachments/assets/bb22cf14-bf4f-4cf6-9a3a-ce78ffd77ccb
### Problem
Previous PRs (#507 and #524) attempted to use Uvicorn's `should_exit` flag for shutting down a server. While this approach works with`workers_per_device` = 1, @aniketmaurya fo... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index 8d28a99bc..4169ef4f4 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -27,16 +27,14 @@
from abc import ABC, abstractmethod
from collections import deque
from contextlib import asynccontextmanager
-from multiprocessing.context impor... | 9 | 8 | 3 | [{"id": "G0", "claim": "A ValueError should be raised when `enable_shutdown_api` is set but `SHUTDOWN_API_KEY` is not configured, and the error should suggest how to generate and set the API key.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Rather th... | null |
Lightning-AI__LitServe__529 | Lightning-AI/LitServe | 529 | defect | 7672379f00a145e9a7225744c0533fa8707d9845 | 0561ab4fc4f0ed5068c601de2b7f5afea4277c2c | Fix health and info endpoints when multiple LitAPIs are specified | ## What does this PR do?
Fixes # (issue).
<details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index 94e19d5d7..7ec7978a4 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -662,7 +662,8 @@ async def health(request: Request) -> Response:
if not workers_ready:
workers_ready = all(v == WorkerSetupStatus.READ... | 2 | 1 | 0 | [{"id": "G0", "claim": "A test case should also be added for the health endpoint when multiple LitAPIs are specified.", "category": "testing", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Use `self.litapi_connector` to iterate over the LitAPI/s in the health and info endpoint... | null |
Lightning-AI__LitServe__532 | Lightning-AI/LitServe | 532 | defect | 3c79b6f91330918fa330a91462fea32792946225 | 17e97d0612d6cd458ff7bdffc83845be872adca4 | Shutdown server when workers crash | ## What does this PR do?
Right now, if a worker crashes, the Litserve server stays up and reports it is healthy even though it is very unhealthy and can't serve requests.
Demo of the problem: https://www.loom.com/share/30443d7da3b84741b67006f6f7fbcb35
There are multiple ways this could be handled, either the s... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index ef9a788d7..4c6d399d5 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -564,6 +564,7 @@ def __init__(
self.litapi_request_queues = {}
self._shutdown_event: Optional[mp.Event] = None
self.uvicorn_graceful_time... | 2 | 2 | 0 | [{"id": "G0", "claim": "Use the module's `logger` instance instead of the root `logging` module for the worker-died error message.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Increase the worker-monitor polling interval from 1 second to 5 sec... | null |
Lightning-AI__LitServe__535 | Lightning-AI/LitServe | 535 | defect | 8dfc85f15c866b308f6d02fa1339dc6403d02c1a | 0a24200ea6de916afefdb042d46747a5e3286ae7 | make dependency installation check as utility function | ## What does this PR do?
We will be able to reuse the dependency installation check function (`is_package_installed`) at other places such as in #534
- Updated the `_ensure_lightning_installed` function to use `is_package_installed` from `litserve.utils` instead of `importlib.util.find_spec`.
- Added `is_packag... | diff --git a/src/litserve/cli.py b/src/litserve/cli.py
index dbee8b785..e6801f7b9 100644
--- a/src/litserve/cli.py
+++ b/src/litserve/cli.py
@@ -1,10 +1,11 @@
-import importlib.util
import subprocess
import sys
+from litserve.utils import is_package_installed
+
def _ensure_lightning_installed():
- if not impo... | 2 | 1 | 1 | [{"id": "G0", "claim": "Reuse the tested module_available function from lightning_utilities instead of adding a new is_package_installed helper.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add proper tests for the new is_package_installed utili... | null |
Lightning-AI__LitServe__548 | Lightning-AI/LitServe | 548 | defect | 1ca73c562134f24f31ae4d347a9b5cfdd0bfb7cc | 9cf8a3a59010b599a4a38f3e045df0af1a65c698 | Add reasoning effort parameter to OpenAI Spec ChatCompletionRequest | ## What does this PR do ?
Fixes #547
Introduce a new `reasoning_effort` field to the `ChatCompletionRequest` model and implement corresponding tests to validate its functionality in the API responses. | diff --git a/src/litserve/specs/openai.py b/src/litserve/specs/openai.py
index 166d8d7a6..4b3f9897a 100644
--- a/src/litserve/specs/openai.py
+++ b/src/litserve/specs/openai.py
@@ -176,6 +176,7 @@ class ChatCompletionRequest(BaseModel):
tools: Optional[List[Tool]] = None
tool_choice: Optional[ToolChoice] = To... | 1 | 1 | 0 | [{"id": "G0", "claim": "Move the TestAPIWithReasoningEffort class out of src/litserve/test_examples/openai_spec_example.py and into test_specs.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Lightning-AI__LitServe__561 | Lightning-AI/LitServe | 561 | defect | 9da32904949a2e5b0c75922dda0d2409664d35aa | a97c227a5460ca26ad4096f5722e11dcad2b48ae | MCP package dependency check | ## What does this PR do?
### Before
users would get module not found error.
### After:
Users will see a RuntimeException with guide to install the required package.
```
Traceback (most recent call last):
File "/Users/aniket/Projects/github/LitServe/server.py", line 32, in <module>
mcp=MCP(
... | diff --git a/src/litserve/mcp.py b/src/litserve/mcp.py
index 990230605..312514119 100644
--- a/src/litserve/mcp.py
+++ b/src/litserve/mcp.py
@@ -20,11 +20,6 @@
from contextlib import asynccontextmanager
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union, get_args, get_origin
-import mcp.types as typ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The package check and the mcp imports should not run unconditionally at module import time: the check should be done on MCP init and the imports made conditional, so that importing the module without the package does not fail when MCP is not actually used.", "category": "design", "verdict": "sup... | null |
Lightning-AI__LitServe__568 | Lightning-AI/LitServe | 568 | defect | c4abf01570461f33ac912f4091d4f26fc833f734 | 9cf9736cac54171155d0044757d2534e621ec53d | fix: OpenAIEmbeddingSpec setup check for multi endpoint | ## What does this PR do?
Fixes # (issue).
The OpenAIEmbeddingSpec currently only checks if server.lit_api is set to one. However, LitServe now supports multiple Endpoint , so this PR adds the necessary checks for multiple Endpoint.
| diff --git a/src/litserve/specs/openai_embedding.py b/src/litserve/specs/openai_embedding.py
index 4cacf61ce..c42989fc4 100644
--- a/src/litserve/specs/openai_embedding.py
+++ b/src/litserve/specs/openai_embedding.py
@@ -135,7 +135,19 @@ def setup(self, server: "LitServer"):
super().setup(server)
li... | 3 | 2 | 2 | [{"id": "G0", "claim": "A unit test should be added in tests/unit/test_openai_embedding.py passing the litapi to LitServe both as a list and as a single instance and asserting both work.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The second check sh... | null |
Lightning-AI__LitServe__577 | Lightning-AI/LitServe | 577 | defect | 0ededb428d283861b18a589832eccd74f42fa8e2 | d2d1e6f86107257bcf7c6a858c6a798c407c5e8d | Feat/override-spec-api-path | ## What does this PR do?
Fixes #570.
<details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.m... | diff --git a/src/litserve/constants.py b/src/litserve/constants.py
new file mode 100644
index 000000000..c8b30ae01
--- /dev/null
+++ b/src/litserve/constants.py
@@ -0,0 +1,14 @@
+# Copyright The Lightning AI team.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Consider adding a warning (e.g. 'This may not be compatible with SDKs') where the spec's default api path is overridden.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Lightning-AI__LitServe__581 | Lightning-AI/LitServe | 581 | defect | 103a1cf826cc93207884f46e2ebc856d99f39f7b | 6d4c8111696da8d8063a173c5b9f4139dec3fc5f | chore: Add warnings for custom API paths in OpenAI Chat and Embed specs | ## What does this PR do ?
Introduce warnings when using custom API paths with OpenAI specifications to inform users about the limitations and provide guidance on using the default paths. Include tests to verify the warning behavior.
Follow up to: #577 | diff --git a/src/litserve/specs/openai.py b/src/litserve/specs/openai.py
index ef0cb7fb8..457b3c137 100644
--- a/src/litserve/specs/openai.py
+++ b/src/litserve/specs/openai.py
@@ -18,6 +18,7 @@
import time
import typing
import uuid
+import warnings
from collections import deque
from enum import Enum
from typing ... | 4 | 4 | 0 | [{"id": "G0", "claim": "The custom-API-path warning in OpenAI's pre_setup should be reworded to the shorter 'Custom API path detected' wording.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The custom-API-path warning in the OpenAI Embedding sp... | null |
Lightning-AI__LitServe__582 | Lightning-AI/LitServe | 582 | defect | e3136bf82214fb3ffa651cdef6c0526195d7c844 | e8d54385ff445e69f369975a9b321aeb3faea93f | 🚀 Feature: warning for heavy __init__ method in LitAPI | ## What does this PR do?
Fixes #484.
<details>
<summary><b>Before submitting</b></summary>
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTR... | diff --git a/src/litserve/api.py b/src/litserve/api.py
index 91530a813..0340f3399 100644
--- a/src/litserve/api.py
+++ b/src/litserve/api.py
@@ -15,20 +15,21 @@
import inspect
import json
import warnings
-from abc import ABC, abstractmethod
+from abc import ABC
from queue import Queue
from typing import TYPE_CHECK... | 7 | 7 | 0 | [{"id": "G0", "claim": "The TimedInitMeta class should be private (renamed to _TimedInitMeta).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The metaclass code should live in utils.py instead of its own timed_init_meta.py module.", "category": ... | null |
Lightning-AI__LitServe__586 | Lightning-AI/LitServe | 586 | defect | a6477c58c7701426d70e1cfe2738811e7a8cd98e | 8c6e6d46c18c436bd6c98c80f23c0d1451e67b98 | pytest uses just one config | ## What does this PR do?
Seems like all configuration in the `pyproject.toml` was ignored due to the secondary `pytest.ini`
<details>
<summary><b>Before submitting</b></summary>
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the [contributor... | diff --git a/pyproject.toml b/pyproject.toml
index 99e297e56..0ae0b35b5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -86,6 +86,13 @@ filterwarnings = [
]
xfail_strict = true
junit_duration_report = "call"
+python_files = "test_*.py"
+testpaths = ["tests"]
+markers = [
+ "unit: unit tests",
+ "integratio... | 3 | 1 | 1 | [{"id": "G0", "claim": "Importing gpustat inside benchmark() makes the script fail later (only at run time on machines without it) instead of failing at import time.", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pytest configuration is split ac... | null |
Lightning-AI__LitServe__589 | Lightning-AI/LitServe | 589 | defect | 17f8ee08de0a81e7396d78637c6343da1cfbab80 | 8d44a1b1d10514ad2d5cf5a3b53447ad09a29267 | fix(ci): handle sentinel input in request_queue gracefully | ## What does this PR do?
Devs won't see a lot of error msgs in the CI.
We exit the background process loop by sending `(None, None, None)` to the queue. We don't handle this gracefully and even though the loop is exited, we end up printing a lot of errors in the CI. This PR, will gracefully handle the terminatio... | diff --git a/src/litserve/loops/base.py b/src/litserve/loops/base.py
index 4388efe8a..b981a16d3 100644
--- a/src/litserve/loops/base.py
+++ b/src/litserve/loops/base.py
@@ -87,6 +87,12 @@ async def _async_inject_context(context: Union[List[dict], dict], func, *args, *
return await _handle_async_function(func, *arg... | 3 | 2 | 0 | [{"id": "G0", "claim": "The default error message of _StopLoopError is hardcoded and duplicated across multiple locations in the codebase; consider making it a constant to avoid duplication and ensure consistency.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": ... | null |
Lightning-AI__LitServe__618 | Lightning-AI/LitServe | 618 | defect | 0d530a9bb0a83d41871913c03f2c0d1e20ea8aa2 | 615c037821b09963a6578d127383b6c532c16c9b | fix/req-middleware-duplication | ## What does this PR do?
Fixes #602.
<details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTR... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index b93edb118..d8de14090 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -1358,10 +1358,14 @@ def run(
self._perform_graceful_shutdown(manager, uvicorn_workers, shutdown_reason)
def _prepare_app_run(self, app: FastAPI... | 2 | 1 | 0 | [{"id": "G0", "claim": "The reviewer asks whether the shallow `list()` copy of `app.user_middleware` should be a deep copy so that copied apps do not share middleware entries.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The inline comment 'create... | null |
Lightning-AI__LitServe__624 | Lightning-AI/LitServe | 624 | defect | 863c0dab6886ebd79f368477b4027bba44e349e8 | 27b398f25269d24c1e160ef4255f084a2b3d1edb | Feat(LitServe): Add support for restarting the inference worker when they die | ## What does this PR do?
This PR adds support for restarting the inference workers when the process has died due to any kind of reasons.
The main changes are:
- The worker are aware of their ids
- The worker are pushing a start response to inform the main thread of which request they are taking care of
- The m... | diff --git a/src/litserve/loops/base.py b/src/litserve/loops/base.py
index 186da4407..ed5400667 100644
--- a/src/litserve/loops/base.py
+++ b/src/litserve/loops/base.py
@@ -97,8 +97,10 @@ def __init__(self, message: str = _DEFAULT_STOP_LOOP_MESSAGE):
def collate_requests(
+ loop: "LitLoop",
lit_api: LitAPI... | 3 | 3 | 1 | [{"id": "G0", "claim": "Remove the stray `print(x)` debug statement the pull request added to the test's predict method in tests/unit/test_simple.py.", "category": "testing", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The response buffer should probably be set before the ev... | null |
Lightning-AI__LitServe__63 | Lightning-AI/LitServe | 63 | defect | 47bcbc900eca3c36ae0b2a08915b11811c9f8a3d | 80b3c2a954e5e4410cc8b17d16877ea81c8697cc | allow timeout disable | <details>
<summary><b>Before submitting</b></summary>
- [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [x] Did... | diff --git a/README.md b/README.md
index 8fce0b82b..bb02de00c 100644
--- a/README.md
+++ b/README.md
@@ -355,6 +355,13 @@ server = LitServer(SimpleLitAPI(), accelerator="cuda", devices=4, timeout=30)
This is useful to avoid requests queuing up beyond the ability of the server to respond.
+
+To disable the timeout ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The README example for disabling the timeout should drop the unrelated accelerator/devices arguments and show only the newly introduced timeout argument.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The timeout middleware... | null |
Lightning-AI__LitServe__640 | Lightning-AI/LitServe | 640 | defect | 41607f10ed63891dc3032e102308b4c873716817 | b81bcd89b9607c0a7f69b08df207e9a6240adf8a | fix(cli): `lightning-sdk` installation process with `uv` | ## What does this PR do?
Fixes #638.
Improves the `lightning-sdk` auto-installation process to support both `pip` and `uv` package managers.
<details><summary>Error log</summary>
<p>
```python
Lightning CLI not found. Installing...
LitServe/.venv/bin/python3: No module named pip
Traceback (most recent ca... | diff --git a/src/litserve/cli.py b/src/litserve/cli.py
index e6801f7b9..88b71a135 100644
--- a/src/litserve/cli.py
+++ b/src/litserve/cli.py
@@ -1,3 +1,4 @@
+import shutil
import subprocess
import sys
@@ -5,9 +6,17 @@
def _ensure_lightning_installed():
- if not is_package_installed("lightning_sdk"):
- ... | 1 | 1 | 1 | [{"id": "G0", "claim": "shutil.which('uv') only checks whether uv is on the system PATH, so if the user has uv installed globally while running LitServe inside a conda environment or another package manager, the logic still attempts to install with uv even though it is not part of the active environment.", "category": ... | null |
Lightning-AI__LitServe__646 | Lightning-AI/LitServe | 646 | defect | 6a11dc5d0198072a0332cfa5be3b40bfd97d9d04 | a3adc94665f022bb972aa765d0e3720405d9b765 | Feat/workers per api instance | ## What does this PR do?
Added feature requested on enabling ability to control `workers_per_device` per API instance #572 .
Interface change: workers_per_device now accepts either:
- `int` (previous behavior, applied to all APIs), or
- `list[int]` (per-API in connector order), or
- `dict[str, int]` mapping ... | diff --git a/src/litserve/server.py b/src/litserve/server.py
index 87b9a6da..cabc4933 100644
--- a/src/litserve/server.py
+++ b/src/litserve/server.py
@@ -29,7 +29,7 @@
import warnings
from abc import ABC, abstractmethod
from collections import deque
-from collections.abc import Callable, Iterable, Sequence
+from co... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new test test_workers_per_device_can_be_configured_per_route raises SystemExit and does not shut down the opened port properly.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The commented-out line '# self.inference_worke... | null |
Lightning-AI__LitServe__70 | Lightning-AI/LitServe | 70 | defect | c781c7de82890648594b84f462e6876af07e5f14 | fe2563471354ba2d6950c345cb2c6c35d1e4357e | add readme improvements | <details>
<summary><b>Before submitting</b></summary>
- [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did... | diff --git a/README.md b/README.md
index dbfafbee3..976541781 100644
--- a/README.md
+++ b/README.md
@@ -200,7 +200,7 @@ LitServe automatically detects GPUs on a machine and uses them when available:
import litserve as ls
# Automatically selects the available accelerator
-api = SimpleLitAPI() # defined by you with ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The streaming-section README example class is misnamed SimpleStreamAPI (the author says he misnamed it in #65) and should read SimpleBatchedAPI to match the actual example.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "T... | null |
Lightning-AI__LitServe__76 | Lightning-AI/LitServe | 76 | defect | a6fedcf7cbbdbc9ed573a30d71f14cdaf34297ea | ff03670eb4b4494f9ff5cb931994f000d8063763 | add openai spec v0 | This PR allows to expose models through the OpenAI API spec
Here's an example `server.py`
```python
import litserve as ls
class SimpleLitAPI(ls.LitAPI):
def setup(self, device):
self.model = None # some model
def decode_request(self, request):
return request
def predict... | diff --git a/src/litserve/examples/openai_spec_example.py b/src/litserve/examples/openai_spec_example.py
new file mode 100644
index 000000000..9011bf2ad
--- /dev/null
+++ b/src/litserve/examples/openai_spec_example.py
@@ -0,0 +1,22 @@
+import litserve as ls
+from litserve.specs.openai import OpenAISpec
+
+
+class Simpl... | 3 | 3 | 2 | [{"id": "G0", "claim": "Since only a single spec is supported in the first version, the API and example should use a single `spec` argument (`spec=spec`, with `specs=[spec]` as the equivalent array form) instead of the plural `specs=specs` shown for one spec.", "category": "design", "verdict": "supported", "priority": ... | null |
Lightning-AI__litgpt__1010 | Lightning-AI/litgpt | 1,010 | defect | 54b2761935a0152a13c40eeff3a535efa734253a | 6951301dd6f3ce592ca49f5dfd019b15019cca90 | Update finetuning scripts | Fixes some quirks and inconsistencies in the finetuning scripts.
- Log the same data in full.py and lora.py
- Lora's checkpoints had iter-prefix but saved on step
- Fix StopIteration when `max_iters > len(val_dataloader)`
Fixes #1009 | diff --git a/config_hub/finetune/llama-2-7b/full.yaml b/config_hub/finetune/llama-2-7b/full.yaml
index cda7ae979b..95f7187acf 100644
--- a/config_hub/finetune/llama-2-7b/full.yaml
+++ b/config_hub/finetune/llama-2-7b/full.yaml
@@ -7,6 +7,7 @@ data:
init_args:
mask_prompt: false
test_split_fraction: 0.03847... | 3 | 3 | 1 | [{"id": "G0", "claim": "The validate-loop change made in the finetuning scripts (bounding losses by the dataloader length) should also be applied to lit_gpt/pretrain.py.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The checkpoint-directory namin... | null |
Lightning-AI__litgpt__1054 | Lightning-AI/litgpt | 1,054 | defect | a46d78e81d8b6d66e240633e5aa1c3ef5fdab1c1 | a6847582bd4f286970a73d9c63185a1e96ccad37 | Enable loading train and val split in JSON data module | Fixes #1029 | diff --git a/litgpt/data/json.py b/litgpt/data/json.py
index 3f2d362922..9b2a83a33f 100644
--- a/litgpt/data/json.py
+++ b/litgpt/data/json.py
@@ -3,7 +3,7 @@
import json
from dataclasses import dataclass, field
from pathlib import Path
-from typing import Optional, Union
+from typing import Optional, Union, Tuple, ... | 1 | 1 | 1 | [{"id": "G0", "claim": "Supporting `test.json` in a directory `json_path` should be dropped for now, because when both `val.json` and `test.json` are present, `test` will be silently ignored, which might be confusing.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Lightning-AI__litgpt__1055 | Lightning-AI/litgpt | 1,055 | defect | a46d78e81d8b6d66e240633e5aa1c3ef5fdab1c1 | 8c47bb17cd4a6bb1da8d258e6f455c9a6ffba126 | Update print outputs in finetuning & pretraining | This is only for LoRA at the moment to show how it looks like and to discuss further before applying it to the other scripts:
```
Ep 1 | iter 1 | stEp 1: loss train (curr): 1.657, val (prev val iter): None | iter time: 298.27 ms
Ep 1 | iter 2 | stEp 1: loss train (curr): 1.506, val (prev val iter): None | iter tim... | diff --git a/litgpt/finetune/lora.py b/litgpt/finetune/lora.py
index 799f1f6140..269157ae91 100644
--- a/litgpt/finetune/lora.py
+++ b/litgpt/finetune/lora.py
@@ -220,6 +220,7 @@ def fit(
iter_num = 0
total_lengths = 0
total_t0 = time.perf_counter()
+ val_loss = None
while step_count < max_step... | 4 | 4 | 1 | [{"id": "G0", "claim": "Drop the '(curr)' and '(prev val iter)' parenthetical qualifiers from the training-loop print output to keep it compact.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Spell out the full word 'Epoch' instead of 'Ep' in the print o... | null |
Lightning-AI__litgpt__1092 | Lightning-AI/litgpt | 1,092 | defect | 17e8ec2f416ccb8b96853bbae6ac1e3c15381072 | 634be0a05f1642f5c602abaecb07710732d026b8 | Add help strings for the CLI | Fixes #1087
The help strings should be kept short so they fit nicely in the CLI help page.
Adapter scrips will be covered when I copy paste them in #1073.
TODO:
Update config files
| diff --git a/litgpt/finetune/full.py b/litgpt/finetune/full.py
index de00056b05..f475f8202a 100644
--- a/litgpt/finetune/full.py
+++ b/litgpt/finetune/full.py
@@ -35,14 +35,12 @@
def setup(
+ checkpoint_dir: Path = Path("checkpoints/stabilityai/stablelm-base-alpha-3b"),
+ out_dir: Path = Path("out/finetune/f... | 2 | 2 | 0 | [{"id": "G0", "claim": "The docstrings added for the CLI should use the sphinx double-backtick code notation (e.g. ``litgpt.args.TrainArgs``) instead of single backticks, for consistency.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The config_h... | null |
Lightning-AI__litgpt__1121 | Lightning-AI/litgpt | 1,121 | defect | cf78b77c6a289bcdca387a8b5f8918783e652c57 | d58e9ef6fef38d44b8323505dd133ef62377c47f | Update adapter scripts | Fixes #1073
I copy-pasted LoRA into adapter.py and adapter_v2.py and then switched out the adapter specific function calls. Note that the only difference between adapter v1 and v2 is the v1 and v2 prefixes in the code. They are otherwise identical. | diff --git a/litgpt/finetune/adapter.py b/litgpt/finetune/adapter.py
index dce46e3aa0..7053d9d35a 100644
--- a/litgpt/finetune/adapter.py
+++ b/litgpt/finetune/adapter.py
@@ -1,5 +1,6 @@
- # Copyright Lightning AI. Licensed under the Apache License 2.0, see LICENSE file.
+# Copyright Lightning AI. Licensed under the... | 1 | 1 | 0 | [{"id": "G0", "claim": "The checkpoint filename suffix \"lit_model.pth.adapter2\" should be \"lit_model.pth.adapter_v2\" to match the _v2 naming used everywhere else.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Lightning-AI__litgpt__1162 | Lightning-AI/litgpt | 1,162 | defect | 502a9817bfbd025627c34c229b8c3eb2eca51150 | 4402d2ad78b69223bdb9cd55ab307b5d95f85fe3 | Fix weight initialization for single device pretraining | The weight initialization currently only applies if FSDP is used, which is the normal use case. But for debugging and small models, it could make sense to run pretraining on a single GPU.
Fixes #1150 | diff --git a/litgpt/pretrain.py b/litgpt/pretrain.py
index b5ded811aa..7c7d41546e 100644
--- a/litgpt/pretrain.py
+++ b/litgpt/pretrain.py
@@ -32,6 +32,7 @@
parse_devices,
save_config,
save_hyperparameters,
+ reset_parameters,
)
@@ -153,7 +154,7 @@ def main(
with fabric.init_module(empty_ini... | 2 | 2 | 2 | [{"id": "G0", "claim": "The test's final line evaluates the comparison without asserting it, so the test can never fail; add the missing `assert` as suggested.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The test should also assert that `reset_parame... | null |
Lightning-AI__litgpt__1238 | Lightning-AI/litgpt | 1,238 | defect | 13369769a0705731a3c64ed71d6cff1fad5b311c | 450b96f7ad3525b5f6beb1a33c1ad92d60c9bc54 | Enable setting a fraction of the epoch as warmup | Fixes #1234
This feature was requested by @lantiga through a customer.
Context: I had this implemented in a Studio by modifying the LitGPT source. It is useful for continued pretraining where you want to perform warmup on a fraction of your dataset (say 0.05), so you could set `--train.lr_warmup_fraction=0.05`.... | diff --git a/litgpt/args.py b/litgpt/args.py
index d6ce527d36..89af35b018 100644
--- a/litgpt/args.py
+++ b/litgpt/args.py
@@ -16,8 +16,10 @@ class TrainArgs:
"""Number of samples between optimizer steps across data-parallel ranks"""
micro_batch_size: int = 4
"""Number of samples per data-parallel rank""... | 4 | 2 | 0 | [{"id": "G0", "claim": "Computing warmup iters from `lr_warmup_fraction * len(train_dataloader)` will reintroduce the bug fixed in #1132 until LitData fixes the underlying issue.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "`compute_warmup_iters` ... | null |
Lightning-AI__litgpt__1357 | Lightning-AI/litgpt | 1,357 | defect | b9ddd8bdd8e759702ddb5b624333f422b4e76b5e | 1faba3f0fe8386db1d03463335e125b044452645 | Fix `litgpt evaluate` not using the local checkpoint | Fixes #1349
I found that the `litgpt evaluate` command ignores the provided checkpoint dir and *silently* downloads the model from HF. Since the download speeds in Studios is so fast, I didn't notice this. The only hint that this is happening is when I saw #1349 but I interpreted this first as it just wanting to dow... | diff --git a/litgpt/eval/evaluate.py b/litgpt/eval/evaluate.py
index 78e0ed0f59..d441efe8e9 100644
--- a/litgpt/eval/evaluate.py
+++ b/litgpt/eval/evaluate.py
@@ -4,7 +4,6 @@
import os
from pathlib import Path
from typing import Optional, Union
-import yaml
import torch
from litgpt.scripts.convert_lit_checkpoint... | 2 | 1 | 0 | [{"id": "G0", "claim": "The rewritten test should avoid downloading the model weights in CI, as the previous version did by saving a fake lit_model.pth.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks whether the saving step should be s... | null |
Lightning-AI__litgpt__1583 | Lightning-AI/litgpt | 1,583 | defect | d4c87bd5c26e884d116e94c4cac6bf5bb7e82dd7 | dc06877703e160aad8d582778862456ddd778b04 | Chat: dynamically set kv-cache size | Hi there 👋
Fixes #1558
In the `chat` script the size of `kv-cache` is set to model's maximum context size, while in the `generate` script - as a sum of `len(prompt)` and `max_new_tokens`. That leads to unnecessary VRAM consumption and sometimes OOM errors in the chat mode, while the generate script might run f... | diff --git a/litgpt/chat/base.py b/litgpt/chat/base.py
index 4212b1924f..863f62a2bf 100644
--- a/litgpt/chat/base.py
+++ b/litgpt/chat/base.py
@@ -120,11 +120,18 @@ def decode(fabric: L.Fabric, tokenizer: Tokenizer, token_stream: Iterator[torch.
return tokens_generated
-def process_prompt(prompt, model, tokeni... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new dynamic kv-cache sizing may not work under torch.compile, so it should be enabled only when `compile=False` while the compiled path keeps the old full-context kv-cache sizing (or compilation is dropped for now).", "category": "correctness", "verdict": "supported", "priority": "P1", "scop... | null |
Lightning-AI__litgpt__1617 | Lightning-AI/litgpt | 1,617 | defect | 12fb3cb684b40a0906e543d7817567c4bf3eec96 | d2bd513535314a99e6f625c3d8372be16cbf810f | Print warning about unsupported repo_ids | In the last few days, there were a few internal and external confusions about using unsupported models in LitGPT. Currently, LitGPT lets one download unsupported models, but then fails in the conversion. E.g.,
```
litgpt download NousResearch/Hermes-2-Pro-Llama-3-8B
...
# downloads model
...
Traceback (mo... | diff --git a/litgpt/scripts/download.py b/litgpt/scripts/download.py
index 7a1f7711ad..dacf8fc414 100644
--- a/litgpt/scripts/download.py
+++ b/litgpt/scripts/download.py
@@ -8,6 +8,7 @@
import torch
from lightning_utilities.core.imports import RequirementCache
+from litgpt.config import configs
from litgpt.script... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new unsupported-repo_id prevention makes it impossible to download finetuned models from other repos, leaving the --model_name argument useless, and asks to either remove the argument or disable the prevention when model_name is provided.", "category": "correctness", "verdict": "supported", ... | null |
Lightning-AI__litgpt__1741 | Lightning-AI/litgpt | 1,741 | defect | af11fb5f0ddbda64fd92bb05d50bc001b2f6ac35 | ed5dd79c3550aa9447804efcef7ff32e2033412c | Add sliding window attention to Mistral and Phi 3 | The original Mistral v0.1 and Phi 3 models have sliding window attention. Adding it here for consistency with the original models.
Fixes #1598 | diff --git a/litgpt/config.py b/litgpt/config.py
index 974cd21432..5052ab117b 100644
--- a/litgpt/config.py
+++ b/litgpt/config.py
@@ -1613,6 +1613,8 @@ def norm_class(self) -> Type:
intermediate_size=8192,
mlp_class_name="LLaMAMLP",
parallel_residual=False,
+ sliding_window_size=2048,... | 1 | 1 | 1 | [{"id": "G0", "claim": "Reassigning `T` (from 20 to 5) makes the input too small to show the difference between a sliding window of half the context size and the global window, so the test can produce a false positive.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Lightning-AI__litgpt__1744 | Lightning-AI/litgpt | 1,744 | defect | be8b28dad46caee5dd62fedcd6051485e27c404b | b63091ad21d1312ef7ca8993d367f56eb8172265 | Support for optimizers which don't have "fused" parameter such as grokadamw and 8bit bnb | This fixes #1743
1. This changes bring support for optimizers which do not have "fused" parameter. Examples:
```yaml
optimizer: grokadamw.GrokAdamW
optimizer: bitsandbytes.optim.AdamW8bit
optimizer: bitsandbytes.optim.PagedAdamW8bit
```
2. Additionally, pytorch optimizers can be written in following forma... | diff --git a/litgpt/utils.py b/litgpt/utils.py
index f1af9a8a1c..2501bbd23b 100644
--- a/litgpt/utils.py
+++ b/litgpt/utils.py
@@ -15,6 +15,7 @@
import subprocess
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Literal, Mapping, Optional, TypeVar, Union
import warnings
+import inspect
import lightnin... | 4 | 4 | 0 | [{"id": "G0", "claim": "Instead of only deleting the \"fused\" kwarg, the code should filter kwargs down to the optimizer class's valid parameters (valid_params set) so any unsupported argument is dropped, in both the string and the dict branches.", "category": "design", "verdict": "supported", "priority": "P2", "scope... | null |
Lightning-AI__litgpt__1770 | Lightning-AI/litgpt | 1,770 | defect | c03f3f040cad65d19f0d1cae7b5df86bc5476796 | 3ebd6aa8d261f108a4115f48be65afef07bd28d2 | Add bnb.nn.StableEmbedding for quantized training | The bnb.nn.StableEmbedding is used during finetuning to replace the standard Embedding layer. As discussed #1769
Fixes #1769 | diff --git a/litgpt/finetune/adapter.py b/litgpt/finetune/adapter.py
index f479cade8a..c498d903a2 100644
--- a/litgpt/finetune/adapter.py
+++ b/litgpt/finetune/adapter.py
@@ -172,9 +172,15 @@ def main(
fabric.print(f"Number of non-trainable parameters: {num_parameters(model, requires_grad=False):,}")
model ... | 3 | 1 | 0 | [{"id": "G0", "claim": "The StableEmbedding replacement code should later be moved into PTL/Fabric's BitsandbytesPrecision plugin, where the layer swap would happen during materialization (on the meta device) instead of after the model is materialized.", "category": "design", "verdict": "supported", "priority": "P2", "... | null |
Lightning-AI__litgpt__1891 | Lightning-AI/litgpt | 1,891 | defect | d2ed13c34a8e3763d69c29961e462b5e4a783e17 | 7f2c2ce4c9019d1927197ac6de5e8b4058284d38 | Some improvements for KV caching | - Ensure that KVCache buffers are only as large as config.n_query_groups
- Shrink buffers returned by KVCache to just cover input_pos entries
- Clean up children of classes in `model.py`, in particular remove `forward` copies
| diff --git a/litgpt/adapter.py b/litgpt/adapter.py
index bef77ece1b..b0193ce5a5 100644
--- a/litgpt/adapter.py
+++ b/litgpt/adapter.py
@@ -9,7 +9,7 @@
"""
from dataclasses import dataclass
-from typing import Any, Dict, List, Optional, Tuple, Union
+from typing import Any, Dict, Optional, Tuple
import torch
imp... | 12 | 7 | 1 | [{"id": "G0", "claim": "The custom GPT.__init__ in litgpt/adapter.py is now identical to the base model's and can be removed.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The adapter Block should not keep the skip_attn_mlp flag and the manual se... | null |
Lightning-AI__litgpt__1933 | Lightning-AI/litgpt | 1,933 | defect | 1f3acef73c1209027f20fa4546a67555dd84ef02 | 96cf47901080c7ee420818caab08a4a1e1624407 | qwen2.5 long context | Qwen2.5 7B Instruct and Qwen2.5 14B Instruct extended to 1 million context length
https://qwenlm.github.io/blog/qwen2.5-1m/ | diff --git a/README.md b/README.md
index d2e0494443..7bfed0d984 100644
--- a/README.md
+++ b/README.md
@@ -141,6 +141,7 @@ Every model is written from scratch to maximize performance and remove layers of
| Pythia | {14,31,70,160,410}M, {1,1.4,2.8,6.9,12}B | EleutherAI | [Biderman et al. 2023](https://arxiv.org/abs/230... | 3 | 2 | 0 | [{"id": "G0", "claim": "The PR should confirm that the default kv-cache size is limited for the new 1M-context configs, whose block_size of 1,010,000 would otherwise make the default cache enormous.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In litgp... | null |
Lightning-AI__litgpt__1949 | Lightning-AI/litgpt | 1,949 | defect | 1b9402bdc830f10f5cd9078e933b9c065bf2dee7 | aa71a97cc5c44cde0c467713bbbbd80ae3c8e407 | Phi4 mini | New Phi 4 Mini Instruct 3.8B language model.
See issue #1948
- Outperforms larger models in text-based tasks, including reasoning, math, coding, instruction-following, and function-calling. (e.g. beats Qwen2.5-7B-Instruct in HumanEval)
- Supports 128k context size. | diff --git a/README.md b/README.md
index d2e0494443..297530f0e2 100644
--- a/README.md
+++ b/README.md
@@ -137,6 +137,7 @@ Every model is written from scratch to maximize performance and remove layers of
| Phi 1.5 & 2 | 1.3B, 2.7B | Microsoft Research | [Li et al. 2023](https://arxiv.org/abs/2309.05463) ... | 5 | 4 | 2 | [{"id": "G0", "claim": "CI test tests/convert/test_hf_checkpoint.py::test_convert_hf_checkpoint[phi-2] fails with KeyError: 'transformer.wte.weight' and needs to be fixed.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "CI test tests/test_model.py::t... | null |
Lightning-AI__litgpt__1982 | Lightning-AI/litgpt | 1,982 | defect | b91d20761a90a856a0e8d7d98bb898557195144d | 11e705469b9720297fcf963abbc3f4e90fb3163c | feat: add linear rope type | Gemma3 uses the following config for rope:
```
"rope_scaling": {
"factor": 8.0,
"rope_type": "linear"
},
```
I added a linear rope type within `extra_configs` so that it can properly calculate theta.
Currently the HF transformer version does not have Gemma3, so it is skipped for pytest. ... | diff --git a/litgpt/data/alpaca_2k.py b/litgpt/data/alpaca_2k.py
index 79e8577ff4..f3344117db 100644
--- a/litgpt/data/alpaca_2k.py
+++ b/litgpt/data/alpaca_2k.py
@@ -4,8 +4,8 @@
from dataclasses import dataclass, field
from pathlib import Path
-from litgpt.data.base import SFTDataset
from litgpt.data.alpaca impor... | 3 | 2 | 1 | [{"id": "G0", "claim": "The re-sorted `from litgpt.data.base import SFTDataset` import line added to litgpt/data/alpaca_2k.py may not be needed.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The llama3 scaling branch is gated on `rope_type` bei... | null |
Lightning-AI__litgpt__1984 | Lightning-AI/litgpt | 1,984 | defect | b91d20761a90a856a0e8d7d98bb898557195144d | 4ca49a6df7e3590bfcfda4448924e311b02247ec | fix: `test_tokenizer_against_hf` | resolving strange/unpredictable usage of cache to address failing tests | diff --git a/tests/test_tokenizer.py b/tests/test_tokenizer.py
index 66ab02df63..16c59fa3d8 100644
--- a/tests/test_tokenizer.py
+++ b/tests/test_tokenizer.py
@@ -1,11 +1,13 @@
# Copyright Lightning AI. Licensed under the Apache License 2.0, see LICENSE file.
import os
+import warnings
from pathlib import Path
fr... | 4 | 2 | 1 | [{"id": "G0", "claim": "Silently warning on tokenizer-file download failures may obscure critical test issues, so the pull request should restore or revisit pytest.xfail to clearly mark the test as expected to fail when a download problem occurs.", "category": "testing", "verdict": "supported", "priority": "P1", "scope... | null |
Lightning-AI__litgpt__2008 | Lightning-AI/litgpt | 2,008 | defect | 048633a7d08f75280e1f02fcd0ba58a7e47dfeb1 | d4f96a430f57bdb2ff91114846838c8aad805f3a | feat: load only text weights from multimodal gemma | currently looking into tests to understand if there are similar cases 😅
`test_against_original_gemma_3` is a very close test, but it's explicitly loading the text component only, while the default config of HuggingFaces (= the one invoked with `litgpt chat google/gemma-3-4b-it`) is loading the entire multimodal mo... | diff --git a/litgpt/scripts/convert_hf_checkpoint.py b/litgpt/scripts/convert_hf_checkpoint.py
index 7a2a67f84c..341e1a757d 100644
--- a/litgpt/scripts/convert_hf_checkpoint.py
+++ b/litgpt/scripts/convert_hf_checkpoint.py
@@ -4,6 +4,7 @@
import json
import os
import re
+import warnings
from collections import defa... | 3 | 2 | 1 | [{"id": "G0", "claim": "The conversion should likely not strip the vision parts of multimodal Gemma 3 models by default, or should offer an option to convert to text only.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Emit a warning that the script is con... | null |
Lightning-AI__litgpt__2036 | Lightning-AI/litgpt | 2,036 | defect | bf6d837c2d3092be6f9eafd5c1874891a9e9b14a | 8e2e7176b5d6f6a4a685dad357e499878c19df1f | Add optional sys prompt | Fix #1879 | diff --git a/extensions/xla/generate/adapter.py b/extensions/xla/generate/adapter.py
index 81e5a994ab..e8358349ed 100644
--- a/extensions/xla/generate/adapter.py
+++ b/extensions/xla/generate/adapter.py
@@ -26,6 +26,7 @@ def setup(
prompt: str = "What food do llamas eat?",
*,
input: str = "",
+ sys_pr... | 2 | 1 | 0 | [{"id": "G0", "claim": "The new `sys_prompt` argument in the xla adapter should have a more explanatory docstring about what it does and how it could be used.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new `sys_prompt` argument docstring i... | null |
Lightning-AI__litgpt__2040 | Lightning-AI/litgpt | 2,040 | defect | 999a79d58bd8a12b5d74ce901a534c0d05800a09 | 3e45e98318a80b9edcd513be2819ba84249952e7 | fix: Add fallback chat template | Demo: https://www.loom.com/share/e3243c822aca496fb5f86e4697bd439a
Currently, the library errors on serving models with the OpenAI spec if a chat template is not included with the tokenizer config. Some of the models we support, like microsoft Phi do not contain one. This PR adds a basic fallback template that can ... | diff --git a/litgpt/deploy/serve.py b/litgpt/deploy/serve.py
index 13ec69be81..2ef3c7730c 100644
--- a/litgpt/deploy/serve.py
+++ b/litgpt/deploy/serve.py
@@ -160,7 +160,12 @@ def setup(self, device: str):
config = json.load(fp)
chat_template = config.get("chat_template", None)
if... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a warning log indicating that a fallback chat template is being used when the original one is missing from the tokenizer config.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
Lightning-AI__litgpt__2050 | Lightning-AI/litgpt | 2,050 | defect | 5be3d368f387ad4463c66ed5a4fa53449e221403 | 2e76ca4983096d6a86d21a16075db56a53d10aa5 | Xfail Thunder integration test due to Dynamo bug | This PR marks the `test_hf_for_nemo` test as `xfail` for the `Qwen` model due to a known issue in `TorchDynamo` involving SymInt.
The issue originates in Thunder's backend and is currently blocked on a fix from NVIDIA.
| diff --git a/tests/conftest.py b/tests/conftest.py
index 729aa12e05..3b00c50d02 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -19,6 +19,11 @@
warnings.warn(f"Could not find extensions directory at {wd}")
+def pytest_runtest_setup(item):
+ if "test_hf_for_nemo" in item.nodeid and "Qwen/Qwen2.5-7B... | 4 | 2 | 1 | [{"id": "G0", "claim": "The xfail reason message should be more neutral and include a link to the tracking issue instead of attributing the failure to Thunder/Qwen.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The xfail should be tied to TypeErr... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.