Skip to content

Fix BatchRequestCompletionsVertex

Bruno Cardoso requested to merge bc/fix-project-file-completed into main

What does this merge request do and why?

Fix a regression from !https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/prompt-library/-/merge_requests/36 related to changes to ProjectFileChunkedTransformed and ProjectFileChunked.

How to set up and validate locally

  1. Run a pipeline and the very first request will fail
python promptlib/eval_codebase.py \
    --runner DirectRunner \
    --project unreview-poc-390200e5 \
    --region us-central1 \
    --temp_location "gs://unreview-dataflow/tmp/" \
    --save_main_session \
    --input_bq_table unreview-poc-390200e5:gl_gitlab_codebase.content_v1 \
    --output_bq_table unreview-poc-390200e5:gl_gitlab_codebase.2023-10-04_bcardoso_t1_suffix \
    --throttle_sec 0.01 \
    --num_samples_per_file 5 \
    --language python

...

AttributeError: 'ProjectFileChunked' object has no attribute 'code_before' [while running 'Vertex Gecko Request completions']

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.

Merge request reports