Skip to content

Commit

Permalink
Adds Gradescope env variable conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
cgpotts committed Feb 4, 2020
1 parent 46ec94c commit 3e2b4d3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 22 deletions.
24 changes: 15 additions & 9 deletions hw_rel_ext.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_run_svm_model_factory(run_svm_model_factory)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_run_svm_model_factory(run_svm_model_factory)"
]
},
{
Expand Down Expand Up @@ -342,7 +343,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_directional_bag_of_words_featurizer(corpus)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_directional_bag_of_words_featurizer(corpus)"
]
},
{
Expand Down Expand Up @@ -439,7 +441,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_middle_bigram_pos_tag_featurizer(corpus)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_middle_bigram_pos_tag_featurizer(corpus)"
]
},
{
Expand Down Expand Up @@ -558,7 +561,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_synset_featurizer(corpus)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_synset_featurizer(corpus)"
]
},
{
Expand Down Expand Up @@ -619,8 +623,9 @@
"source": [
"# Enter your bake-off assessment code in this cell. \n",
"# Please do not remove this comment.\n",
"\n",
"##### YOUR CODE HERE\n",
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" # Please enter your code in the scope of the above conditional.\n",
" ##### YOUR CODE HERE\n",
"\n",
"\n"
]
Expand All @@ -635,8 +640,9 @@
"# your macro-average f-score (an F_0.5 score) as reported \n",
"# by the code above. Please enter only a number between \n",
"# 0 and 1 inclusive. Please do not remove this comment.\n",
"\n",
"##### YOUR CODE HERE\n",
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" # Please enter your score in the scope of the above conditional.\n",
" ##### YOUR CODE HERE\n",
"\n",
"\n"
]
Expand All @@ -658,7 +664,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.7.3"
},
"widgets": {
"state": {},
Expand Down
38 changes: 25 additions & 13 deletions hw_wordsim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@
"metadata": {},
"outputs": [],
"source": [
"get_reader_pair_overlap()"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" get_reader_pair_overlap()"
]
},
{
Expand Down Expand Up @@ -621,7 +622,8 @@
"metadata": {},
"outputs": [],
"source": [
"full_word_similarity_evaluation(giga5)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" full_word_similarity_evaluation(giga5)"
]
},
{
Expand Down Expand Up @@ -685,7 +687,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_run_giga_ppmi_baseline(run_giga_ppmi_baseline)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_run_giga_ppmi_baseline(run_giga_ppmi_baseline)"
]
},
{
Expand Down Expand Up @@ -741,7 +744,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_run_ppmi_lsa_pipeline(run_ppmi_lsa_pipeline)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_run_ppmi_lsa_pipeline(run_ppmi_lsa_pipeline)"
]
},
{
Expand Down Expand Up @@ -803,7 +807,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_run_small_glove_evals(run_small_glove_evals)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_run_small_glove_evals(run_small_glove_evals)"
]
},
{
Expand Down Expand Up @@ -861,7 +866,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_dice_implementation(dice)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_dice_implementation(dice)"
]
},
{
Expand Down Expand Up @@ -933,7 +939,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_ttest_implementation(ttest)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_ttest_implementation(ttest)"
]
},
{
Expand Down Expand Up @@ -1027,7 +1034,8 @@
"metadata": {},
"outputs": [],
"source": [
"test_subword_enrichment(subword_enrichment)"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" test_subword_enrichment(subword_enrichment)"
]
},
{
Expand Down Expand Up @@ -1055,7 +1063,8 @@
"source": [
"# Enter your system description in this cell.\n",
"# Please do not remove this comment.\n",
"\n"
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" pass"
]
},
{
Expand Down Expand Up @@ -1087,7 +1096,9 @@
"# Enter your bake-off assessment code into this cell. \n",
"# Please do not remove this comment.\n",
"\n",
"##### YOUR CODE HERE\n",
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" # Please enter your code in the scope of the above conditional.\n",
" ##### YOUR CODE HERE\n",
"\n",
"\n"
]
Expand All @@ -1102,8 +1113,9 @@
"# your \"Macro-average\" value as reported by the code above. \n",
"# Please enter only a number between 0 and 1 inclusive.\n",
"# Please do not remove this comment.\n",
"\n",
"##### YOUR CODE HERE\n",
"if 'IS_GRADESCOPE_ENV' not in os.environ:\n",
" # Please enter your score in the scope of the above conditional.\n",
" ##### YOUR CODE HERE\n",
"\n",
"\n"
]
Expand All @@ -1125,7 +1137,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.7.3"
},
"widgets": {
"state": {},
Expand Down

0 comments on commit 3e2b4d3

Please sign in to comment.