Skip to content

Conversation

@carlosgjs
Copy link
Collaborator

The prediction/evaluation interfaces used List[List[str]] as the prediction type to account for: a) batch inference, i.e. generate docs for multiple code snippets in one pass and b) generating multiple predictions per input (sampling). But we've now decided to do deterministic prediction (temp=0) so there's no need for the second level.

This PR changes to the prediction return type to List[str], which also makes the code simpler.

Two additional changes:

  • Replace the use of the max_length parameter in favor of max_new_tokens
  • Break-up the eval function into eval_promp for easier prompt experimentation
  • Updated generate.ipynb notebook accordingly

@carlosgjs carlosgjs requested a review from anujsinha3 January 24, 2024 18:56
@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (10294bc) 97.00% compared to head (6f2c5da) 97.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
+ Coverage   97.00%   97.17%   +0.16%     
==========================================
  Files           3        3              
  Lines         167      177      +10     
==========================================
+ Hits          162      172      +10     
  Misses          5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@carlosgjs carlosgjs merged commit 3c7e0a0 into main Jan 25, 2024
@carlosgjs carlosgjs deleted the carlosg/onepred branch January 25, 2024 01:06
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.

4 participants