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
command line script to add teachers' csd sections to ai-rubrics experiment #57848
Conversation
end | ||
|
||
# this can take up to 60 seconds | ||
require_relative '../../dashboard/config/environment' |
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.
Here is a trick. Add:
ENV['SKIP_I18N_INIT'] = '1'
Before this require. Cuts the time in half roughly in environments with localization enabled like production:
/code-dot-org $ time ruby script.rb
GetSecretValue: development/cdo/slack_bot_token
real 3m57.352s
user 3m37.076s
sys 0m17.138s
/code-dot-org $ vim script_with_skip.rb
/code-dot-org $ time ruby script_with_skip.rb
GetSecretValue: development/cdo/slack_bot_token
real 1m54.238s
user 1m40.048s
sys 0m13.254s
/code-dot-org $ cat script_with_skip.rb
ENV['SKIP_I18N_INIT'] = '1'
require_relative 'dashboard/config/environment'
``
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.
great idea! thanks for this!
updated and retested both scripts in the simple case.
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.
This looks good! Given those manual tests, I feel pretty confident that this works as intended. Not too bad to revert by running the other script with the same input more-or-less.
finishes https://codedotorg.atlassian.net/browse/AITT-555. I also added a similar tool to remove teachers from the experiment.
sample output:
Testing story
manually tested:
ai-rubrics-enable-teacher-sections:
ai-rubrics-disable-teacher-sections: