-
Notifications
You must be signed in to change notification settings - Fork 36
feat: add a script for running an evaluated app locally #29
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
Conversation
9db6609 to
d494e7a
Compare
|
|
||
| async function resolveConfig(options: Options) { | ||
| if (!options.environment) { | ||
| throw new UserFacingError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren't using Yargs demandOption here because we want this helpful error, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the Yargs error isn't super readable.
runner/run-cli.ts
Outdated
| .option('prompt', { | ||
| type: 'string', | ||
| default: '', | ||
| description: 'Prompt within the environment that should be run', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the description is a bit ambiguous/confusing. Is this a path to a prompt, or a basename? Maybe it should be a path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually the ID within the llm-output/<environment.id>. I'll update the message.
runner/run-cli.ts
Outdated
| console.error( | ||
| chalk.red('An error occurred during the assessment process:') | ||
| ); | ||
| console.error(chalk.red(error)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we print the stack in those cases? (if available)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the UserFacingError we don't print the stack trace, because it can be noisy. It's meant for more readable errors that we produce (e.g. the environment path is wrong).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but we could print if it's not the user facing error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah in that case we should just throw. I copied this over from the eval-cli 😅
d494e7a to
3d2ee12
Compare
Adds the `web-codegen-scorer run` script that allows users to run an evaluated app in their browser. It spins up a server using the local LLM output and the existing environment config.
3d2ee12 to
4380765
Compare
Adds the
web-codegen-scorer runscript that allows users to run an evaluated app in their browser. It spins up a server using the local LLM output and the existing environment config.