From 97a055fe82644f78011d28f5ec86e67e5286f2ef Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 26 Nov 2024 15:55:29 +0000 Subject: [PATCH] site deploy Auto-generated via `{sandpaper}` Source : d067f6ce15ba34f4b57282f3540937ae128b9425 Branch : md-outputs Author : GitHub Actions Time : 2024-11-26 15:55:10 +0000 Message : markdown source builds Auto-generated via `{sandpaper}` Source : b35f54e4a6e90f6d01af1185277d8fa80222008f Branch : main Author : Chris Endemann Time : 2024-11-26 15:54:28 +0000 Message : fix code formatting --- 2-model-eval-and-fairness.html | 10 +- 4-explainability-vs-interpretability.html | 4 +- 5a-explainable-AI-method-overview.html | 2 +- aio.html | 16 +-- index.html | 115 ++++++++++-------- instructor/0-introduction.html | 2 +- instructor/2-model-eval-and-fairness.html | 10 +- .../4-explainability-vs-interpretability.html | 4 +- .../5a-explainable-AI-method-overview.html | 2 +- instructor/aio.html | 18 +-- instructor/index.html | 115 ++++++++++-------- md5sum.txt | 2 +- pkgdown.yml | 2 +- 13 files changed, 170 insertions(+), 132 deletions(-) diff --git a/2-model-eval-and-fairness.html b/2-model-eval-and-fairness.html index 84ff86a3..81daffc1 100644 --- a/2-model-eval-and-fairness.html +++ b/2-model-eval-and-fairness.html @@ -544,7 +544,7 @@

What accuracy metric to use?

-
+
  1. It is best if all patients who need the screening get it, and there is little downside for doing screenings unnecessarily because the @@ -673,7 +673,7 @@

    Matching fairness terminology with definitions

    -
    +

    A - 3, B - 2, C - 4, D - 1

    @@ -754,7 +754,7 @@

    Red-teaming large language models

    -
    +

    Most publicly-available LLM providers set up guardrails to avoid propagating biases present in their training data. For instance, as of @@ -805,7 +805,7 @@

    Challenge

    -
    +

    While the picture is of Barack Obama, the upsampled image shows a white face. Unblurred version of the pixelated picture of Obama. Instead of showing Obama, it shows a white man.

    @@ -906,7 +906,7 @@

    Pros and cons of preprocessing options

    -
    +

    A downside of oversampling is that it may violate statistical assumptions about independence of samples. A downside of undersampling diff --git a/4-explainability-vs-interpretability.html b/4-explainability-vs-interpretability.html index 3f746a80..733a5664 100644 --- a/4-explainability-vs-interpretability.html +++ b/4-explainability-vs-interpretability.html @@ -666,7 +666,7 @@

    Decision-making criteria

    @@ -783,7 +783,7 @@

    Exercise 2: COVID-19 Diagnosis Using Chest -
    +
    1. Compare the Advantages: diff --git a/5a-explainable-AI-method-overview.html b/5a-explainable-AI-method-overview.html index 1523961a..595bc081 100644 --- a/5a-explainable-AI-method-overview.html +++ b/5a-explainable-AI-method-overview.html @@ -718,7 +718,7 @@

      Classifying explanation techniques

      -
      +
      diff --git a/aio.html b/aio.html index bff75122..bbd0e34e 100644 --- a/aio.html +++ b/aio.html @@ -1307,7 +1307,7 @@

      What accuracy metric to use?

      -
      +
      1. It is best if all patients who need the screening get it, and @@ -1450,7 +1450,7 @@

        Matching fairness terminology with definitions

        -
        +

        A - 3, B - 2, C - 4, D - 1

        @@ -1536,7 +1536,7 @@

        Red-teaming large language models

        -
        +

        Most publicly-available LLM providers set up guardrails to avoid propagating biases present in their training data. For instance, as of @@ -1588,7 +1588,7 @@

        Challenge

        -
        +

        While the picture is of Barack Obama, the upsampled image shows a white face. Unblurred version of the pixelated picture of Obama. Instead of showing Obama, it shows a white man.

        @@ -1693,7 +1693,7 @@

        Pros and cons of preprocessing options

        -
        +

        A downside of oversampling is that it may violate statistical assumptions about independence of samples. A downside of undersampling @@ -2752,7 +2752,7 @@

        Decision-making criteria

        @@ -2886,7 +2886,7 @@

        Exercise 2: COVID-19 Diagnosis Using Chest -
        +
        1. @@ -3260,7 +3260,7 @@

          Classifying explanation techniques

          -
          +

      Approach Post Hoc or Inherently Interpretable?
      diff --git a/index.html b/index.html index b634818e..7f5c4693 100644 --- a/index.html +++ b/index.html @@ -497,15 +497,22 @@

      4) Creating a new virtual environmen Desktop/trustworthy_ML. The code below will create a new virtual environment in a folder named `venv/`` in the current working directory.

      -
      cd Desktop/trustworthy_ML # if you're not already in this folder, CD to it (adjust path, if necesssary)
      -
      -# Run one of the below options (OS-specific)
      -python3 -m venv venv # mac/linux
      -python -m venv venv # windows
      -

      {: .language-bash}

      +
      +

      SH +

      +
      cd Desktop/trustworthy_ML # if you're not already in this folder, CD to it (adjust path, if necesssary)
      +
      +# Run one of the below options (OS-specific)
      +python3 -m venv venv # mac/linux
      +python -m venv venv # windows
      +

      If you run ls (list files), you should see a new -`venv/`` folder in your trustworthy_ML folder. ~~~ ls ~~~ {: -.language-bash}

      +`venv/`` folder in your trustworthy_ML folder.

      +
      +

      SH +

      +
      ls
      +

      If you’re on Linux and this doesn’t work, you may need to install venv first. Try running sudo apt-get install python3-venv @@ -516,17 +523,23 @@

      4) Creating a new virtual environmen

      5) Activating the environment

      To activate the environment, run the following OS-specific commands in Terminal (Mac/Linux) or Git Bash (Windows):

      -
      source venv/Scripts/activate # Windows + Git Bash
      -source venv/bin/activate # Mac/Linux
      -

      {: .language-bash}

      +
      +

      SH +

      +
      source venv/Scripts/activate # Windows + Git Bash
      +source venv/bin/activate # Mac/Linux
      +

      6) Installing your prerequisites

      Once the virtual environment is activated, install the prerequisites by running the following commands:

      First, make sure you have the latest version of pip by running:

      -
      python.exe -m pip install --upgrade pip
      -

      {: .language-bash}

      +
      +

      SH +

      +
      python.exe -m pip install --upgrade pip
      +

      Then, install the required libraries. We’ve chosen a CPU-only (no GPUs enabled) setup for this lesson to make the environment simpler and more accessible for everyone. By avoiding GPU-specific dependencies like @@ -536,12 +549,12 @@

      6) Installing your prerequisites -
      +

      SH

      -
      pip install torch torchvision torchaudio \
      -            jupyter scikit-learn pandas matplotlib keras tensorflow umap-learn \
      -            datasets grad-cam pytorch-ood transformers fairlearn "aif360[Reductions]" "aif360[inFairness]"
      +
      pip install torch torchvision torchaudio \
      +            jupyter scikit-learn pandas matplotlib keras tensorflow umap-learn \
      +            datasets grad-cam pytorch-ood transformers fairlearn "aif360[Reductions]" "aif360[inFairness]"
      @@ -549,11 +562,17 @@

      7) Adding your virtual en

      We want Jupyter Lab to have access to the enviornment we just built. To use this virtual environment in JupyterLab, follow these steps:

      1. Install the ipykernel package:
      2. -
      pip install ipykernel
      -

      {: .language-bash}

      +
      +

      SH +

      +
      pip install ipykernel
      +
      1. Add the virtual environment as a Jupyter kernel:
      2. -
      python -m ipykernel install --user --name=venv --display-name "trustworthy_ML"
      -

      {: .language-bash}

      +
      +

      SH +

      +
      python -m ipykernel install --user --name=venv --display-name "trustworthy_ML"
      +
      1. When you launch JupyterLab, select the trustworthy_ML kernel to ensure your code runs in the correct environment.

      @@ -561,43 +580,43 @@

      7) Adding your virtual en

      8) Verify the setup

      Change directory to your code folder before launching Jupyter. This will help us keep our code organized in one place.

      -
      +

      SH

      -
      cd Desktop/trustworthy_ML
      +
      cd Desktop/trustworthy_ML

      To start jupyter lab, open a terminal (Mac/Linux) or Git Bash (Windows) and type the command:

      -
      -

      BASH +
      +

      SH

      -
      jupyter lab
      +
      jupyter lab

      After launching, start a new notebook using the trustworthy_ML kernel to ensure your code runs in the correct environment. Then run the following lines of code:

      -
      +

      PYTHON

      -
      import torch
      -import pandas as pd
      -import sklearn
      -import jupyter
      -import tensorflow as tf
      -import transformers
      -import pytorch_ood
      -import fairlearn
      -import umap
      -
      -# Tested versions in this workshop:
      -print("Torch version:", torch.__version__)  # >= 2.5.1
      -print("Pandas version:", pd.__version__)  # >= 2.2.3
      -print("Scikit-learn version:", sklearn.__version__)  # >= 1.5.2
      -print("TensorFlow version:", tf.__version__)  # >= 2.18.0
      -print("Transformers version:", transformers.__version__)  # >= 4.46.3
      -print("PyTorch-OOD version:", pytorch_ood.__version__)  # >= 0.2.0
      -print("Fairlearn version:", fairlearn.__version__)  # >= 0.11.0
      -print("UMAP version:", umap.__version__)  # >= 0.5.7
      +
      import torch
      +import pandas as pd
      +import sklearn
      +import jupyter
      +import tensorflow as tf
      +import transformers
      +import pytorch_ood
      +import fairlearn
      +import umap
      +
      +# Tested versions in this workshop:
      +print("Torch version:", torch.__version__)  # >= 2.5.1
      +print("Pandas version:", pd.__version__)  # >= 2.2.3
      +print("Scikit-learn version:", sklearn.__version__)  # >= 1.5.2
      +print("TensorFlow version:", tf.__version__)  # >= 2.18.0
      +print("Transformers version:", transformers.__version__)  # >= 4.46.3
      +print("PyTorch-OOD version:", pytorch_ood.__version__)  # >= 0.2.0
      +print("Fairlearn version:", fairlearn.__version__)  # >= 0.11.0
      +print("UMAP version:", umap.__version__)  # >= 0.5.7

      This should output the versions of all required packages without giving errors. Most versions should work fine with this lesson, but @@ -621,10 +640,10 @@

      Deactivating/activating environment< environment, it’s best to explicitly deactivate it. This ensures that the software installed for this workshop doesn’t interfere with your default Python setup or other projects.

      -
      +

      SH

      -
      deactivate
      +
      deactivate

      diff --git a/instructor/0-introduction.html b/instructor/0-introduction.html index acc8f250..365f7470 100644 --- a/instructor/0-introduction.html +++ b/instructor/0-introduction.html @@ -643,7 +643,7 @@

      Generative AI risks

      Approach Post Hoc or Inherently Interpretable?

      cd Desktop/trustworthy_ML # if you're not already in this folder, CD to it (adjust path, if necesssary)
      +
      +# Run one of the below options (OS-specific)
      +python3 -m venv venv # mac/linux
      +python -m venv venv # windows
      +

      If you run ls (list files), you should see a new -`venv/`` folder in your trustworthy_ML folder. ~~~ ls ~~~ {: -.language-bash}

      +`venv/`` folder in your trustworthy_ML folder.

      +
      +

      SH +

      +
      ls
      +

      If you’re on Linux and this doesn’t work, you may need to install venv first. Try running sudo apt-get install python3-venv @@ -749,17 +756,23 @@

      4) Creating a new virtual environmen

      5) Activating the environment

      To activate the environment, run the following OS-specific commands in Terminal (Mac/Linux) or Git Bash (Windows):

      -
      source venv/Scripts/activate # Windows + Git Bash
      -source venv/bin/activate # Mac/Linux
      -

      {: .language-bash}

      +
      +

      SH +

      +
      source venv/Scripts/activate # Windows + Git Bash
      +source venv/bin/activate # Mac/Linux
      +

      6) Installing your prerequisites

      Once the virtual environment is activated, install the prerequisites by running the following commands:

      First, make sure you have the latest version of pip by running:

      -
      python.exe -m pip install --upgrade pip
      -

      {: .language-bash}

      +
      +

      SH +

      +
      python.exe -m pip install --upgrade pip
      +

      Then, install the required libraries. We’ve chosen a CPU-only (no GPUs enabled) setup for this lesson to make the environment simpler and more accessible for everyone. By avoiding GPU-specific dependencies like @@ -769,12 +782,12 @@

      6) Installing your prerequisites -
      +

      SH

      -
      pip install torch torchvision torchaudio \
      -            jupyter scikit-learn pandas matplotlib keras tensorflow umap-learn \
      -            datasets grad-cam pytorch-ood transformers fairlearn "aif360[Reductions]" "aif360[inFairness]"
      +
      pip install torch torchvision torchaudio \
      +            jupyter scikit-learn pandas matplotlib keras tensorflow umap-learn \
      +            datasets grad-cam pytorch-ood transformers fairlearn "aif360[Reductions]" "aif360[inFairness]"
      @@ -782,11 +795,17 @@

      7) Adding your virtual en

      We want Jupyter Lab to have access to the enviornment we just built. To use this virtual environment in JupyterLab, follow these steps:

      1. Install the ipykernel package:
      2. -
      pip install ipykernel
      -

      {: .language-bash}

      +
      +

      SH +

      +
      pip install ipykernel
      +
      1. Add the virtual environment as a Jupyter kernel:
      2. -
      python -m ipykernel install --user --name=venv --display-name "trustworthy_ML"
      -

      {: .language-bash}

      +
      +

      SH +

      +
      python -m ipykernel install --user --name=venv --display-name "trustworthy_ML"
      +
      1. When you launch JupyterLab, select the trustworthy_ML kernel to ensure your code runs in the correct environment.

      @@ -794,43 +813,43 @@

      7) Adding your virtual en

      8) Verify the setup

      Change directory to your code folder before launching Jupyter. This will help us keep our code organized in one place.

      -
      +

      SH

      -
      cd Desktop/trustworthy_ML
      +
      cd Desktop/trustworthy_ML

      To start jupyter lab, open a terminal (Mac/Linux) or Git Bash (Windows) and type the command:

      -
      -

      BASH +
      +

      SH

      -
      jupyter lab
      +
      jupyter lab

      After launching, start a new notebook using the trustworthy_ML kernel to ensure your code runs in the correct environment. Then run the following lines of code:

      -
      +

      PYTHON

      -
      import torch
      -import pandas as pd
      -import sklearn
      -import jupyter
      -import tensorflow as tf
      -import transformers
      -import pytorch_ood
      -import fairlearn
      -import umap
      -
      -# Tested versions in this workshop:
      -print("Torch version:", torch.__version__)  # >= 2.5.1
      -print("Pandas version:", pd.__version__)  # >= 2.2.3
      -print("Scikit-learn version:", sklearn.__version__)  # >= 1.5.2
      -print("TensorFlow version:", tf.__version__)  # >= 2.18.0
      -print("Transformers version:", transformers.__version__)  # >= 4.46.3
      -print("PyTorch-OOD version:", pytorch_ood.__version__)  # >= 0.2.0
      -print("Fairlearn version:", fairlearn.__version__)  # >= 0.11.0
      -print("UMAP version:", umap.__version__)  # >= 0.5.7
      +
      import torch
      +import pandas as pd
      +import sklearn
      +import jupyter
      +import tensorflow as tf
      +import transformers
      +import pytorch_ood
      +import fairlearn
      +import umap
      +
      +# Tested versions in this workshop:
      +print("Torch version:", torch.__version__)  # >= 2.5.1
      +print("Pandas version:", pd.__version__)  # >= 2.2.3
      +print("Scikit-learn version:", sklearn.__version__)  # >= 1.5.2
      +print("TensorFlow version:", tf.__version__)  # >= 2.18.0
      +print("Transformers version:", transformers.__version__)  # >= 4.46.3
      +print("PyTorch-OOD version:", pytorch_ood.__version__)  # >= 0.2.0
      +print("Fairlearn version:", fairlearn.__version__)  # >= 0.11.0
      +print("UMAP version:", umap.__version__)  # >= 0.5.7

      This should output the versions of all required packages without giving errors. Most versions should work fine with this lesson, but @@ -854,10 +873,10 @@

      Deactivating/activating environment< environment, it’s best to explicitly deactivate it. This ensures that the software installed for this workshop doesn’t interfere with your default Python setup or other projects.

      -
      +

      SH

      -
      deactivate
      +
      deactivate

      diff --git a/md5sum.txt b/md5sum.txt index 7134da8d..3f709757 100644 --- a/md5sum.txt +++ b/md5sum.txt @@ -22,5 +22,5 @@ "episodes/8-releasing-a-model.md" "c9d938b72bfe4810d5acb99cea19c5e9" "site/built/8-releasing-a-model.md" "2024-09-25" "instructors/instructor-notes.md" "cae72b6712578d74a49fea7513099f8c" "site/built/instructor-notes.md" "2024-06-19" "learners/reference.md" "1c7cc4e229304d9806a13f69ca1b8ba4" "site/built/reference.md" "2024-06-19" -"learners/setup.md" "837fbb998967d55df8b17c52df34a38a" "site/built/setup.md" "2024-11-26" +"learners/setup.md" "18a9d89c132c29fd042864b814829d9c" "site/built/setup.md" "2024-11-26" "profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2024-06-19" diff --git a/pkgdown.yml b/pkgdown.yml index 52009475..df402a69 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,4 +2,4 @@ pandoc: 3.1.11 pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-11-26T15:53Z +last_built: 2024-11-26T15:55Z