-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
79 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Update File After PR Closed | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
jobs: | ||
update-file: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check if there are any changes in submissions dir | ||
uses: dorny/[email protected] | ||
id: changes | ||
with: | ||
# Use context to get the branch where commits were pushed. | ||
# If there is only one long-lived branch (e.g. master), | ||
# you can specify it directly. | ||
# If it's not configured, the repository default branch is used. | ||
base: ${{ github.ref }} | ||
filters: | | ||
src: | ||
- 'session_2/challenge/submissions/**' | ||
list-files: "shell" | ||
|
||
- name: Print changed files | ||
run: | | ||
echo '${{ toJSON(steps.changes.outputs) }}' | ||
- if: ${{ (steps.changes.outputs.file_count > 1) }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: core.setFailed('More than one submissions are not allowed at once.') | ||
|
||
# - name: Update file | ||
# if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
# run: | | ||
# git config --global user.name "GitHub Actions" | ||
# git config --global user.email "[email protected]" | ||
# echo "Updated content" > hello.txt | ||
# git add hello.txt | ||
# git commit -m "Update file after PR merge" | ||
# git push origin HEAD:${{ github.base_ref }} |
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""Baseline submission for the job description classification challenge.""" | ||
|
||
from scripts import base, registry | ||
|
||
|
||
@registry.register() | ||
class Baseline(base.PromptSubmission): | ||
"""Baseline submission.""" | ||
|
||
def build_prompt(self, job_description: str) -> str: | ||
"""Builds a prompt for classification of job description.""" | ||
prompt = f""" | ||
Say "YES" if the given job description is suitable for | ||
a freshers other wise say "NO". | ||
{job_description}. | ||
""" | ||
return prompt.strip() | ||
|
||
def parse_response(self, model_response: str) -> bool: | ||
"""Parses a response from the LLM to decide the final answer. | ||
Args: | ||
model_response: Output of the llm for the given prompt. | ||
Returns: | ||
True is the job_description is for a fresher otherwise False. | ||
""" | ||
model_response = model_response.lower() | ||
if "yes" in model_response: | ||
return True | ||
return False |