Skip to content

Commit

Permalink
Merge branch 'main' into testing_of_scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
SkafteNicki authored Jun 10, 2024
2 parents e6a4c28 + 338560a commit f33a178
Show file tree
Hide file tree
Showing 10 changed files with 386 additions and 24 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check docs

on:
pull_request:
branches: [main]

jobs:
check:
name: Check docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pip'
cache-dependency-path: setup.py

- name: Install dependencies
run: pip install -r requirements.txt

- name: Deploy docs
run: mkdocs build -d build --strict

- name: Upload docs
uses: actions/upload-artifact@v2
with:
name: docs
path: build
Binary file added figures/icons/locust.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/locust_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 16 additions & 15 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,28 @@ nav:
- M22 - Requests and APIs: s7_deployment/apis.md
- M23 - Local Deployment: s7_deployment/local_deployment.md
- M24 - Cloud Deployment: s7_deployment/cloud_deployment.md
- M25 - API Testing: s7_deployment/testing_apis.md
- S8 - Monitoring 📊:
- s8_monitoring/README.md
- M25 - Data Drifting: s8_monitoring/data_drifting.md
- M26 - System Monitoring: s8_monitoring/monitoring.md
- M26 - Data Drifting: s8_monitoring/data_drifting.md
- M27 - System Monitoring: s8_monitoring/monitoring.md
- S9 - Scalable applications ⚖️:
- s9_scalable_applications/README.md
- M27 - Distributed Data Loading: s9_scalable_applications/data_loading.md
- M28 - Distributed Training: s9_scalable_applications/distributed_training.md
- M29 - Scalable Inference: s9_scalable_applications/inference.md
- M28 - Distributed Data Loading: s9_scalable_applications/data_loading.md
- M29 - Distributed Training: s9_scalable_applications/distributed_training.md
- M30 - Scalable Inference: s9_scalable_applications/inference.md
- S10 - Extra 🔥:
- s10_extra/README.md
- M30 - Command Line Interfaces: s10_extra/cli.md
- M31 - Documentation: s10_extra/documentation.md
- M32 - Hyperparameter optimization: s10_extra/hyperparameters.md
- M33 - High Performance Clusters: s10_extra/high_performance_clusters.md
# - M34 - Designing Pipelines: s10_extra/design.md
# - M35 - Frontend: s10_extra/frontend.md
# - M36 - Sharing models - ONNX format: s10_extra/onnx.md
# - M37 - Workflow orchestration: s10_extra/orchestration.md
# - M38 - Kubernetes: s10_extra/kubernetes.md
# - M39 - Infrastructure as code: infrastructure_as_code.md
- M31 - Command Line Interfaces: s10_extra/cli.md
- M32 - Documentation: s10_extra/documentation.md
- M33 - Hyperparameter optimization: s10_extra/hyperparameters.md
- M34 - High Performance Clusters: s10_extra/high_performance_clusters.md
# - M35 - Designing Pipelines: s10_extra/design.md
# - M36 - Frontend: s10_extra/frontend.md
# - M37 - Sharing models - ONNX format: s10_extra/onnx.md
# - M38 - Workflow orchestration: s10_extra/orchestration.md
# - M39 - Kubernetes: s10_extra/kubernetes.md
# - M40 - Infrastructure as code: infrastructure_as_code.md
- Summary: overview.md
- Projects: projects.md
# - Challenges: challenges.md
Expand Down
8 changes: 4 additions & 4 deletions s10_extra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ Some of them may still be under construction and may in the future be moved into

Learn how to setup a simple command line interface for your application

[:octicons-arrow-right-24: M30: Command Line Interfaces](cli.md)
[:octicons-arrow-right-24: M31: Command Line Interfaces](cli.md)

- ![](../figures/icons/material.png){align=right : style="height:100px;width:100px"}

Learn how to setup a simple documentation system for your application

[:octicons-arrow-right-24: M31: Documentation](documentation.md)
[:octicons-arrow-right-24: M32: Documentation](documentation.md)

- ![](../figures/icons/optuna.png){align=right : style="height:100px;width:100px"}

Learn how to do hyperparameter optimization using Optuna

[:octicons-arrow-right-24: M32: Hyperparameter Optimization](hyperparameters.md)
[:octicons-arrow-right-24: M33: Hyperparameter Optimization](hyperparameters.md)

- ![](../figures/icons/pbs.png){align=right : style="height:100px;width:100px"}

Learn how to use HPC systems that use PBS to do job scheduling

[:octicons-arrow-right-24: M33: High Performance Clusters](high_performance_clusters.md)
[:octicons-arrow-right-24: M34: High Performance Clusters](high_performance_clusters.md)

</div>
6 changes: 6 additions & 0 deletions s7_deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@

[:octicons-arrow-right-24: M24: Cloud Deployment](cloud_deployment.md)

- ![](../figures/icons/locust.png){align=right : style="height:100px;width:100px"}

Learn how to test APIs for functionality and load

[:octicons-arrow-right-24: M25: API testing](testing_apis.md)

</div>

Let's say that you have spent 1000 GPU hours and trained the most awesome model that you want to share with the
Expand Down
20 changes: 20 additions & 0 deletions s7_deployment/exercise_files/locustfile_simple_fastapi_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import random

from locust import HttpUser, between, task


class MyUser(HttpUser):
"""A simple Locust user class that defines the tasks to be performed by the users."""

wait_time = between(1, 2)

@task
def get_root(self):
"""A task that simulates a user visiting the root URL of the FastAPI app."""
self.client.get("/")

@task(3)
def get_item(self):
"""A task that simulates a user visiting a random item URL of the FastAPI app."""
item_id = random.randint(1, 10)
self.client.get(f"/items/{item_id}")
Loading

0 comments on commit f33a178

Please sign in to comment.