Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lamda function for context summarizer #301

Closed
wants to merge 12 commits into from
Closed

Conversation

saminegash
Copy link
Collaborator

Your checklist for this pull request

Thank you for submitting a pull request! To speed up the review process, please follow this checklist:

  • My Pull Request is small and focused on one topic so it can be reviewed easily
  • My code follows the style guidelines of this project (make format)
  • Commit messages are detailed
  • I have performed a self-review of my code
  • I commented hard-to-understand parts of my code
  • I updated the documentation (docstrings, /docs)
  • My changes generate no new warnings (or explain any new warnings and why they're ok)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass when I run pytest tests (offline mode)

Additional steps for code with networking dependencies:

Description

Describe your pull request here.

What does this PR implement or fix? Explain.

If this PR resolves any currently open issues then mention them like this: Closes #xxx.
Github will close such issues automatically when your PR is merged into main.

Any relevant logs, error output, etc?

Any other comments? For example, will other contributors need to install new libraries via poetry install after picking up these changes?

💔Thank you!

@amirfz
Copy link
Contributor

amirfz commented Feb 20, 2024

@saminegash is this a new file? why aren't we just modify the existing one?

@Eyobyb
Copy link
Collaborator

Eyobyb commented Feb 21, 2024

can you be more descriptive about what this pr fixes?

@saminegash
Copy link
Collaborator Author

can you be more descriptive about what this pr fixes?

This is kind of modifying the lambda function and this is to make the code uptodatw

oshoma
oshoma previously requested changes Feb 27, 2024
scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
scripts/transcript_summarizer_aws_lambda.py Show resolved Hide resolved



ACCESS_KEY = os.environ['ACCESS_KEY']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use import sherpa_ai.config as cfg and then access the variables via cfg.*, instead of referencing them directly from os.environ. See other files like vectorstores.py for example usage.




# response = s3_client.get_object(Bucket=source_bucket, Key=source_key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove these lines, since they're all commented out anyway

# Read the file content from the source bucket
response = s3_client.get_object(Bucket=source_bucket, Key=source_key)
print("Response :",response)
Copy link
Collaborator

Choose a reason for hiding this comment

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

print() -> logger.debug() everywhere

scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
@saminegash saminegash requested a review from oshoma March 1, 2024 17:03
amirfz
amirfz previously requested changes Mar 4, 2024
scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
scripts/transcript_summarizer_aws_lambda.py Outdated Show resolved Hide resolved
@saminegash saminegash requested a review from amirfz March 5, 2024 10:57
@saminegash saminegash dismissed stale reviews from oshoma and amirfz March 5, 2024 10:58

addressed and re requesting review


human_template = """Consolidate the multiple parts of the text into one \
human_template = """Consolidate the multiple parts of the text into one \
Copy link
Contributor

Choose a reason for hiding this comment

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

change to:

human_template = """Consolidate the multiple parts of the text into one \ coherent essay or article that accurately captures the content of the multiple\ parts without losing any information. The entire text is delimited in triple backticks and the parts are divided by #heading:\n ```{essays}```"""


# takes about 2-3 minutes to run
# summary= full_transcript2essay(raw_transcript)
summary = full_transcript2essay(first_part) # considering only talk part
Copy link
Contributor

Choose a reason for hiding this comment

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

rename all instances of this variable to talk_summarized and add the content of this variable to the output rst file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

now I can see the comment but I don't understand why you require this change and how it can be added.

the Essay is derived from this summary variable

@20001LastOrder 20001LastOrder linked an issue Apr 4, 2024 that may be closed by this pull request
@amirfz amirfz self-requested a review April 18, 2024 19:51
@amirfz amirfz mentioned this pull request May 27, 2024
15 tasks
@amirfz amirfz closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] QA transcript summarization
4 participants