From b3e0c2d2f7e0b9f855a5a0e3f199bc28fb2fa461 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:49:42 +0000 Subject: [PATCH] deploy: f3a91f2da2a231f3186bfc5a4f3cdaed2f1ec058 --- 404.html | 4 ++-- asset-library/introduction/index.html | 4 ++-- asset-library/troubleshooting/index.html | 4 ++-- assets/js/351db62b.335c019a.js | 1 - assets/js/351db62b.d0748eda.js | 1 + .../{runtime~main.eb6ff02a.js => runtime~main.a6176abd.js} | 2 +- courses/invite-beta-testers/index.html | 4 ++-- .../advanced/configuring-sn-labs-tool-config/index.html | 4 ++-- guided-projects/create-a-guided-project/index.html | 4 ++-- index.html | 4 ++-- .../add-a-lab-to-a-coursera-course/index.html | 4 ++-- .../add-a-lab-to-a-skills-network-course/index.html | 4 ++-- .../add-a-lab-to-an-edx-org-course/index.html | 4 ++-- labs/cloud-ide/index.html | 4 ++-- labs/create-a-lab/index.html | 4 ++-- labs/edit-jupyterlab-instructions-computer/index.html | 4 ++-- labs/free-apis/index.html | 6 +++--- labs/jupyterlab/index.html | 4 ++-- labs/jupyterlite-vs-jupyterlab/index.html | 4 ++-- labs/jupyterlite/index.html | 4 ++-- labs/misc/manim/index.html | 4 ++-- labs/network-egress/index.html | 4 ++-- skills-network-file-library/how-to-access/index.html | 4 ++-- skills-network-file-library/how-to-use/index.html | 4 ++-- skills-network-file-library/introduction/index.html | 4 ++-- skills-network-file-library/layout/index.html | 4 ++-- .../things-to-keep-in-mind/index.html | 4 ++-- 27 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 assets/js/351db62b.335c019a.js create mode 100644 assets/js/351db62b.d0748eda.js rename assets/js/{runtime~main.eb6ff02a.js => runtime~main.a6176abd.js} (60%) diff --git a/404.html b/404.html index 33239da..1294da6 100644 --- a/404.html +++ b/404.html @@ -5,13 +5,13 @@ Page Not Found | Author Workbench Knowledge Base - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/asset-library/introduction/index.html b/asset-library/introduction/index.html index 5861d53..6527076 100644 --- a/asset-library/introduction/index.html +++ b/asset-library/introduction/index.html @@ -5,13 +5,13 @@ Introduction | Author Workbench Knowledge Base - +
Skip to main content

Introduction

The labs, images and all other assets you create for your course or project are uploaded to the Asset Library. With Asset Library, you get a single place to view all your assets and grab the links you need to use them in your course or project.

Asset Library Screenshot

To get started with the Asset Library, you will need to have assets in your course. This can be a lab or any file in the GitLab repository of your project. Once your assets are ready, you can go to the details page of your course or guided project and click the Open Asset Library button.

- + \ No newline at end of file diff --git a/asset-library/troubleshooting/index.html b/asset-library/troubleshooting/index.html index 53f8698..b593be4 100644 --- a/asset-library/troubleshooting/index.html +++ b/asset-library/troubleshooting/index.html @@ -5,7 +5,7 @@ Troubleshooting | Author Workbench Knowledge Base - + @@ -13,7 +13,7 @@
Skip to main content

Troubleshooting

My Asset Library is out of sync

If you do not see the assets you expect in your Asset Library, you may need to:

  • Wait up to 5 minutes for the assets to be uploaded.
  • (Advanced) If you are still experiencing issues, head to the advanced section of your course or project, and click Open GitLab Project. GitLab Button Once you are in the GitLab repository of your project, follow these instructions and restart the latest failed pipeline.
    • if the pipeline is still failing, please try again later or contact support.
- + \ No newline at end of file diff --git a/assets/js/351db62b.335c019a.js b/assets/js/351db62b.335c019a.js deleted file mode 100644 index c60d0c0..0000000 --- a/assets/js/351db62b.335c019a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkauthor_workbench_knowledgebase=self.webpackChunkauthor_workbench_knowledgebase||[]).push([[793],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),m=p(n),d=o,f=m["".concat(s,".").concat(d)]||m[d]||c[d]||a;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var p=2;p1.0.321 of ibm-watson-machine-learning",id:"important-you-must-use-version-10321-of-ibm-watson-machine-learning",level:5},{value:"Usage",id:"usage",level:5},{value:"OpenAI",id:"openai",level:3}],m={toc:c};function d(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"free-apis-available-in-skills-network-labs"},"Free APIs Available in Skills Network Labs"),(0,a.kt)("p",null,"While taking labs within Skills Network Labs, your learners will have free access to some APIs.\nThis helps learners get started with the interesting stuff right away, without immediately worrying about registration."),(0,a.kt)("h2",{id:"learner-quotas"},"Learner Quotas"),(0,a.kt)("p",null,"Learner usage of Skills Network-provided APIs is subject to a quota. The quota is based on actual cost, so if you choose lower-cost APIs (e.g. lower cost models), then your learners will be less likely to hit their quota."),(0,a.kt)("p",null,"When a learner has reached their quota, they will receive an error message like this one:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-shell"},"RateLimitError: Error code: 429 - {'error': 'You have exceeded your usage quota for Skills Network-provided for the day. Your quota will reset in 6 hours 32 minutes from now.'}\n")),(0,a.kt)("h2",{id:"limitations"},"Limitations"),(0,a.kt)("p",null,"These free Skills Network-provided APIs are available for learning and experimentation. They are not suitable when it comes to deploying an application. "),(0,a.kt)("p",null,"Learners will have access to these APIs within their:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Cloud IDE (from their terminal/shell, or when running an application from within Cloud IDE)"),(0,a.kt)("li",{parentName:"ul"},"JupyterLab IDE (from their notebook, or from the JupyterLab terminal/shell)"),(0,a.kt)("li",{parentName:"ul"},"Rstudio IDE")),(0,a.kt)("p",null,"Learners will ",(0,a.kt)("em",{parentName:"p"},"not")," have free access to these APIs within their:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Code Engine projects"),(0,a.kt)("li",{parentName:"ul"},"Kubernetes cluster namespaces"),(0,a.kt)("li",{parentName:"ul"},"OpenShift cluster namespaces")),(0,a.kt)("h2",{id:"free-apis"},"Free APIs"),(0,a.kt)("h3",{id:"watsonxai"},"watsonx.ai"),(0,a.kt)("h5",{id:"important-you-must-use-version-10321-of-ibm-watson-machine-learning"},"IMPORTANT: You must use version ",(0,a.kt)("inlineCode",{parentName:"h5"},"1.0.321")," of ",(0,a.kt)("inlineCode",{parentName:"h5"},"ibm-watson-machine-learning")),(0,a.kt)("p",null,"You can install it by running:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"pip install ibm-watson-machine-learning==1.0.321\n")),(0,a.kt)("h5",{id:"usage"},"Usage"),(0,a.kt)("p",null,"To use the free Skills Network-provided watsonx.ai project, you need to specify ",(0,a.kt)("inlineCode",{parentName:"p"},'"token": "skills-network"')," (not to be confused with ",(0,a.kt)("inlineCode",{parentName:"p"},'"apikey": "skills-network"')," ) and ",(0,a.kt)("inlineCode",{parentName:"p"},'project_id = "skills-network"'),". For example, you can modify ",(0,a.kt)("a",{parentName:"p",href:"https://www.ibm.com/docs/en/watsonx-as-a-service?topic=models-python-library#example-prompt-a-foundation-model-with-default-parameters"},"the example from the official documentation for the ibm_watson_machine_learning library"),":"),(0,a.kt)("p",null,"You can then use it like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'from ibm_watson_machine_learning.foundation_models.utils.enums import ModelTypes\nfrom ibm_watson_machine_learning.foundation_models import Model\nimport json\n\nmy_credentials = {\n "url" : "https://us-south.ml.cloud.ibm.com",\n "token" : "skills-network" # <--- NOTE: specify "skills-network" as your token (NOT as your apikey) \n}\n\n\nmodel_id = ModelTypes.FLAN_T5_XXL\ngen_parms = None\nproject_id = "skills-network" # <--- NOTE: specify "skills-network" as your project_id\nspace_id = None\nverify = False\n\nmodel = Model( model_id, my_credentials, gen_parms, project_id, space_id, verify ) \n \nprompt_txt = "In today\'s sales meeting, we "\ngen_parms_override = None\n\ngenerated_response = model.generate( prompt_txt, gen_parms_override )\n\nprint( json.dumps( generated_response, indent=2 ) )\n')),(0,a.kt)("h3",{id:"openai"},"OpenAI"),(0,a.kt)("p",null,"To use the free Skills Network-provided OpenAI APIs, no additional configuration is necessary. You can use ",(0,a.kt)("a",{parentName:"p",href:"https://platform.openai.com/docs/api-reference/chat/create"},"the examples from the official documentation")," without modification."),(0,a.kt)("p",null,"For example:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model="gpt-3.5-turbo",\n messages=[\n {"role": "system", "content": "You are a helpful assistant."},\n {"role": "user", "content": "Hello!"}\n ]\n)\n\nprint(completion.choices[0].message)\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/351db62b.d0748eda.js b/assets/js/351db62b.d0748eda.js new file mode 100644 index 0000000..d5700be --- /dev/null +++ b/assets/js/351db62b.d0748eda.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkauthor_workbench_knowledgebase=self.webpackChunkauthor_workbench_knowledgebase||[]).push([[793],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,h=m["".concat(s,".").concat(d)]||m[d]||c[d]||o;return n?r.createElement(h,i(i({ref:t},u),{},{components:n})):r.createElement(h,i({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var p=2;p for the day. Your quota will reset in 6 hours 32 minutes from now.'}\n")),(0,o.kt)("h2",{id:"limitations"},"Limitations"),(0,o.kt)("p",null,"These free Skills Network-provided APIs are available for learning and experimentation. They are not suitable when it comes to deploying an application. "),(0,o.kt)("p",null,"Learners will have access to these APIs within their:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Cloud IDE (from their terminal/shell, or when running an application from within Cloud IDE)"),(0,o.kt)("li",{parentName:"ul"},"JupyterLab IDE (from their notebook, or from the JupyterLab terminal/shell)"),(0,o.kt)("li",{parentName:"ul"},"Rstudio IDE")),(0,o.kt)("p",null,"Learners will ",(0,o.kt)("em",{parentName:"p"},"not")," have free access to these APIs within their:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Code Engine projects"),(0,o.kt)("li",{parentName:"ul"},"Kubernetes cluster namespaces"),(0,o.kt)("li",{parentName:"ul"},"OpenShift cluster namespaces")),(0,o.kt)("h2",{id:"free-apis"},"Free APIs"),(0,o.kt)("h3",{id:"watsonxai"},"watsonx.ai"),(0,o.kt)("h4",{id:"versioning"},"Versioning"),(0,o.kt)("p",null,"It is recommended that authors follow the instructions below using the default ",(0,o.kt)("inlineCode",{parentName:"p"},"ibm-watson-machine-learning")," version installed with pip. However, after doing so, please pin the version you used for your learners. If you encounter an error with the latest package version and the following instructions, please let us know!"),(0,o.kt)("p",null,"For example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-shell"},"$ pip install ibm-watson-machine-learning\nCollecting ibm-watson-machine-learning\n Downloading ibm_watson_machine_learning-1.0.344-py3-none-any.whl.metadata (8.6 kB)\n...\n")),(0,o.kt)("p",null,"Your lab instructions would state:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-shell"},"pip install ibm-watson-machine-learning==1.0.344\n")),(0,o.kt)("h4",{id:"usage"},"Usage"),(0,o.kt)("p",null,"To use the free Skills Network-provided watsonx.ai project, specify the ",(0,o.kt)("inlineCode",{parentName:"p"},'"url"')," and ",(0,o.kt)("inlineCode",{parentName:"p"},'project_id = "skills-network"')," (make sure to ",(0,o.kt)("strong",{parentName:"p"},"leave out")," ",(0,o.kt)("inlineCode",{parentName:"p"},'"token"')," and ",(0,o.kt)("inlineCode",{parentName:"p"},'"apikey"'),"). For example, you can modify ",(0,o.kt)("a",{parentName:"p",href:"https://www.ibm.com/docs/en/watsonx-as-a-service?topic=models-python-library#example-prompt-a-foundation-model-with-default-parameters"},"the example from the official documentation for the ibm_watson_machine_learning library")," as follows:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from ibm_watson_machine_learning.foundation_models.utils.enums import ModelTypes\nfrom ibm_watson_machine_learning.foundation_models import Model\nimport json\n\nmy_credentials = {\n "url" : "https://us-south.ml.cloud.ibm.com"\n}\n\n\nmodel_id = ModelTypes.FLAN_T5_XXL\ngen_parms = None\nproject_id = "skills-network" # <--- NOTE: specify "skills-network" as your project_id\nspace_id = None\nverify = False\n\nmodel = Model( model_id, my_credentials, gen_parms, project_id, space_id, verify )\n\nprompt_txt = "In today\'s sales meeting, we "\ngen_parms_override = None\n\ngenerated_response = model.generate( prompt_txt, gen_parms_override )\n\nprint( json.dumps( generated_response, indent=2 ) )\n')),(0,o.kt)("h3",{id:"openai"},"OpenAI"),(0,o.kt)("p",null,"To use the free Skills Network-provided OpenAI APIs, no additional configuration is necessary. You can use ",(0,o.kt)("a",{parentName:"p",href:"https://platform.openai.com/docs/api-reference/chat/create"},"the examples from the official documentation")," without modification."),(0,o.kt)("p",null,"For example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model="gpt-3.5-turbo",\n messages=[\n {"role": "system", "content": "You are a helpful assistant."},\n {"role": "user", "content": "Hello!"}\n ]\n)\n\nprint(completion.choices[0].message)\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.eb6ff02a.js b/assets/js/runtime~main.a6176abd.js similarity index 60% rename from assets/js/runtime~main.eb6ff02a.js rename to assets/js/runtime~main.a6176abd.js index b5daa07..6d5c51e 100644 --- a/assets/js/runtime~main.eb6ff02a.js +++ b/assets/js/runtime~main.a6176abd.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,o,f={},c={};function a(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return f[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=f,a.c=c,e=[],a.O=function(t,n,r,o){if(!n){var f=1/0;for(d=0;d=o)&&Object.keys(a.O).every((function(e){return a.O[e](n[u])}))?n.splice(u--,1):(c=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);a.r(o);var f={};t=t||[null,n({}),n([]),n(n)];for(var c=2&r&&e;"object"==typeof c&&!~t.indexOf(c);c=n(c))Object.getOwnPropertyNames(c).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},a.d(o,f),o},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))},a.u=function(e){return"assets/js/"+({14:"ebc923ed",53:"935f2afb",112:"c038ad78",116:"03f53bdf",162:"d589d3a7",243:"948a76fc",413:"28a527b9",514:"1be78505",545:"fea1c456",565:"42239457",576:"05ed32cb",578:"2c962096",604:"d5918ed2",617:"e275d2c5",633:"408965af",722:"9d3e16d2",742:"465b9d18",782:"615892ba",787:"5157f4d5",793:"351db62b",812:"2e2a8153",816:"9f53f976",833:"eff53230",853:"6f74a040",897:"7f9ac86a",918:"17896441",992:"11d50d29"}[e]||e)+"."+{14:"82eea864",53:"491e0d5a",112:"1e9783e2",116:"72c44cfc",162:"26bf8032",243:"12fa93c0",413:"44f5b967",514:"b0e45835",545:"78beff9c",565:"a8aef3ae",576:"7eaf1570",578:"41f23ee8",604:"42edd6b3",617:"631f7b87",633:"6bc4944b",722:"7222ccb6",742:"a3d5a474",782:"b622df7a",787:"85263aa8",793:"335c019a",812:"634f5bae",816:"380599f9",833:"25807fcf",853:"aa2188f8",897:"a4dc4bb5",918:"8bff8899",972:"a43fdf11",992:"b74de1fb"}[e]+".js"},a.miniCssF=function(e){},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="author-workbench-knowledgebase:",a.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var i=document.getElementsByTagName("script"),d=0;d=o)&&Object.keys(a.O).every((function(e){return a.O[e](n[u])}))?n.splice(u--,1):(f=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);a.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach((function(t){c[t]=function(){return e[t]}}));return c.default=function(){return e},a.d(o,c),o},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))},a.u=function(e){return"assets/js/"+({14:"ebc923ed",53:"935f2afb",112:"c038ad78",116:"03f53bdf",162:"d589d3a7",243:"948a76fc",413:"28a527b9",514:"1be78505",545:"fea1c456",565:"42239457",576:"05ed32cb",578:"2c962096",604:"d5918ed2",617:"e275d2c5",633:"408965af",722:"9d3e16d2",742:"465b9d18",782:"615892ba",787:"5157f4d5",793:"351db62b",812:"2e2a8153",816:"9f53f976",833:"eff53230",853:"6f74a040",897:"7f9ac86a",918:"17896441",992:"11d50d29"}[e]||e)+"."+{14:"82eea864",53:"491e0d5a",112:"1e9783e2",116:"72c44cfc",162:"26bf8032",243:"12fa93c0",413:"44f5b967",514:"b0e45835",545:"78beff9c",565:"a8aef3ae",576:"7eaf1570",578:"41f23ee8",604:"42edd6b3",617:"631f7b87",633:"6bc4944b",722:"7222ccb6",742:"a3d5a474",782:"b622df7a",787:"85263aa8",793:"d0748eda",812:"634f5bae",816:"380599f9",833:"25807fcf",853:"aa2188f8",897:"a4dc4bb5",918:"8bff8899",972:"a43fdf11",992:"b74de1fb"}[e]+".js"},a.miniCssF=function(e){},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="author-workbench-knowledgebase:",a.l=function(e,t,n,c){if(r[e])r[e].push(t);else{var f,u;if(void 0!==n)for(var i=document.getElementsByTagName("script"),d=0;d Invite Beta Testers | Author Workbench Knowledge Base - + @@ -13,7 +13,7 @@

Invite Beta Testers

So, you have created the first draft of your course and ready to get some feedback from your peers, this article will walk you through the process.

Pre-req

Your beta testers must have a registered and activated account on https://author.skills.network. Once they have completed this step, make sure to take note of their account email address and follow the instructions below to invite them to your course.

Inviting Beta Tester Steps

  1. Visit author.skills.network and navigate to your course
  2. Click on Content tab and then click on Edit in Studio button
  3. Click at the View Live button on the top right
  4. Navigate to the Instructor tab, then click Membership
  5. You should be able to invite beta testers under the Batch Beta Tester Addition form

Edit in Studio Button Screenshot View Live Button Screenshot Navigate to Instructor-&gt;Membership Screenshot

- + \ No newline at end of file diff --git a/guided-projects/advanced/configuring-sn-labs-tool-config/index.html b/guided-projects/advanced/configuring-sn-labs-tool-config/index.html index be59e18..9ee2ad8 100644 --- a/guided-projects/advanced/configuring-sn-labs-tool-config/index.html +++ b/guided-projects/advanced/configuring-sn-labs-tool-config/index.html @@ -5,14 +5,14 @@ Using a Custom Outline | Author Workbench Knowledge Base - +

Using a Custom Outline

note

This is a setting for advanced users. For the vast majority of users, we do not expect you to need to configure this setting.

Author Workbench provides two ways to display your Guided Project to learners. You can either create your own custom outline using Studio or use the simple outline we provide.

To get started

To change your outline configuration, simply...

  1. Open your Guided Project in Author Workbench and go to the Advanced tab
  2. Scroll to the section labelled Configure Your Project Outline (Advanced)

Using the Custom SN Studio Outline

If you are experienced and familiar with Studio you can fully customize your project's outline by selecting the Use Custom SN Studio outline option. This will let you use the full power of Studio to create your outline.

Using the Simple Outline

When your Guided Project is created, it will be set up to use the simple outline by default. We will automatically create a simple outline for you that includes a button to launch your lab, a section for learners to leave you feedback and a section for learners to mark completion.

- + \ No newline at end of file diff --git a/guided-projects/create-a-guided-project/index.html b/guided-projects/create-a-guided-project/index.html index 9088dc8..2f1347a 100644 --- a/guided-projects/create-a-guided-project/index.html +++ b/guided-projects/create-a-guided-project/index.html @@ -5,13 +5,13 @@ Create a Guided Project | Author Workbench Knowledge Base - +

Create a Guided Project

We all learn differently. Some like to start by laying a solid foundation of concepts and then build on that foundation by getting deeper and deeper into the subject. Others, like to follow the Nike motto of "Just do it!". Skills Network accomodates both learning styles. Skills Network courses are best suited for those who preffer the more traditional structured approach. For the "Just do it" crowd we offer Guided Projects.

Guided Projects help people learn by doing. A good Guided Project is like a tutorial that your users can follow on your their own to learn how to do something. A great Guided Project is like a tutorial that teaches users how to solve a real-life problem. In other words, not just teaches them some technique but how to apply the technique to a real problem. We encourage you to create great Guided Projects not meerly good ones.

Unlike traditional tutorials, Guided Projects bundle tutorial instructions with all of the required tools for a complete in-browser learning experiences that allow learners to gain new skills without the need to download, install, and configure software. This article will walk you through the steps to create and publish a Guided Project.

How to create a great Guided Project

First, think about what you aim to teach learners in your Guided Project. Better yet, what will the people be able to do after they complete your Guided Project. Maybe you want them to get a their first JavaScript application to print "Hello World". Or maybe you want to walk learners through the process of creating their first NFT or creating a machine learning model for predicting when someone has fallen down and needs help, like is often the case with senior citizens living on their own.

As with any content, the title of your Guided Project is very important. So, don't rush and put some thought into creating a great title. A great title is half of the project's success. The best titles speak to how users find things rather than simply describing the contents of your project. Keep it short so it will peak people's interest and curiosity. Keep the details to the short and long descriptions.

You don't have to create short and long descriptions for your project right away, but you should have an idea and it does help to put these ideas on the form. Resist the temptation to leave these fields blank or to type in "test" or some other meaningless phrase. Great descriptions are not created all at once, they are a result of many iterations of writing and rewriting the text until you are happy people are going to be interested in learning what you are about to teach them.

Project title, short and long descriptions, a picture and your bio (more on that later) is how people will find your project and they determine if they will decide to do it, so, this is very important stuff!

Once you've decided on the goal of your Project, decide which of our tools best suits your needs. Consult our tools page to learn more about each tool.

Some basic tools and their use cases:

  • Try Cloud IDE for general purpose coding and web apps 🚀
  • Try JupyterLite for data science and machine learning with Python 🧠
  • Try Intructional Lab for writing basic tutorials 💡

Create Guided Project Screenshot

Click Create Guided Project to get started on authoring.

Getting Started

Upon creating a Guided Project in Author Workbench, you will see the following page with three major steps:

  1. Edit Your Instructions
  2. Preview Your Project
  3. Get Published

Guided Project Screenshot

Authoring

Edit Your Instructions

Click Edit Instructions to open an editor in a new tab and start authoring your project. Depending on your project type, your editing environment will be different.

When you first open your project instructions, there will be some useful text already in the editor. It will walk you through the editor's features and help you get familiar with the environment.

note

Don't forget to save and publish your Guided Project!

Preview Your Project

Back on the Guided Project page, click Launch Project to preview the project in a new tab. Here, you can preview exactly how learners will experience your lab. Try out your instructions and see how it feels!

Get Published

To publish your Guided Project, click Submit for Review on the Guided Project Page. Upon submission, our curation team will review your content and we will reach out if there are any issues. Once published, changes you make to your instructions will update your Project instantly for learners. Congratulations on creating your Guided Project!

- + \ No newline at end of file diff --git a/index.html b/index.html index de62e6f..c82c8e4 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Getting Started | Author Workbench Knowledge Base - + @@ -13,7 +13,7 @@

Getting Started

Welcome to the Author Workbench Knowledgebase. We are in the process of building this knowledgebase to help you build amazing courses and guided projects with Author Workbench.

If you need heelp with any issues you encounter, want to suggest a new feature, or want to collaborate with us, join our Discussions forum and let us know. Click here to contact support.

- + \ No newline at end of file diff --git a/labs/adding-labs-to-courses/add-a-lab-to-a-coursera-course/index.html b/labs/adding-labs-to-courses/add-a-lab-to-a-coursera-course/index.html index ea6149c..a0fdcc0 100644 --- a/labs/adding-labs-to-courses/add-a-lab-to-a-coursera-course/index.html +++ b/labs/adding-labs-to-courses/add-a-lab-to-a-coursera-course/index.html @@ -5,7 +5,7 @@ Add a Lab to your Coursera Course | Author Workbench Knowledge Base - + @@ -13,7 +13,7 @@

Add a Lab to your Coursera Course

Once you have created a lab, you then need to add it to your course via Coursera. When you are adding a lab to your course, you embed your lab into a unit of your course. This way, learners will naturally progress through the course, and complete your labs as they go.

Add an Instructional Lab to your Course

This section is only for instructional labs. If you wish to add a different lab type to your course, see the Add a (Non-Instructional) Lab to your Course section below.

As a Skills Network author, you can create "instructional labs". These are labs that include step by step instructions for working with tools external to Skills Network Labs, such as services on IBM Cloud.

HTML files will be automatically generated from instructional labs so they can be easliy embedded or linked to from your course. To embed an instructional lab in your course, follow the steps below.

  1. On your course page, navigate to the lab you want (under the Labs tab) and click "Add to Course"

image

  1. Copy the JSON configuration provided

image

  1. Close the pop-up and navigate to your Course Outline in the Content tab on your course page. Press the "Edit in Coursera" button to open the outline in Coursera

image

  1. Select the version of the course you want to add your instructional lab to

image

  1. Navigate to the week and unit you wish to add your instructional lab in, and insert an ungraded plugin

image

  1. After naming your plugin as desired, click on the item to edit it

  2. Click on the "Choose Plugin" button and select "Pop Up Template"

image

image

  1. After pressing "Continue", scroll down to the bottom of the page and select "Edit Configuration"

image

  1. Replace all existing content with the JSON you copied in step 2 and click "Save Configuration"

image

  1. Now, your instructional lab should appear in the plugin. You can now publish your changes, or view your instructional lab as a learner.

image

Add a (Non-Instructional) Lab to your Course

This section is only applicable for any lab type other than an instructional lab. If you wish to add an instructional lab to your course, see the Add an Instructional Lab to your Course section.

To add a (non-instructional) lab to your course in Coursera:

  1. In Coursera, go to the week and unit you want your lab to be in and add a new LTI Item.

image

  1. Add the following values to the corresponding fields within the LTI Item
Launch URL See the Lab Launch Url section below.
Consumer Key See the LTI Credentials section below.
Secret See the LTI Credentials section below.
Learner Privacy Share learner ID, full name, and email address

Lab Launch Url

The Lab Launch url can be easily found in Author Workbench on your course page. Just follow these steps:

  1. On your course page, navigate to the lab you want (under the Labs tab) and click "Embed"

image

  1. Copy the the Lab's Launchg Url by clicking on the Copy button.

image

LTI Credentials

The consumer key and secret can be found in Author Workbench on your course page. Navigate to the Advanced tab and and scroll to the LTI Credentials (Advanced Users Only) section. Here, you will be able to copy the consumer key and secret. If you are publishing your course to Coursera, please use the LTI Credential (Coursera) credentials. Otherwise, use LTI Credential (Skills Network / edX).

image

Add a Datasette Lab to your Course

Adding Datasette labs to your course involves a few steps. This guide will outline all the steps you must follow to successfully add a Datasette lab to your course outline.

Step 1. Follow the guide: Add a (Non-Instructional) Lab to your Course

Start by following the same workflow as adding a non-instructional lab to your course. The difference being now you paste https://labs.cognitiveclass.ai/login/lti as your launch url

Step 2. Upload your database file to the SN File Library

You must supply a database file as the value for sn_asset_library_sqlite_db_url in your Custom LTI Parameters.

To do this, you should upload a .db or .sqlite file of your choice to the SN File Library. Head to the content tab of your course or guided project.

Here you can open the File Library and upload your database file. image

Once you have uploaded your database file to SN File Library, select the file and copy the asset URL.

image

Step 3. Copy your instructions url

you will also need an instructions URL.

This can be obtained by clicking opening the embed popup on your lab in Author Workbench. image

Step 4. Add custom parameters to your lti item

Fill out the custom parameters for your lti item

image

[
"sn_labs_tool=datasette",
"sn_labs_filepath=/labs/datasette/lab.db",
"sn_asset_library_sqlite_db_url=<DB URL FROM STEP 2>",
"sn_asset_library_instructions_url=<INSTRUCTIONS URL FROM STEP 3>"
]

Step 5. Test your lab

Your lab should now be set up to use Datasette. If there are any issues, please double check that you followed all the steps above correctly.

- + \ No newline at end of file diff --git a/labs/adding-labs-to-courses/add-a-lab-to-a-skills-network-course/index.html b/labs/adding-labs-to-courses/add-a-lab-to-a-skills-network-course/index.html index 61908ed..04ccf8a 100644 --- a/labs/adding-labs-to-courses/add-a-lab-to-a-skills-network-course/index.html +++ b/labs/adding-labs-to-courses/add-a-lab-to-a-skills-network-course/index.html @@ -5,7 +5,7 @@ Add a Lab to your Skills Network Course | Author Workbench Knowledge Base - + @@ -16,7 +16,7 @@ image

Add a Datasette Lab to your Course

Adding Datasette labs to your course involves a few steps. This guide will outline all the steps you must follow to successfully add a Datasette lab to your course or guided project outline.

Step 1. Add a lab to your outline

  1. In Skills Network Studio, go to the unit you want your lab to be in. If it doesn't exist yet, you can create a new unit.

image

  1. Click the green advanced button and select LTI Consumer

image

image

  1. Edit the following properties of your LTI Consumer.

image

LTI ID sn_lti
LTI URL https://labs.cognitiveclass.ai/login/lti
Custom Parameters See Step 2
LTI Launch Target New Window
Request user's username true
Request user's email true
Send extra parameters true

Step 2. Start writing your Custom LTI Parameters

Now you must create the Custom Parameters. The values you use in your Custom Parameters are very important.

Below are the parameters you will need. Some of the values will have to be obtained in the next steps.

We strongly recommend you give each lab a unique path in the sn_labs_filepath value

[
"sn_labs_tool=datasette",
"sn_labs_filepath=/labs/datasette/lab.db",
"sn_asset_library_sqlite_db_url=<SEE STEP 3>",
"sn_asset_library_instructions_url=<SEE STEP 4>"
]

Step 3. Upload your database file to the SN File Library

You must supply a database file as the value for sn_asset_library_sqlite_db_url in your Custom Parameters.

To do this, you should upload a .db or .sqlite file of your choice to the SN File Library. Head to the content tab of your course or guided project.

Here you can open the File Library and upload your database file. image

Once you have uploaded your database file to SN File Library, select the file and copy the asset URL.

image

Now you can add this URL to your Custom Parameters like so

[
"sn_labs_tool=datasette",
"sn_labs_filepath=/labs/datasette/lab.db",
"sn_asset_library_sqlite_db_url=https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/datasette-test/datasets/MyDemoDataset.db",
"sn_asset_library_instructions_url=<SEE STEP 4>"
]

Step 4. Copy your instructions url

Finally, you just need an instructions URL.

This can be obtained by clicking opening the embed popup on your lab in Author Workbench. image

Now you can add this URL to your Custom Parameters like so

[
"sn_labs_tool=datasette",
"sn_labs_filepath=/labs/datasette/lab.db",
"sn_asset_library_sqlite_db_url=https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/datasette-test/datasets/MyDemoDataset.db",
"sn_asset_library_instructions_url=https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/datasette-test/instructions.md"
]

Step 5. Paste your Custom Parameters into studio and save

Now that you have completed the steps above, you should have all the right parameters to complete the set up of your lab in SN Studio.

You should paste the Custom Parameters you built in the previous steps to complete the LTI Consumer object.

image

Now you can click Save.

Step 6. Test your lab

It is important to test to ensure you set everything up correctly.

Click the Publish button and then click View Live Version.

This will allow you preview the lab as a learner would see it.

If there are any issues, please double check that you followed all the steps above correctly.

- + \ No newline at end of file diff --git a/labs/adding-labs-to-courses/add-a-lab-to-an-edx-org-course/index.html b/labs/adding-labs-to-courses/add-a-lab-to-an-edx-org-course/index.html index f5e80e3..96346bf 100644 --- a/labs/adding-labs-to-courses/add-a-lab-to-an-edx-org-course/index.html +++ b/labs/adding-labs-to-courses/add-a-lab-to-an-edx-org-course/index.html @@ -5,7 +5,7 @@ Add a Lab to your edX.org Course | Author Workbench Knowledge Base - + @@ -16,7 +16,7 @@ image

Add a Datasette Lab to your Course

Adding Datasette labs to your course involves a few steps. This guide will outline all the steps you must follow to successfully add a Datasette lab to your course or guided project outline.

Step 1. Add a lab to your outline

  1. In edX Studio, go to the unit you want your lab to be in. If it doesn't exist yet, you can create a new unit.

image

  1. Click the green advanced button and select LTI Consumer

image

image

  1. Edit the following properties of your LTI Consumer and click Save.

image

LTI ID sn_lti
LTI URL https://labs.cognitiveclass.ai/login/lti
Custom Parameters See Step 2
LTI Launch Target New Window
Request user's username true
Request user's email true
Send extra parameters true

Step 2. Start writing your Custom LTI Parameters

Now you must create the Custom Parameters. The values you use in your Custom Parameters are very important.

Below are the parameters you will need. Some of the values will have to be obtained in the next steps.

We strongly recommend you give each lab a unique path in the sn_labs_filepath value

[
"sn_labs_tool=datasette",
"sn_labs_filepath=/labs/datasette/lab.db",
"sn_asset_library_sqlite_db_url=<SEE STEP 3>",
"sn_asset_library_instructions_url=<SEE STEP 4>"
]

Step 3. Upload your database file to the SN File Library

You must supply a database file as the value for sn_asset_library_sqlite_db_url in your Custom Parameters.

To do this, you should upload a .db or .sqlite file of your choice to the SN File Library. Head to the content tab of your course or guided project.

Here you can open the File Library and upload your database file. image

Once you have uploaded your database file to SN File Library, select the file and copy the asset URL.

image

Now you can add this URL to your Custom Parameters like so

[
"sn_labs_tool=datasette",
"sn_labs_filepath=/labs/datasette/lab.db",
"sn_asset_library_sqlite_db_url=https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/datasette-test/datasets/MyDemoDataset.db",
"sn_asset_library_instructions_url=<SEE STEP 4>"
]

Step 4. Copy your instructions url

Finally, you just need an instructions URL.

This can be obtained by clicking opening the embed popup on your lab in Author Workbench. image

Now you can add this URL to your Custom Parameters like so

[
"sn_labs_tool=datasette",
"sn_labs_filepath=/labs/datasette/lab.db",
"sn_asset_library_sqlite_db_url=https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/datasette-test/datasets/MyDemoDataset.db",
"sn_asset_library_instructions_url=https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/datasette-test/instructions.md"
]

Step 5. Paste your Custom Parameters into studio and save

Now that you have completed the steps above, you should have all the right parameters to complete the set up of your lab in SN Studio.

You should paste the Custom Parameters you built in the previous steps to complete the LTI Consumer object.

image

Now you can click Save.

Step 6. Test your lab

It is important to test to ensure you set everything up correctly.

Click the Publish button and then click View Live Version.

This will allow you preview the lab as a learner would see it.

If there are any issues, please double check that you followed all the steps above correctly.

- + \ No newline at end of file diff --git a/labs/cloud-ide/index.html b/labs/cloud-ide/index.html index b5cc9c3..be79f57 100644 --- a/labs/cloud-ide/index.html +++ b/labs/cloud-ide/index.html @@ -5,7 +5,7 @@ Cloud IDE | Author Workbench Knowledge Base - + @@ -13,7 +13,7 @@

Cloud IDE

Cloud IDE is a browser integrated development environment running in the cloud. It supports many programming languages and tools right out of the box so that the users can start working right away without the hassle of tedious setups. User interface of Cloud IDE, as shown below, comprises of course instructions on the left side and vscode-like development environment on the right side.

Cloud IDE Screenshot

Launch a terminal

Click Terminal in the menu of the development environment(on the right side of the screen). Then from the dropdown select New Terminal and it should open up a new terminal for you.

Docker

Docker is an open source platform that is widely used to develop, ship and run applications. Cloud-IDE has built-in support for Docker. You can simply use docker cli to run commands. Internally, the docker client(in your IDE) talks to docker daemon, running on a remote host, over a TCP connection. Default user(theia) is configured to run docker commands. Docker commands don't require root privileges. So, don't preface commands with sudo or run them with root user. Some examples are:

docker version

It prints information about the docker client and engine.

docker container list

It lists the existing containers.

Volume Mount Points

Volume is mounted to persist data from a docker container. Currently, Cloud-IDE only allows mounting data from /home/project directory. For example:

docker run -itd --name my-first-container -v /home/project/testDir:/app ubuntu:latest

It spins up my-first-container using ubuntu:latest image and mounts /home/project/testDir(if it exists in your environment) to the /app directory inside the container.

See the docker documentation for more commands.

Kubernetes

Kubernetes is an open source container orchestrator which allows to schedule docker containers on large scale compute nodes. It is now a de-facto standard for cloud-native application development and deployment. Cloud-IDE is already configured to support Kubernetes. It has a pre-installed command line tool called kubectl that handles communication with remote kubernetes cluster. Here are a few examples:

kubectl run my-first-pod --restart=Never --image=ubuntu -- sleep 10s

It creates a my-first-pod that runs a container using ubuntu image with sleep 10s command. This container spawns sleep 10s process.

kubectl get pods

It prints existing pods in your namespace.

More commands can be found in the Kubernetes documentation

Embeddable AI

Cloud IDE supports various Embeddable AI services includes Text-To-Speech, Speech-To-Text, and various Watson NLP services (e.g. sentiment, emotion, etc.). Learners have immediate access to all of these services (via HTTP API calls) to learn, test, and embed in their applications. Moreover, Skills Network provides images for all of these services so learners can deploy the services to the provided Code Engine Project, alongisde their applcations.

Using the provided Services

All of the services are available to all Cloud IDE learners, for all flavours of Cloud IDE. For example the Text-To-Speech can be accessed at: https://sn-watson-tts.labs.skills.network. To help learners both know what services are available and how to use them the Skills Network Toolbox provides a page for each of the Embeddable AI services which shows:

  • Name and brief description
  • Available Models
  • Link to Documentation
  • Example Commands (with button to easily copy or run in terminal)
View Screenshot
image

Moreover, as an author, within Author IDE, you can add Buttons to your lab's markdown instructions to help learners open these pages with a simple button click.

Building and Deploying to Code Engine

If you would like to deploy any of the above-mentioned Embeddable AI NLP service and have it be available for anyone to use, you can follow these steps in order to deploy it. The deployment will be to IBM Cloud’s Code Engine. IBM Cloud Code Engine is a fully managed, cloud-native service for running containerized workloads on IBM Cloud. It allows developers to deploy and run code in a secure, scalable and serverless environment, without having to worry about the underlying infrastructure.

Deploying to Skills Network Code Engine

The following steps allow you to test deploy to a IBM's Code Engine envrionement which is managed by Skills Network. This deployment is relatively easier and is recommended to quickly test out that if everything is working just fine.
Note: This deployment is temporary and is deleted after a few days.

1. Create Code Engine Project

In the left hand navigation pannel, there is an option for the Skills Network Toolbox. Simply open that and that expand the CLOUD section and then click on Code Engine. Finally cick on Create Project.

Create Code Engine Project

2. Click on Code Engine CLI Button

From the same page simply click on Code Engine CLI button. This will open a new terminal and will login to a code engine project with everything alraedy set up for you.

Code Engine CLI

3. Choose and deploy your desired Embeddable AI image

To get started, simply run the following command in the terminal and choose the Watson's AI model you would like to use.

ibmcloud cr image-list --restrict sn-labsassets

After you execute the above command, terminal will output all the different NLP images available. You can then simply choose one of them by copying it's url. For this example, let's say you want to deploy the us.icr.io/sn-labsassets/sentiment-bert-watson-nlp-runtime model to Code Engine.

Then in the same terminal, run the following commands to deploy the model:

# Choose a app name for your Code Engine application
APP_NAME="Replace with your Code Engine Application Name"

# Replace with your desired Watson NLP image
CONTAINER_IMAGE_URL="us.icr.io/sn-labsassets/sentiment-bert-watson-nlp-runtime"

You an also set a visibility for your application, we would recommened to keep it as project to restrict any external traffic to it, and only allow the applications within your code engine project to be able to communicate with it as desired. For more infomration about visibility, check out the IBM Cloud Code Engine docs here.

VISIBILITY=project
ibmcloud ce application create \
--name ${APP_NAME} \
--env ACCEPT_LICENSE=true \
--image ${CONTAINER_IMAGE_URL} \
--registry-secret icr-secret \
--visibility ${VISIBILITY}

After the application is ready, it will display the deployed NLP service URL in the terminal. You can then utilize this service URL in the same way as the other pre-existing Watson NLP services provided by Skills Network, and directly incorporate it into any of your other applications that have been deployed to Code Engine.

Deploying to your personal IBM Cloud account's Code Engine

The following steps allow you to deploy the Watson NLP models to your personal IBM Cloud account's Code Engine envrionement. This deployment has some prerequisites and extra steps but ensures that your deployment is permanent untill you delete it yourself.

Prerequisites:

Ensure that you have registered for a IBM Cloud account and have enabled the billing. You can try it at no charge and receive USD$200 in cloud credits.

1. Log in to your IBM Cloud account

Using the ibmcloud login command log into your own IBM Cloud account. Remember to replace USERNAME with your IBM Cloud account email and then enter your password when promted to.

ibmcloud login -u USERNAME

Use ibmcloud login --sso command to login, if you have a federated ID.

Then target any specific resource group in your account. By default, if you've completed the sign up process for your IBM Cloud account, you can use the Default resource group.

ibmcloud target -g Default
2. Login to the IBM Entitled Registry

You'll need to login to IBM Entitled Registry to download the desired Watson NLP models so you can deploy them to your own Code Engine project.

Go IBM's Container Library to get an Entitlement Key. This Key gives you access to pulling and using the IBM Watson Speech Libraries for Embed. However, do note that this key is only valid for a Year as a trial.

Once you've obtained the Entitlement Key from the container software library you can login to the registry with the key, and pull the images.

Replace it with your own IBM Entitlement Key.

IBM_ENTITLEMENT_KEY="YOUR_IBM_ENTITLEMENT_KEY"

Login to docker registry to pull the images.

echo $IBM_ENTITLEMENT_KEY | docker login -u cp --password-stdin cp.icr.io
3. Choose and build your desired Embeddable AI image

Similar to deploying the image to Skills Network managed Code Engine, you will first need to choose a model from the model catalog.

Using the same example as above, let's say you want to deploy the sentiment_aggregated-bert-workflow_lang_multi_stock model to Code Engine.

Simply copy it's Container Image url as shown below.

Models Catalog Container Image Url

Now simply run the following commands in a terminal to download the chosen model to models directory:

CONTAINER_IMAGE_URL="Replace with the conatiner image url for your chosen model"
mkdir models
docker run -it --rm -e ACCEPT_LICENSE=true -v `pwd`/models:/app/models ${CONTAINER_IMAGE_URL}

After this create a new file called Dockerfile and add the following contents to it:

ARG TAG=1.0
FROM cp.icr.io/cp/ai/watson-nlp-runtime:${TAG}
COPY models /app/models

Finally build your image by executing this command in your terminal:

docker build -t my-watson-nlp-runtime:latest
4 Create a namespace and log in to ICR

You will need to create a namespace before you can upload your images, and make sure you're targeting the ICR region you want, which right now is global.

Choose a name for your namespace, specified as ${NAMESPACE}, and create the namespace. Currently, it's set to my-embeddable-ai, you can choose to rename it to anything you choose.

NAMESPACE=my-embeddable-ai
ibmcloud cr region-set global
ibmcloud cr namespace-add ${NAMESPACE}
ibmcloud cr login
6. Push your image to your namespace
REGISTRY=icr.io

# Tag and push the image
docker tag my-watson-nlp-runtime:latest ${REGISTRY}/${NAMESPACE}/my-watson-nlp-runtime:latest
docker push ${REGISTRY}/${NAMESPACE}/my-watson-nlp-runtime:latest
7. Deploy the image to Code Engine

1: Target a region and a resource group

Choose the region closest to you and/or your target users. Picking a region closer to you or your users makes the browser extension faster. The further the region the longer the request to the model has to travel.

You can choose any region from this list:

Americas

  • us-south - Dallas
  • br-sao - Sao Paulo
  • ca-tor - Toronto
  • us-east - Washington DC

Europe

  • eu-de - Frankfurt
  • eu-gb - London

Asia Pacific

  • au-syd - Sydney
  • jp-tok - Tokyo

Use the following commands to target Dallas as the region and the Default resource group.

REGION=us-south
RESOURCE_GROUP=Default
ibmcloud target -r ${REGION} -g ${RESOURCE_GROUP}

2: Create and Select a new Code Engine project

In this example, a project named my-test-project will be create in the resource group set by the previous command.

ibmcloud ce project create --name my-test-project
ibmcloud ce project select --name my-test-project

3: Deploy Watson NLP Image

Choose a app name for your Code Engine application and set the container image url you just copied.

APP_NAME="Replace with your Code Engine Application Name"

You an also set a visibility for your application, we would recommened to keep it as project to restrict any external traffic to it, and only allow the applications within your code engine project to be able to communicate with it as desired. For more infomration about visibility and other optional parameters, check out the IBM Cloud Code Engine docs here.

VISIBILITY=project
ibmcloud ce application create \
--name ${APP_NAME} \
--port 1080 \
--min-scale 1 --max-scale 2 \
--cpu 2 --memory 8G \
--image private.${REGISTRY}/${NAMESPACE}/my-watson-nlp-runtime:latest \
--registry-secret ce-auto-icr-private-${REGION} \
--visibility ${VISIBILITY} \
--env ACCEPT_LICENSE=true

After the application is ready, it will display the deployed NLP service URL in the terminal. You can then utilize this service URL in the same way as the other pre-existing Watson NLP services provided by Skills Network, and directly incorporate it into any of your other applications that have been deployed to Code Engine.

- + \ No newline at end of file diff --git a/labs/create-a-lab/index.html b/labs/create-a-lab/index.html index 58a84fc..0bdd007 100644 --- a/labs/create-a-lab/index.html +++ b/labs/create-a-lab/index.html @@ -5,7 +5,7 @@ Create a Lab | Author Workbench Knowledge Base - + @@ -13,7 +13,7 @@

Create a Lab

Use labs to create interactive and engaging learning experiences. Labs typically consist of a short set of instructions, side by side with a code editor in the browser. Learners can use the in-browser code editor to write code, execute their code, and deploy their code to the cloud. All without installing packages and without ever leaving the browser.

Each lab should teach a single concept and should guide the learner to create something.

Labs Screenshot

How to create a great Lab

First, think about what you aim to teach learners in your lab. Maybe you want to demonstrate how to get a JavaScript application to print Hello World. Or maybe you want to walk learners through training a Machine Learning model with PyTorch.

Thinking of a great title for your lab is a great way to get yourself to think about what you'll be teaching. It's also a great way to tell your learners what you're going to teach them.

Once you've decided on the goal of your lab, decide which of our tools best suits your needs. Consult our lab tools page to learn more about each tool.

Some basic tools and their use cases:

  • Try Cloud IDE for general purpose coding and web apps 🚀
  • Try JupyterLite for data science and machine learning with Python 🧠
  • Try Intructional Lab for writing basic tutorials 💡

Create your first Lab

Let's create a simple lab to get started. We'll be using the Cloud IDE tool to guide a learner to build a basic Hello World application with JavaScript.

Click Create Lab and select Cloud IDE as the tool. For the title, enter Hello World with JavaScript and for the description, enter Learn how to print "Hello World" in Javascript.

Once you have created your lab, you will be able to edit the instructions, test your lab, and easily insert it into your course.

Writing your instructions

Click Edit Instructions to start. This will open Author IDE in a new tab.

Author IDE is the editing environment you will be using to work on your lab. You can write rich markdown with easy-to-use features like pagination, 1 click code execution, version control and more.

When you first open your lab instructions, there will be some useful text already in the editor. It will walk you through Author IDE's features and help you get familiar with the environment.

For the purposes of this short guide, let's replace all the text in the editor with the below text.

::page{title="Welcome to the Hello World with JavaScript Lab"}

In this lab, we will be showing you how to use JavaScript to print "Hello World" to the console.

To get started, create a new file in your code editor called `helloWorld.js` and paste the following code into it:

```javascript
console.log("hello world!");
```

Now just open the terminal and run `node helloWorld.js` and you should see "hello world!" printed to the console!

You should see the preview updating on the right to reflect your changes. Now that we have some instructions, click Save to save your progress, and then Publish to finalize your changes.

That's it! We've created our first lab.

Testing your lab

Back on the course page, click Launch Lab to see your lab in action. This will open a new tab. Here, you can preview exactly how learners will experience your lab. Try following the instructions of our lab now!

Cloud IDE Screenshot

Awesome! We now have a lab that's ready to be added to our course.

- + \ No newline at end of file diff --git a/labs/edit-jupyterlab-instructions-computer/index.html b/labs/edit-jupyterlab-instructions-computer/index.html index 959c157..365a56c 100644 --- a/labs/edit-jupyterlab-instructions-computer/index.html +++ b/labs/edit-jupyterlab-instructions-computer/index.html @@ -5,13 +5,13 @@ Author Jupyter Notebooks on Your Machine | Author Workbench Knowledge Base - +

Author Jupyter Notebooks on Your Machine

Downloading Your Project Files

First, if you want to author your jupyter notebooks on your local machine, you need to clone the files.

To do this:

  1. First click advanced on your course or guided project:

GP or Course Click Advanced Screenshot

  1. Then click: Open GitLab Project:

Open Gitlab Project Screenshot

  1. And clone using HTTPS or SSH:

Gitlab Clone Options Screenshot

  1. And clone using git with your command line in your preferred directory:
git clone https://gitlab.com/ibm/skills-network/quicklabs/\<Your GP or Course Title\>

Editing using a local installation of JupyterLab:

Prerequisites

1. Install skillsnetwork-authoring-extension

On the Extension Marketplace of JupyterLab, search and install skillsnetwork-authoring-extension

Or, execute pip install skillsnetwork-authoring-extension on your terminal.

2. Restart JupyterLab

Restart JupyterLab on your computer by executing on your terminal: jupyter lab

3. Copy your Lab Token

On Author Workbench, copy the lab token located on the Edit Notebook window of your lab.

Copy Lab Token Screenshot

4. Edit Lab Instructions

Under the Skills Network tab on JupyterLab select Edit a lab. Then, paste the copied token and start editing your lab's instructions!

Skills Network Menu Screenshot

5. Publish

Once you are done, click Publish to publish your lab's instructions.

Publish Screenshot

Editing using SkillsNetwork JupyterLab Docker Image (advanced)

If you want to create your JupyterLab instructions using the same environment that SkillsNetwork labs will use, we recommend using the SkillsNetwork JupyterLab Docker Image.

Note: The SkillsNetwork JupyterLab Docker Image requires ~4.5 GB of download data. Once extracted, the image totals ~10GB.

Prerequisites

  • Docker is installed and running.

Pulling the SkillsNetwork JupyterLab Image:

docker pull skillsnetworkbot/jupyterlab-authoring:latest

Starting JupyterLab in Your Current Working Directory

docker run -p 8888:8888 -v "$(pwd)":/resources --platform linux/x86_64 skillsnetworkbot/jupyterlab-authoring:latest jupyter lab --ip 0.0.0.0 --ServerApp.password='' --ServerApp.token='' --port 8888 --no-browser --allow-root

You will then see a link "http://127.0.0.1:8888/lab" go to this link in your browser to edit your jupyter lab(s)!

Note: Don't use the "http://[RANDOM HASH]:8888/lab" url, since it won't work.

Adding sn_jupyterlab alias to rc file (optional, advanced)

It may be annoying to have to type out:

docker run -p 8888:8888 -v "$(pwd)":/resources --platform linux/x86_64 skillsnetworkbot/jupyterlab-authoring:latest jupyter lab --ip 0.0.0.0 --ServerApp.password='' --ServerApp.token='' --port 8888 --no-browser --allow-root

every time you want to run the SkillsNetwork JupyterLab image in your current working directory.

Alternatively, you can add an alias to your rc file, for example if using zsh, add the following to ~/.zshrc (if using bash then replace ~/.zshrc with ~/.bashrc in the following instructions):

alias sn_jupyterlab="docker run -p 8888:8888 -v \"\$(pwd)\":/resources --platform linux/x86_64 skillsnetworkbot/jupyterlab-authoring:latest jupyter lab --ip 0.0.0.0 --ServerApp.password='' --ServerApp.token='' --port 8888 --no-browser --allow-root"

Then run source ~/.zshrc to update

Now you can always run the SkillsNetwork JupyterLab image in your current working directory by typing sn_jupyterlab in your terminal.

- + \ No newline at end of file diff --git a/labs/free-apis/index.html b/labs/free-apis/index.html index a8c13d1..d6b452e 100644 --- a/labs/free-apis/index.html +++ b/labs/free-apis/index.html @@ -5,14 +5,14 @@ Free APIs Available in Skills Network Labs | Author Workbench Knowledge Base - +

Free APIs Available in Skills Network Labs

While taking labs within Skills Network Labs, your learners will have free access to some APIs. -This helps learners get started with the interesting stuff right away, without immediately worrying about registration.

Learner Quotas

Learner usage of Skills Network-provided APIs is subject to a quota. The quota is based on actual cost, so if you choose lower-cost APIs (e.g. lower cost models), then your learners will be less likely to hit their quota.

When a learner has reached their quota, they will receive an error message like this one:

RateLimitError: Error code: 429 - {'error': 'You have exceeded your usage quota for Skills Network-provided <api endpoint> for the day. Your quota will reset in 6 hours 32 minutes from now.'}

Limitations

These free Skills Network-provided APIs are available for learning and experimentation. They are not suitable when it comes to deploying an application.

Learners will have access to these APIs within their:

  • Cloud IDE (from their terminal/shell, or when running an application from within Cloud IDE)
  • JupyterLab IDE (from their notebook, or from the JupyterLab terminal/shell)
  • Rstudio IDE

Learners will not have free access to these APIs within their:

  • Code Engine projects
  • Kubernetes cluster namespaces
  • OpenShift cluster namespaces

Free APIs

watsonx.ai

IMPORTANT: You must use version 1.0.321 of ibm-watson-machine-learning

You can install it by running:

pip install ibm-watson-machine-learning==1.0.321
Usage

To use the free Skills Network-provided watsonx.ai project, you need to specify "token": "skills-network" (not to be confused with "apikey": "skills-network" ) and project_id = "skills-network". For example, you can modify the example from the official documentation for the ibm_watson_machine_learning library:

You can then use it like this:

from ibm_watson_machine_learning.foundation_models.utils.enums import ModelTypes
from ibm_watson_machine_learning.foundation_models import Model
import json

my_credentials = {
"url" : "https://us-south.ml.cloud.ibm.com",
"token" : "skills-network" # <--- NOTE: specify "skills-network" as your token (NOT as your apikey)
}


model_id = ModelTypes.FLAN_T5_XXL
gen_parms = None
project_id = "skills-network" # <--- NOTE: specify "skills-network" as your project_id
space_id = None
verify = False

model = Model( model_id, my_credentials, gen_parms, project_id, space_id, verify )

prompt_txt = "In today's sales meeting, we "
gen_parms_override = None

generated_response = model.generate( prompt_txt, gen_parms_override )

print( json.dumps( generated_response, indent=2 ) )

OpenAI

To use the free Skills Network-provided OpenAI APIs, no additional configuration is necessary. You can use the examples from the official documentation without modification.

For example:

from openai import OpenAI
client = OpenAI()

completion = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)

print(completion.choices[0].message)
- +This helps learners get started with the interesting stuff right away, without immediately worrying about registration.

Learner Quotas

Learner usage of Skills Network-provided APIs is subject to a quota. The quota is based on actual cost, so if you choose lower-cost APIs (e.g. lower cost models), then your learners will be less likely to hit their quota.

When a learner has reached their quota, they will receive an error message like this one:

RateLimitError: Error code: 429 - {'error': 'You have exceeded your usage quota for Skills Network-provided <api endpoint> for the day. Your quota will reset in 6 hours 32 minutes from now.'}

Limitations

These free Skills Network-provided APIs are available for learning and experimentation. They are not suitable when it comes to deploying an application.

Learners will have access to these APIs within their:

  • Cloud IDE (from their terminal/shell, or when running an application from within Cloud IDE)
  • JupyterLab IDE (from their notebook, or from the JupyterLab terminal/shell)
  • Rstudio IDE

Learners will not have free access to these APIs within their:

  • Code Engine projects
  • Kubernetes cluster namespaces
  • OpenShift cluster namespaces

Free APIs

watsonx.ai

Versioning

It is recommended that authors follow the instructions below using the default ibm-watson-machine-learning version installed with pip. However, after doing so, please pin the version you used for your learners. If you encounter an error with the latest package version and the following instructions, please let us know!

For example:

$ pip install ibm-watson-machine-learning
Collecting ibm-watson-machine-learning
Downloading ibm_watson_machine_learning-1.0.344-py3-none-any.whl.metadata (8.6 kB)
...

Your lab instructions would state:

pip install ibm-watson-machine-learning==1.0.344

Usage

To use the free Skills Network-provided watsonx.ai project, specify the "url" and project_id = "skills-network" (make sure to leave out "token" and "apikey"). For example, you can modify the example from the official documentation for the ibm_watson_machine_learning library as follows:

from ibm_watson_machine_learning.foundation_models.utils.enums import ModelTypes
from ibm_watson_machine_learning.foundation_models import Model
import json

my_credentials = {
"url" : "https://us-south.ml.cloud.ibm.com"
}


model_id = ModelTypes.FLAN_T5_XXL
gen_parms = None
project_id = "skills-network" # <--- NOTE: specify "skills-network" as your project_id
space_id = None
verify = False

model = Model( model_id, my_credentials, gen_parms, project_id, space_id, verify )

prompt_txt = "In today's sales meeting, we "
gen_parms_override = None

generated_response = model.generate( prompt_txt, gen_parms_override )

print( json.dumps( generated_response, indent=2 ) )

OpenAI

To use the free Skills Network-provided OpenAI APIs, no additional configuration is necessary. You can use the examples from the official documentation without modification.

For example:

from openai import OpenAI
client = OpenAI()

completion = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)

print(completion.choices[0].message)
+ \ No newline at end of file diff --git a/labs/jupyterlab/index.html b/labs/jupyterlab/index.html index 44f1848..d1d3d1d 100644 --- a/labs/jupyterlab/index.html +++ b/labs/jupyterlab/index.html @@ -5,13 +5,13 @@ JupyterLab | Author Workbench Knowledge Base - +

JupyterLab

Jupyterlab is a fully-featured python notebook environment.

We provide it to authors when JupyterLite has insufficient compatibility.

Should you use JupyterLab?

We recommend you only use JupyterLab for your labs when necessary. If possible, we recommend you use JupyterLite instead.

For more information on why JupyterLite is preferred over JupyterLab see JupyterLite vs JupyterLab.

JupyterLab Caveats

Issue Solution
The pyspark library fails with JVM error

Use findspark:

!pip install pyspark
!pip install findspark
import findspark
findspark.init()
from pyspark import SparkContext, SparkConf
from pyspark.sql import SparkSession
# Creating a spark context class
sc = SparkContext()

# Creating a spark session
spark = SparkSession \
.builder \
.appName("Python Spark DataFrames basic example") \
.config("spark.some.config.option", "some-value") \
.getOrCreate()

Should run with no errors.

- + \ No newline at end of file diff --git a/labs/jupyterlite-vs-jupyterlab/index.html b/labs/jupyterlite-vs-jupyterlab/index.html index dc1cd02..fe91679 100644 --- a/labs/jupyterlite-vs-jupyterlab/index.html +++ b/labs/jupyterlite-vs-jupyterlab/index.html @@ -5,13 +5,13 @@ JupyterLite vs JupyterLab | Author Workbench Knowledge Base - +

JupyterLite vs JupyterLab

This page explains the differences between JupyterLite and JupyterLab - and which environment would be right for you.

High Level

JupyterLiteJupyterLab
Fast Startup TimeSlow Startup Time
Responsive UILess Responsive UI
90% Libraries Compatible99% Libraries Compatible
Good Runtime PerformanceBest Runtime Performance

When should you use JupyterLite?

In general, we recommend authors use JupyterLite:

When should you use JupyterLab?

We recommend authors use JupyterLab:

  • Required libraries are incompatible with JupyterLite.
  • CPU-intensive cells take too long in JupyterLite.
- + \ No newline at end of file diff --git a/labs/jupyterlite/index.html b/labs/jupyterlite/index.html index c9c99e4..cff5ca6 100644 --- a/labs/jupyterlite/index.html +++ b/labs/jupyterlite/index.html @@ -5,14 +5,14 @@ JupyterLite | Author Workbench Knowledge Base - +

JupyterLite

JupyterLite is a responsive python notebook environment we provide for your learners' best experience.

Using JupyterLite

Installing Packages

Installing packages in JupyterLab is usually done with a package manager such as pip, conda or mamba like:

!pip install numpy pandas
!conda install -c conda-forge numpy pandas
!mamba install numpy pandas

In JupyterLite you simply use the %pip magic command:

%pip install numpy pandas

Downloading Data

You may be accustomed to loading data the following way:

import pandas as pd

URL = 'https://www.url.to/my/dataset.csv'

df = pd.read_csv(URL)

In JupyterLite, you must use the following method instead:

import pandas as pd
import skillsnetwork

URL = 'https://www.url.to/my/dataset.csv'

await skillsnetwork.download_dataset(URL)
df = pd.read_csv('dataset.csv')

Should you use JupyterLite?

For python-notebook labs, we recommend you use JupyterLite for your learners' best experience.

However, sometimes JupyterLite may not be an option for you - we lay out these cases in the next sections.

For more information on why JupyterLite is preferred over JupyterLab see JupyterLite vs JupyterLab.

Unsupported Libraries

The following libraries are currently unsupported in JupyterLite If your lab requires them, you should use JupyterLab instead:

  • pytorch
  • tensorflow
  • requests
  • wordcloud
  • pyspark
  • sqlite3

Additional Caveats

Even if your lab uses libraries supported by JupyterLite, there are specific scenarios where you may want to consider using JupyterLab:

  • Your lab has highly cpu-intensive code cells.
    • For example, sklearn.manifold.TSNE.fit_transform was found to be impractical in JupyterLite.
  • Large datasets (>100MB+) are being used.
    • Loading large datasets may be inconvenient for your learners on jupyterlite - they will load faster with JupyterLab.
- + \ No newline at end of file diff --git a/labs/misc/manim/index.html b/labs/misc/manim/index.html index d7a6d14..c25cb61 100644 --- a/labs/misc/manim/index.html +++ b/labs/misc/manim/index.html @@ -5,14 +5,14 @@ Manim for Animated Videos | Author Workbench Knowledge Base - +

Manim for Animated Videos

Manim is a Python library used to create high-precision math and computer science animated videos.

Manim can be difficult to install so this tutorial will teach you how to run it more simply using a Docker container.

Setup

  1. The first thing you're going to need is Docker. If you don't already have docker, you can download it here.

  2. Pull the docker image for manim:

    docker pull manimcommunity/manim

    For more information, check out mainimcommunity/manim

  3. There are several ways to interact with Manim. We're going to work with Jupyter Lab. For different methods check out this link.

  4. First, make sure nothing is running on port 8888, then open a terminal window and run the following command to start up the manim docker container:

    docker run -it -p 8888:8888 manimcommunity/manim jupyter lab --ip=0.0.0.0
  5. You should see the following output:

        file:///manim/.local/share/jupyter/runtime/jpserver-1-open.html

    Or copy and paste one of these URLs:

    http://1a7fb2e74b32:8888/lab?token=542f72b2a4f0f8eb58089e3ab795f43c1ad3730b0500af58

    or http://127.0.0.1:8888/lab?token=542f72b2a4f0f8eb58089e3ab795f43c1ad3730b0500af58

    Cut and Paste one of the above links in your browser. You should see the following:

  6. Congratulations! You're now ready to use manim!

Example

Let's start with a simple example:

  1. Open a new JupyterLab notebook and import all the contents of the manim library in a cell:

    from manim import *

    # To download image used in this example:
    !wget https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/assets/logos/SN_favicon.png
  2. Objects in manim are generally divided into three categories:

    • Scene

    • Mobject

    • Animation

    To create a scene, we create a Scene object as follows:

    class SN(Scene):

    def construct(self):
    sn_logo = ImageMobject("SN_favicon.png")
    text1 = Text("Skills" ).shift(DOWN).shift(DOWN).shift(DOWN)
    text2 = Text("Skills Network", t2c={'[0:6]': PURPLE}).shift(DOWN).shift(DOWN).shift(DOWN)

    self.add(sn_logo)
    self.play(Write(text1))
    self.play(ReplacementTransform(text1, text2))
    self.wait(2)
  3. To run the scene, execute the following in the next code cell:

    %manim SN

    More generally, %manim [name of class] - where [name of class] is the name of the scene class you defined.

  4. You should see a scene resembling the following:

    For more information, check out the Manim docs.

Saving your work

If you shut down your Docker Container you will lose your work. So you're going to need to download the video and JupyterLab. The lab is straightforward; let's see how to download the video:

  1. Go to the directory ./media/Jupiter/

  2. Download the video, which is the name of the class followed by an @ and the date:

    For example, SN@2022-05-02@02-43-50.mp4 more generally [name of class]@[date].mp4 as seen in the image below:

  3. Finally, when you close your application you must make sure the container is closed, open a terminal window and type:

    docker ps

    You should see a list of your running containers, for example:

    CONTAINER ID   IMAGE                  COMMAND                  CREATED      STATUS      PORTS                    NAMES

    1a7fb2e74b32 manimcommunity/manim "jupyter lab --ip=0.…" 3 days ago Up 3 days 0.0.0.0:8888->8888/tcp peaceful_kowalevski
  4. stop the container by typing docker stop [name of container] for this case it would be

    docker stop peaceful_kowalevski
- + \ No newline at end of file diff --git a/labs/network-egress/index.html b/labs/network-egress/index.html index 51e0c7a..2fbc70b 100644 --- a/labs/network-egress/index.html +++ b/labs/network-egress/index.html @@ -5,13 +5,13 @@ Skills Network Labs Egress Firewall | Author Workbench Knowledge Base - +

Skills Network Labs Egress Firewall

By default, learners are not allowed to access external resources from within Skills Network Labs.

This is an unfortunate necessity due to the potential for abuse.

To enable access to external resources for learners taking your lab, you will need to add an allowed destination to your course or guided project.

From your course or guided project page, select the "Advanced" tab and scroll down to "Add access to external resources". From here you can add a URL and justification for why this domain needs to be accessible.

After the domain is added, the destination should be accessible within 15 minutes.

- + \ No newline at end of file diff --git a/skills-network-file-library/how-to-access/index.html b/skills-network-file-library/how-to-access/index.html index 208083e..67757c5 100644 --- a/skills-network-file-library/how-to-access/index.html +++ b/skills-network-file-library/how-to-access/index.html @@ -5,13 +5,13 @@ How to Access Skills Network File Library | Author Workbench Knowledge Base - +

How to Access Skills Network File Library

Skills Network File Library can be accessed from multiple sources:

  • Directly from Author Workbench on the main page of your Guided Project:

  • Directly from Author Workbench on the main page of your Course:

  • Directly from Author IDE when editing your markdown-based instructions:

  • Directly from JupyterLab or JupyterLite when editing your notebooks:

- + \ No newline at end of file diff --git a/skills-network-file-library/how-to-use/index.html b/skills-network-file-library/how-to-use/index.html index 512f5f8..fcd9043 100644 --- a/skills-network-file-library/how-to-use/index.html +++ b/skills-network-file-library/how-to-use/index.html @@ -5,7 +5,7 @@ How to Use Skills Network File Library | Author Workbench Knowledge Base - + @@ -19,7 +19,7 @@ Copy image URL

  • Insert the image into a markdown cell in your notebook with the url from the previous step using the following format: ![<alternative_text>](<image_url>). Insert image into the editor

  • Done. Inserted Image

  • - + \ No newline at end of file diff --git a/skills-network-file-library/introduction/index.html b/skills-network-file-library/introduction/index.html index 4e6f036..2be4d75 100644 --- a/skills-network-file-library/introduction/index.html +++ b/skills-network-file-library/introduction/index.html @@ -5,13 +5,13 @@ Introduction | Author Workbench Knowledge Base - +
    - + \ No newline at end of file diff --git a/skills-network-file-library/layout/index.html b/skills-network-file-library/layout/index.html index 9b21a49..5808840 100644 --- a/skills-network-file-library/layout/index.html +++ b/skills-network-file-library/layout/index.html @@ -5,13 +5,13 @@ Skills Network File Library Layout | Author Workbench Knowledge Base - +

    Skills Network File Library Layout

    The layout of the Skills Network File Library interface can be broken down into five sections:

    File Library

    1. Mode section.
    2. Directory section.
    3. Main section.
    4. File Interaction section.
    5. Upload section.
    6. Public URL section.

    Mode section

    Currently, available modes are Images and Project files.

    • When Images is selected, you will only see the images in your course or project's file library. Selecting Project files will show all files.

    Directory section

    • At the top of the Directory section, you will see your current directory.
    • The files that are visible in the Main section are the ones located in the current directory.
    • Below the current directory, you will see a list of buttons representing child directories relative to the current directory.
    • You can go into the child directory by clicking on one of the child directories buttons and the UI will be updated accordingly.
    • If you want to create a new child directory relative to the current directory, click on the + button, type in the name of a new directory and click Create.
    • At the right top of the Directory section, you will see the Refresh button. Clicking this button will refresh the file library.

    Main section

    • Displays files located in the current directory.
    • If a file is an image, hovering over the image will expose a Preview button that, once clicked, will open up a modal to preview the actual image as opposed to its thumbnail.

    File Interaction section

    • Select Multiple radio button allows selecting multiple files inside the Main section when it is checked.
    • Delete:
      • Deletes all selected files from the library.
    • Move:
      • Opens up a modal to relocate all selected files from the current directory into a specified directory.
    • Rename:
      • Available only if one file is selected.
      • Opens up a modal to change the name of the selected file.

    Upload section

    • Allows authors to upload files from their local machines to the file library.
    • Only files with a size < 100MB can be uploaded to the file library.
    • When the Mode section is set to Images, the Upload sections will only accept files with .png, .jpeg, or .jpg extension for upload.
    • When the Mode section is set to Project files, the Upload sections will accept files of any type for upload.

    Public URL section

    • Displays a publically accessible URL of the selected file from the Main section and a button to copy the URL.
    • Does not display anything if more than one file is selected.
    - + \ No newline at end of file diff --git a/skills-network-file-library/things-to-keep-in-mind/index.html b/skills-network-file-library/things-to-keep-in-mind/index.html index 27f5321..d750c5b 100644 --- a/skills-network-file-library/things-to-keep-in-mind/index.html +++ b/skills-network-file-library/things-to-keep-in-mind/index.html @@ -5,13 +5,13 @@ Things to Keep in Mind | Author Workbench Knowledge Base - +

    Things to Keep in Mind

    • Renaming, deleting, or moving a file into a different folder changes or clears the public URL of that file. Make sure to update all instructions that use the public URL of the file after it has been renamed, deleted, or moved into a different folder.
    • We don't recommend uploading or storing images anywhere outside the /images directory or its subdirectories when using the Skills Network File Library.
    • For authors who use GitLab and rely on GitLab ci to upload files into the Asset Library, it's important to know that:
      • Skills Network File Library shares the same project path as the GitLab ci when it comes to uploading files to the Asset Library.
      • When a file is uploaded or modified in any way via Skills Network File Library, it's uploaded and kept track of on the default branch of the underlying GitLab project as well as the project's Asset Library. This means that any manual intervention to the Skills Network File Library files caused by direct commits to the underlying GitLab project may break things in the Skills Network File Library.
      • Any project files uploaded manually via GitLab will not be automatically picked up by the Skills Network File Library.
    - + \ No newline at end of file