Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
evoprompt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grießhaber Daniel
evoprompt
Commits
b323f2e9
Commit
b323f2e9
authored
1 year ago
by
Grießhaber Daniel
Browse files
Options
Downloads
Patches
Plain Diff
add --chat option flag to replace USE_CHAT
parent
eaa1f0d5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cli.py
+2
-1
2 additions, 1 deletion
cli.py
main.py
+3
-6
3 additions, 6 deletions
main.py
with
5 additions
and
7 deletions
cli.py
+
2
−
1
View file @
b323f2e9
...
...
@@ -12,4 +12,5 @@ argument_parser.add_argument("--model-path", "-m", type=str, required=True)
argument_parser
.
add_argument
(
"
--task
"
,
"
-t
"
,
type
=
str
,
required
=
True
,
choices
=
[
"
sa
"
,
"
qa
"
]
)
argument_parser
.
add_argument
(
"
--debug
"
,
"
-d
"
,
action
=
'
store_true
'
,
default
=
None
)
argument_parser
.
add_argument
(
"
--debug
"
,
"
-d
"
,
action
=
"
store_true
"
,
default
=
None
)
argument_parser
.
add_argument
(
"
--chat
"
,
"
-c
"
,
action
=
"
store_true
"
)
This diff is collapsed.
Click to expand it.
main.py
+
3
−
6
View file @
b323f2e9
...
...
@@ -23,9 +23,6 @@ def conv2bool(_str: Any):
return
None
# whether to use chat model for LLM or not
USE_CHAT
:
bool
=
False
load_dotenv
()
current_directory
=
Path
(
__file__
).
resolve
().
parent
...
...
@@ -287,12 +284,12 @@ if __name__ == "__main__":
logger
.
info
(
"
Using Llama2 client as the evolution engine
"
)
evolution_model
=
Llama2
(
model_path
=
options
.
model_path
,
chat
=
USE_CHAT
,
chat
=
options
.
chat
,
)
case
"
openai
"
:
logger
.
info
(
"
Using OpenAI client as the evolution engine
"
)
evolution_model
=
OpenAI
(
"
gpt-3.5-turbo
"
,
chat
=
USE_CHAT
)
evolution_model
=
OpenAI
(
"
gpt-3.5-turbo
"
,
chat
=
options
.
chat
)
# set up evaluation model
# NOTE currenty we always stick to Llama2 as evaluation model
...
...
@@ -302,7 +299,7 @@ if __name__ == "__main__":
case
"
openai
"
:
evaluation_model
=
Llama2
(
model_path
=
options
.
model_path
,
chat
=
USE_CHAT
,
chat
=
options
.
chat
,
)
match
options
.
task
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment