Skip to content

Speculative decoding #73

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

Open
wants to merge 1 commit into
base: base-sha/0156696f3575079bb18d42841220aef5b85d54ef
Choose a base branch
from

Conversation

sourcery-ai-experiments-bot

No description provided.

@sourcery-ai-experiments-bot
Copy link
Author

This is a benchmark review for experiment review_of_reviews_20240429.
Run ID: review_of_reviews_20240429/benchmark_2024-04-29T00-16-47_v1-16-0-197-ga56ee2c92.

This pull request was cloned from https://github.com/jquagga/ttt/pull/94. (Note: the URL is not a link to avoid triggering a notification on the original pull request.)

Experiment configuration
review_config:
  # User configuration for the review
  # - benchmark - use the user config from the benchmark reviews
  # - <value> - use the value directly
  user_config:
    enable_ai_review: true
    enable_rule_comments: false

    enable_complexity_comments: benchmark
    enable_docstring_comments: benchmark
    enable_security_comments: benchmark
    enable_tests_comments: benchmark
    enable_comment_suggestions: benchmark
    enable_functionality_review: benchmark

    enable_approvals: true

  ai_review_config:
    # The model responses to use for the experiment
    # - benchmark - use the model responses from the benchmark reviews
    # - llm - call the language model to generate responses
    model_responses:
      comments_model: benchmark
      comment_validation_model: benchmark
      comment_suggestion_model: benchmark
      complexity_model: benchmark
      docstrings_model: benchmark
      functionality_model: benchmark
      security_model: benchmark
      tests_model: benchmark

# The pull request dataset to run the experiment on
pull_request_dataset:
- https://github.com/Bilbottom/sql-problems/pull/1
- https://github.com/Bilbottom/sql-learning-materials/pull/13
- https://github.com/Bilbottom/python-template/pull/3
- https://github.com/Bilbottom/sql-problems/pull/2
- https://github.com/gdsfactory/kfactory/pull/304
- https://github.com/mslepko/wc-daily-logs-emailer/pull/2
- https://github.com/mslepko/wc-daily-logs-emailer/pull/3
- https://github.com/jquagga/ttt/pull/94
- https://github.com/mslepko/wc-daily-logs-emailer/pull/5
- https://github.com/rbanffy/pip-chill/pull/75
- https://github.com/yaitoo/sqle/pull/45
- https://github.com/Catrofe/AvaliationSystemECommerce/pull/5
- https://github.com/Catrofe/AvaliationSystemECommerce/pull/6
- https://github.com/ultralytics/JSON2YOLO/pull/87
- https://github.com/ultralytics/flickr_scraper/pull/24
- https://github.com/nikhilbadyal/docker-py-revanced/pull/512
- https://github.com/MusicalNinjaDad/FizzBuzz/pull/10
- https://github.com/petermcd/monzo-api/pull/71
- https://github.com/christian80gabi/RecycleAI/pull/3
- https://github.com/christian80gabi/RecycleAI/pull/4
- https://github.com/nbhirud/system_update/pull/22
- https://github.com/nbhirud/system_update/pull/23
- https://github.com/agatma/sprint1-http-server/pull/1
- https://github.com/mraniki/cefi/pull/464
- https://github.com/Idrinth/api-bench/pull/915
- https://github.com/Idrinth/api-bench/pull/921
- https://github.com/dashmug/glue-utils/pull/28
- https://github.com/Idrinth/api-bench/pull/917
- https://github.com/sett-and-hive/sarif-to-comment-action/pull/286
- https://github.com/uncscode/particula/pull/445
review_comment_labels:
- label: correct
  question: Is this comment correct?
- label: helpful
  question: Is this comment helpful?
- label: comment-type
  question: Is the comment type correct?
- label: comment-area
  question: Is the comment area correct?
- label: llm-test
  question: |
    What type of LLM test could this comment become?
    - 👍 - this comment is really good/important and we should always make it
    - 👎 - this comment is really bad and we should never make it
    - no reaction - don't turn this comment into an LLM test

# Benchmark reviews generated by running
#   python -m scripts.experiment benchmark <experiment_name>
benchmark_reviews: []

Copy link

@SourceryAI SourceryAI left a comment

Choose a reason for hiding this comment

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

Hey @sourcery-ai-experiments-bot - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

LangSmith trace

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +15 to +20
from transformers import (
pipeline,
AutoModelForCausalLM,
AutoModelForSpeechSeq2Seq,
AutoProcessor,
)

Choose a reason for hiding this comment

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

suggestion (code_refinement): Consider consolidating imports for clarity and maintainability.

Grouping related imports in a single block can improve readability and make the codebase easier to manage.

Suggested change
from transformers import (
pipeline,
AutoModelForCausalLM,
AutoModelForSpeechSeq2Seq,
AutoProcessor,
)
from transformers import (
AutoModelForCausalLM,
AutoModelForSpeechSeq2Seq,
AutoProcessor,
pipeline,
)

Choose a reason for hiding this comment

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

Is this comment correct?

Choose a reason for hiding this comment

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

Is this comment helpful?

Choose a reason for hiding this comment

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

Is the comment type correct?

Choose a reason for hiding this comment

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

Is the comment area correct?

Choose a reason for hiding this comment

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

What type of LLM test could this comment become?

  • 👍 - this comment is really good/important and we should always make it
  • 👎 - this comment is really bad and we should never make it
  • no reaction - don't turn this comment into an LLM test

calljson = {**calljson, **calltext}
return calljson
# If we set TTT_TRANSFORMERS_MODEL_ID, let's use that directly
if os.environ.get("TTT_TRANSFORMERS_MODEL_ID", False):

Choose a reason for hiding this comment

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

suggestion (code_clarification): The default value in os.environ.get should be consistent with expected data types.

Using False as a default for an environment variable that is expected to be a string can be misleading. Consider using None or a default string value.

Suggested change
if os.environ.get("TTT_TRANSFORMERS_MODEL_ID", False):
if os.environ.get("TTT_TRANSFORMERS_MODEL_ID", None):

Choose a reason for hiding this comment

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

Is this comment correct?

Choose a reason for hiding this comment

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

Is this comment helpful?

Choose a reason for hiding this comment

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

Is the comment type correct?

Choose a reason for hiding this comment

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

Is the comment area correct?

Choose a reason for hiding this comment

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

What type of LLM test could this comment become?

  • 👍 - this comment is really good/important and we should always make it
  • 👎 - this comment is really bad and we should never make it
  • no reaction - don't turn this comment into an LLM test

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.

3 participants