|
14 | 14 | "Neo is a capability of Amazon SageMaker that enables machine learning models to train once and run anywhere in the cloud and at the edge. Inf1 instances are built from the ground up to support machine learning inference applications and feature up to 16 AWS Inferentia chips, high-performance machine learning inference chips designed and built by AWS. This notebook will show you how to deploy a pretrained PyTorch model to an Inf1 instance." |
15 | 15 | ] |
16 | 16 | }, |
17 | | - { |
18 | | - "cell_type": "code", |
19 | | - "execution_count": null, |
20 | | - "metadata": {}, |
21 | | - "outputs": [], |
22 | | - "source": [ |
23 | | - "import sagemaker\n", |
24 | | - "sagemaker_version = sagemaker.__version__\n", |
25 | | - "\n", |
26 | | - "f = open(\"sagemaker_version\", \"w\")\n", |
27 | | - "f.write(sagemaker_version)\n", |
28 | | - "f.close()" |
29 | | - ] |
30 | | - }, |
31 | | - { |
32 | | - "cell_type": "code", |
33 | | - "execution_count": null, |
34 | | - "metadata": {}, |
35 | | - "outputs": [], |
36 | | - "source": [ |
37 | | - "from IPython.display import display_html\n", |
38 | | - "display_html(\"<script>Jupyter.notebook.kernel.restart()</script>\",raw=True)" |
39 | | - ] |
40 | | - }, |
41 | 17 | { |
42 | 18 | "cell_type": "code", |
43 | 19 | "execution_count": null, |
|
512 | 488 | "## Revert SageMaker version\n", |
513 | 489 | "If needed, revert the SageMaker version. This step is optional." |
514 | 490 | ] |
515 | | - }, |
516 | | - { |
517 | | - "cell_type": "code", |
518 | | - "execution_count": null, |
519 | | - "metadata": {}, |
520 | | - "outputs": [], |
521 | | - "source": [ |
522 | | - "!{sys.executable} -m pip uninstall -y sagemaker" |
523 | | - ] |
524 | | - }, |
525 | | - { |
526 | | - "cell_type": "code", |
527 | | - "execution_count": null, |
528 | | - "metadata": {}, |
529 | | - "outputs": [], |
530 | | - "source": [ |
531 | | - "f = open(\"sagemaker_version\", \"r\")\n", |
532 | | - "sagemaker_version = f.read()\n", |
533 | | - "print(sagemaker_version)" |
534 | | - ] |
535 | | - }, |
536 | | - { |
537 | | - "cell_type": "code", |
538 | | - "execution_count": null, |
539 | | - "metadata": {}, |
540 | | - "outputs": [], |
541 | | - "source": [ |
542 | | - "!{sys.executable} -m pip install -qU sagemaker==$sagemaker_version" |
543 | | - ] |
544 | 491 | } |
545 | 492 | ], |
546 | 493 | "metadata": { |
|
0 commit comments