Fix/new changes#62
Merged
Merged
Conversation
added 3 commits
July 16, 2026 20:59
Problem:
The frontend only accepted URLs containing the literal string
'github.com':
if (projectUrl.includes('github.com') === false) { reject }
This rejected every GitLab, Codeberg, and Bitbucket URL outright,
including self-hosted instances like:
https://gitlab.windenergy.dtu.dk/pyconturb/pyconturb
Requests were blocked client-side before ever reaching the backend,
even though repository_provider.py already supports GitHub, GitLab
(including self-hosted, via _detect_engine()), Codeberg, and Bitbucket.
Fix:
Replace the single-host substring check with a structural check: any
URL with a valid scheme/host and an /owner/repo-shaped path is
accepted client-side. Real host support is left to the backend, which
already has detection logic and returns UnsupportedHostError for
genuinely unsupported hosts.
const url = new URL(projectUrl);
isValidRepoUrl = /^\/[^/]+\/[^/]+/.test(url.pathname);
Signed-off-by: Pippiblip <peterpie575@users.noreply.github.com>
Problem: embedding_similarity_scores() rescaled cosine similarities using each project's own min/max score: sims = (sims - sims.min()) / (sims.max() - sims.min() + 1e-8) This guaranteed the single highest-scoring label for ANY project landed near 1.0, and the lowest near 0.0, regardless of whether real semantic relevance existed. Projects with no genuine SDG relevance (gibberish/generic READMEs) still produced high-looking confidence scores, since the rescale was relative to that project's own 17 scores rather than to any absolute notion of 'strong match'. Solution Replaced the per-query rescale with a fixed-bound clip: sims = np.clip((sims - COSINE_LOW) / (COSINE_HIGH - COSINE_LOW), 0, 1) COSINE_LOW/COSINE_HIGH are constants derived from raw cosine similarity distributions across a labeled sample of known-positive and known-negative projects, rather than computed per-request 2.added an error page for when the len(sdg_prediction) = 0, i.e the project does not satisfy any SDGs Signed-off-by: Pippiblip <peterpie575@users.noreply.github.com>
1.checked the current configurations on 60 projects and achieved an accuracy score of 80%testcases had 30 non dpg projects and 30 projects from the DPGA 2. shifted to groq for cheaper inferencing Signed-off-by: Pippiblip <peterpie575@users.noreply.github.com>
Collaborator
|
Description of this PR:
|
Signed-off-by: Sunil Shah <sunilshah2416@gmail.com>
…folder Signed-off-by: Sunil Shah <sunilshah2416@gmail.com>
…e inside each folder Signed-off-by: Sunil Shah <sunilshah2416@gmail.com>
Signed-off-by: Sunil Shah <sunilshah2416@gmail.com>
Signed-off-by: Sunil Shah <sunilshah2416@gmail.com>
Sunilshah-7
force-pushed
the
fix/new_changes
branch
from
July 22, 2026 17:03
8ed4bfe to
c0b61b4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.