Skip to content

Commit

Permalink
Internet-free MXNet SST2 sentiment analysis (aws#2762)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroll-aws authored Jul 6, 2021
1 parent 20d3ff4 commit d57eba1
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"mkdir data\n",
"!mkdir data\n",
"\n",
"curl https://raw.githubusercontent.com/saurabh3949/Text-Classification-Datasets/master/stsa.binary.phrases.train > data/train\n",
"curl https://raw.githubusercontent.com/saurabh3949/Text-Classification-Datasets/master/stsa.binary.test > data/test "
"import boto3\n",
"\n",
"s3 = boto3.client(\"s3\")\n",
"\n",
"s3.download_file(\"sagemaker-sample-files\", \"datasets/text/SST2/sst2.train\", \"data/train\")\n",
"s3.download_file(\"sagemaker-sample-files\", \"datasets/text/SST2/sst2.test\", \"data/test\")"
]
},
{
Expand Down Expand Up @@ -97,11 +100,11 @@
"m = MXNet(\n",
" \"sentiment.py\",\n",
" role=get_execution_role(),\n",
" train_instance_count=1,\n",
" train_instance_type=\"ml.c4.xlarge\",\n",
" framework_version=\"1.6.0\",\n",
" py_version=\"py3\",\n",
" distributions={\"parameter_server\": {\"enabled\": True}},\n",
" instance_count=1,\n",
" instance_type=\"ml.c4.xlarge\",\n",
" framework_version=\"1.8.0\",\n",
" py_version=\"py37\",\n",
" distribution={\"parameter_server\": {\"enabled\": True}},\n",
" hyperparameters={\n",
" \"batch-size\": 8,\n",
" \"epochs\": 2,\n",
Expand Down Expand Up @@ -212,7 +215,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.13"
},
"notice": "Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
},
Expand Down

0 comments on commit d57eba1

Please sign in to comment.