Compare commits

...

15 Commits

Author SHA1 Message Date
Paweł Skórzewski a2e7fd33ba Drobne poprawki 2024-05-06 10:36:27 +02:00
Paweł Skórzewski 8a9cbb13ee Lab. 8. MLflow 2024-04-24 08:41:29 +02:00
Paweł Skórzewski 5d6ecc10dc Lab 8 - aktualizacja 2024-04-23 14:55:50 +02:00
Paweł Skórzewski c85669d700 Aktualizacja lab. 7 2024-04-17 08:00:40 +02:00
Paweł Skórzewski fa3867ce5a Aktualizacja daty (lab. 7) 2024-04-16 12:48:08 +02:00
Paweł Skórzewski 768add0ecc Lab 6 - fix 2024-04-10 08:10:35 +02:00
Paweł Skórzewski eb87f0f59f Lab 6 2024-04-10 08:09:27 +02:00
Paweł Skórzewski 2b970fbe9e Aktualizacja dat zadań (lab. 6) 2024-04-09 09:49:10 +02:00
Paweł Skórzewski a03d739fa4 Dodanie dat do materiałów 2024-04-09 09:46:32 +02:00
Paweł Skórzewski 4a30b40aa2 Lab 5 2024-04-02 14:22:23 +02:00
Paweł Skórzewski dbd04404f1 Lab 4 2024-03-27 08:15:55 +01:00
Paweł Skórzewski 12bc89369a 3. Jenkins 2024-03-20 15:10:05 +01:00
Paweł Skórzewski 7459afcb03 Aktualizacja drugiego linku 2024-03-13 12:29:36 +01:00
Paweł Skórzewski 5304c6deea Aktualizacja linku 2024-03-13 11:23:01 +01:00
Paweł Skórzewski 82f7f54c25 Przygotowanie do semestru 2024/SL 2024-03-11 13:30:45 +01:00
19 changed files with 4604 additions and 5369 deletions

View File

@ -8,14 +8,8 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 0. <i>Informacje organizacyjne</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2023)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"# Informacje organizacyjne "
]
},
{
@ -41,9 +35,10 @@
},
"source": [
"## Przedmiot\n",
"- Kod przedmiotu: 06-DIUMUI0\n",
"- Nazwa: Inżynieria Uczenia Maszynowego\n",
"- Sylabus: Sylabus-AITech-InzynieriaUczeniaMaszynowego.pdf"
"- *Kod przedmiotu*: 06-S4IN01-F01005\n",
"- *Nazwa*: Inżynieria Uczenia Maszynowego\n",
"- *Sylabus*: https://sylabus.amu.edu.pl/pl/document/8610785e-e63b-4a20-989c-cb8ed17f884b.pdf\n",
"- *Autorzy materiałów*: **Tomasz Ziętkiewicz**, Paweł Skórzewski"
]
},
{
@ -55,34 +50,10 @@
},
"source": [
"## Prowadzący\n",
"- imię i nazwisko:\tTomasz Ziętkiewicz\n",
"- stopień naukowy:\tmagister inżynier\n",
"- stanowisko:\tdoktorant\n",
"- [Zakład Sztucznej Inteligencji](https://ai.wmi.amu.edu.pl/pl/)\n",
"- CSI - Centrum Sztucznej Inteligencji, projekt Samsung\n",
"- email: tomasz.zietkiewicz@amu.edu.pl\n",
"<!-- - www: http://tz47965.home.amu.edu.pl/ -->\n",
"- https://git.wmi.amu.edu.pl/AITech/aitech-ium\n",
"- konsultacje: \n",
" - przez MS Teams po wcześniejszym umówieniu\n",
" - pokój B2-36, wtorki 12:00 - 13:00, po wcześniejszym umówieniu"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"### Prowadzący\n",
"### Zainteresowania naukowe\n",
"- Przetwarzanie języka naturalnego\n",
"- Rozpoznawanie mowy\n",
"- Postprocessing wyników rozpoznawania mowy\n",
"- Normalizacja tekstu\n",
"- Korekta błędów systemów rozpoznawania mowy"
"\n",
"### Paweł Skórzewski\n",
"\n",
"https://pms.web.amu.edu.pl"
]
},
{
@ -146,18 +117,6 @@
"| dostateczny (dst; 3,0) | >= 50% |\n",
"| niedostateczny (ndst; 2,0) | < 50% |\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Obecność\n",
"\n",
"Zgodnie z oficjalnymi zasadami obowiązującymi w projekcie AITech, dopuszczalna liczba nieobecności na zajęciach wynosi 3 (obowiązkowa obecność na 80% zajęć).\n",
"Powyżej 3 nieobecności przemiot nie może być zaliczony.\n",
"\n",
"Arkusz z obecnościami 2023: https://uam.sharepoint.com/:x:/s/2023SL06-DIUMUI0LABInynieriauczeniamaszynowego-Grupa11/EWdi4uIh2AVBmlYx-2j4cpgBEDUOWviU1QHUayM98EuuIw?e=fe4uxl"
]
}
],
"metadata": {

View File

@ -8,14 +8,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 1. <i>Wprowadzenie</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2023)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 13 marca 2024\n",
"# 1. Wprowadzenie"
]
},
{
@ -180,7 +175,7 @@
},
"source": [
"## 1.2.3 Narzędzia do kontroli eksperymentów\n",
" - Sacred </br><img style=\"height: 50px;\" src=\"img/environments/python.png\"/>\n",
" - [Sacred](https://sacred.readthedocs.io) </br><img style=\"height: 50px;\" src=\"img/environments/python.png\"/>\n",
" - DVC </br><img style=\"height: 50px;\" src=\"img/expcontrol/dvc-logo.png\"/>\n",
" - MLFlow </br><img style=\"height: 50px;\" src=\"img/expcontrol/mlflow-logo.png\"/>\n"
]

File diff suppressed because one or more lines are too long

View File

@ -8,14 +8,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 3. <i>System ciągłej integracji na przykładzie Jenkins</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2023)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 20 marca 2024\n",
"# 3. Systemy ciągłej integracji na przykładzie narzędzia Jenkins "
]
},
{
@ -277,7 +272,7 @@
" steps {\n",
" //Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!)\n",
" echo \"INPUT_TEXT: ${INPUT_TEXT}\"\n",
" //Wywołaj w konsoli komendę \"figlet\", która generuje ASCI-art\n",
" //Wywołaj w konsoli komendę \"figlet\", która generuje ASCII-art\n",
" sh \"figlet \\\"${INPUT_TEXT}\\\" | tee output.txt\"\n",
" }\n",
" }\n",
@ -468,18 +463,18 @@
" - możesz wygenerować potrzebny kod za pomocą generatorów w \"Pipeline Syntax\")\n",
" - dodaj paremetr typu \"Build selector for Copy artifact\", w którym będziesz mógł ustalić z którego builda zadania s123456-create-dataset chcesz skopiować artefakt. Wartość tego parametru będziesz musiał przekazać jako parametr `which build` -> \"Specified by a build parameter\"\n",
" - przykładowy kod copyArtifact:\n",
" ```groovy\n",
" copyArtifacts fingerprintArtifacts: true, projectName: 'MY_PROJECT', selector: buildParameter('BUILD_SELECTOR')\n",
" ```\n",
"\n",
" copyArtifacts fingerprintArtifacts: true, projectName: 'MY_PROJECT', selector: buildParameter('BUILD_SELECTOR')\n",
"\n",
" - przykładowy kod definicji parametru:\n",
" ```groovy\n",
" properties([parameters([\n",
" buildSelector(\n",
" defaultSelector: lastSuccessful(),\n",
" description: 'Which build to use for copying artifacts',\n",
" name: 'BUILD_SELECTOR')\n",
" ])])\n",
" ```\n",
"\n",
" properties([parameters([\n",
" buildSelector(\n",
" defaultSelector: lastSuccessful(),\n",
" description: 'Which build to use for copying artifacts',\n",
" name: 'BUILD_SELECTOR')\n",
" ])])\n",
"\n",
" 3. Wywoła skrypt shella (krok \"sh: Shell Script\"). \n",
" - Domyślnie tutaj znajdzie się wywołanie naszego skryptu liczącego statystyki.\n",
" - Ze względu na brakujące zależności, na razie wystarczy, że ten skrypt będzie \"liczył\" ilość linii w wejściowym pliku (polecenie \"wc -l\"). \n",

View File

@ -8,14 +8,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 4. <i>Konteneryzacja</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2022)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 27 marca 2024\n",
"# 4. Konteneryzacja"
]
},
{
@ -43,15 +38,11 @@
"## 1. Konteneryzacja\n",
"- Konteneryzacja to metoda tworzenia lekkich, odizolowanych środowisk uruchomieniowych\n",
"- Różnica między konteneryzacją a maszynami wirtualnymi:\n",
" - Wirtualizacja na poziomie systemu operacyjnego a nie sprzętu\n",
" - Konteneryzacja jest lżejsza: kontener używa tego samego jądra (kernel) co system hosta - mniejszy narzut\n",
" - Wirtualizacja na poziomie systemu operacyjnego, a nie sprzętu\n",
" - Konteneryzacja jest lżejsza: kontener używa tego samego jądra (*kernel*) co system hosta - mniejszy narzut\n",
" - Konteneryzacja zapewnia gorszy stopień izolacji od hosta\n",
" - Dzięki dostępnym narzędziom i infrastrukturze kontenery są łatwiejsze w utrzymywaniu i bardziej przenośne\n",
"- Ułatwiają:\n",
" - rozwój,\n",
" - uruchamianie\n",
" - i dostarczanie\n",
"aplikacji."
"- Kontenery ułatwiają rozwój, uruchamianie i dostarczanie aplikacji."
]
},
{
@ -80,10 +71,9 @@
"source": [
"## 1.1 Docker\n",
"- Najpopularniejszy obecnie system konteneryzacji\n",
"- Działa w m.in. na systemach Linux, Windows i Max OS\n",
"- Działa w m.in. na systemach Linux, Windows i Mac OS\n",
"- Udostępnia narzędzia i serwisy ułatwiające korzystanie, zarządzanie i dzielenie się kontenerami\n",
"- Docker umożliwia stworzenie paczki zawierającej sam program jak i środowisko, w którym ma być on uruchomiony\n",
" \n",
"- Dokumentacja: https://docs.docker.com/get-started/\n",
"</br><img style=\"height: 50px;\" src=\"img/environments/docker.png\"/>"
]
@ -113,10 +103,10 @@
},
"source": [
"## 1.2 Jak zacząć?\n",
" - Na komputerach w laboratoriach: https://laboratoria.wmi.amu.edu.pl/en/issues/docker/\n",
" - Na komputerach w laboratoriach: https://laboratoria.wmi.amu.edu.pl/problemy/docker\n",
" - Lokalnie: [instalacja](https://docs.docker.com/engine/install/)\n",
" - Możliwa zarówno pod Linux, Windows i MacOS.\n",
" - Kontenery Linuxowe można uruchamiać również pod Windowsem (za pomocą Docker Desktop lub WSL 2 (Windows Subsystem for Linux). Pod spodem oba używają maszyny wirtualnej (Hyper-V) z Linuxem, w której uruchamiane są kontenery [link](https://www.docker.com/blog/docker-hearts-wsl-2/)"
" - Kontenery linuxowe można uruchamiać również pod Windowsem - za pomocą Docker Desktop lub WSL 2 (Windows Subsystem for Linux). Pod spodem oba używają maszyny wirtualnej (Hyper-V) z Linuxem, w której uruchamiane są kontenery ([tak to działa w teorii](https://www.docker.com/blog/docker-hearts-wsl-2), a [tak to można uruchomić](https://dev.to/bowmanjd/install-docker-on-windows-wsl-without-docker-desktop-34m9))"
]
},
{
@ -131,7 +121,7 @@
"- ```docker help [polecenie]``` - wyświetla listę dostępnych poleceń dockera lub opis podanego polecenia. Rozbudowana dokumentacja poleceń: https://docs.docker.com/engine/reference/commandline/docker/\n",
"- ```docker run``` - uruchamia istniejący obraz tworząc kontener. Przykładowe wywołania:\n",
" - ```docker run -i -t ubuntu```<br>\n",
" Uruchamia kontener z obrazu \"ubuntu\", allokuje terminal (`-t`) i ustawia tryb \"interaktywny\" (`-i`), dzięki czemu dostajemy terminal \"wenątrz\" kontenera i możemy wywoływać w nim polecenia\n",
" Uruchamia kontener z obrazu \"ubuntu\", alokuje terminal (`-t`) i ustawia tryb \"interaktywny\" (`-i`), dzięki czemu dostajemy terminal \"wenątrz\" kontenera i możemy wywoływać w nim polecenia\n",
"\n",
" - ```docker run -p 8080:8080 jenkins/jenkins:lts```<br>\n",
" Uruchomi kontener z Jenkinsem, w wersji \"LTS\". Jeśli obraz Jenkins nie był wcześniej zbudowany/pobrany na lokalną maszynę, automatycznie zostanie pobrany z [Docker Hub](https://hub.docker.com/r/jenkins/jenkins).\n",
@ -165,7 +155,7 @@
"- ```docker start CONTAINER_ID``` - uruchamia ponownie kontener\n",
"- ```docker system df``` - pokazuje miejsce zajęte przez obrazy, kontenery i woluminy\n",
"- ```docker system prune``` - usuwa nieużywane obrazy i kontenery, zazwyczaj zwalniając sporo miejsca na dysku\n",
"- ```docker exec``` - "
"- ```docker exec``` - uruchamia polecenie wewnątrz działającego kontenera"
]
},
{
@ -181,7 +171,7 @@
" - Poprzez `docker exec` - wywołanie polecenia w działającym kontenerze\n",
" - Poprzez port zmapowany przez flagę `-p` (np. REST API albo interfejs w przegląrce)\n",
" - Przez system plików: \n",
" - bind mount: podmontowanie katalogów hosta w kontenerze poprzez flagę `-v` [dokumentacja](https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only)\n",
" - bind mount: podmontowanie katalogów hosta w kontenerze poprzez flagę `-v`; dokumentacja [tu](https://docs.docker.com/reference/cli/docker/container/run/#mount) i [tam](https://docs.docker.com/reference/cli/docker/container/run/#read-only)\n",
" - volumes: https://docs.docker.com/storage/volumes/"
]
},
@ -194,7 +184,7 @@
},
"source": [
"# Zadanie 1 [na zajęciach]\n",
"1. Zainstaluj Docker (lub skorzystaj z https://laboratoria.wmi.amu.edu.pl/en/issues/docker/)\n",
"1. Zainstaluj Docker (lub skorzystaj z https://laboratoria.wmi.amu.edu.pl/problemy/docker)\n",
"2. Uruchom obraz `ubuntu` w trybie interaktywnym z terminalem (`docker run -ti ubuntu`)\n",
"\n",
"Poniższe punkty wywołujemy wewnątrz kontenera (w otwartym właśnie terminalu):\n",
@ -204,7 +194,7 @@
"5. Jaki jest bieżący katalog? (polecenie `pwd`)\n",
"5. Jaki procesor jest widoczny w środku kontenera? Czy jest to procesor Twojej maszyny? (`lscpu`)\n",
"6. Ile wolnego miejsca na dysku jest widoczne wewnątrz kontenera (`df -h`)? Czy jest to zgodne z tym, co pokazuje maszyna hosta?\n",
"7. Sprawdź ile dostępnej pamięci RAM widać w konenerze (`free -h`). Czy zgadza się to z wynikiem na maszynie hosta?\n",
"7. Sprawdź, ile dostępnej pamięci RAM widać w konenerze (`free -h`). Czy zgadza się to z wynikiem na maszynie hosta?\n",
"8. Spróbuj uruchomić jedno z popularnych narzędzi Linuksowych, dostępnych na maszynie hosta (np. `vim`, `less`, `htop`). Czy udało się je uruchomić?\n",
"9. Zainstaluj w kontenerze jedno z brakujących narzędzi, np: `apt update; apt install htop`\n",
"10. Uruchom następujące polecenie: <br>\n",
@ -233,11 +223,10 @@
"## 1.4 Dockerfile\n",
"\n",
" - Dokumentacja: https://docs.docker.com/engine/reference/builder/\n",
"\n",
" - Dockerfile składa się z serii poleceń.\n",
" - Polecenia dockera są pisane WIELKIMI LITERAMI\n",
" - Wywołanie każdego polecenia tworzy nową warstwę (*layer*)\n",
" - Jeśli zbudowaliśmy obraz a potem zmieniliśmy jedno z poleceń / dodaliśmy nowe, to przebudowane zostaną tylko warstwy od zmienionej w dół (osczędność czasu i zasobów)"
" - Polecenia dockera są pisane WIELKIMI LITERAMI.\n",
" - Wywołanie każdego polecenia tworzy nową warstwę (*layer*).\n",
" - Jeśli zbudowaliśmy obraz, a potem zmieniliśmy jedno z poleceń lub dodaliśmy nowe, to przebudowane zostaną tylko warstwy od zmienionej w dół (oszczędność czasu i zasobów)."
]
},
{
@ -250,7 +239,7 @@
"source": [
"### Przykładowy Dockerfile:\n",
"```Dockerfile\n",
"# Nasz obraz będzie dzidziczył z obrazu Ubuntu w wersji latest\n",
"# Nasz obraz będzie dziedziczył z obrazu Ubuntu w wersji latest\n",
"FROM ubuntu:latest\n",
"\n",
"# Instalujemy niezbędne zależności. Zwróć uwagę na flagę \"-y\" (assume yes)\n",

View File

@ -8,14 +8,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 5. <i>Biblioteki Deep Learning</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2022)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 3 kwietnia 2024\n",
"# 5. Biblioteki do uczenia głębokiego"
]
},
{
@ -27,7 +22,7 @@
},
"source": [
"## Plan na dziś\n",
"Przegląd bibliotek DL:\n",
"Przegląd bibliotek DL (*deep learning*):\n",
"1. Tensorflow\n",
"2. Pytorch\n",
"3. Caffe \n",
@ -73,7 +68,7 @@
},
"source": [
"## 1. Tensorflow\n",
" - www.tensorflow.org\n",
" - [https://tensorflow.org](https://tensorflow.org)\n",
" - Open source\n",
" - Rozwijana przez google\n",
" - Bogaty \"ekosystem\"\n",
@ -128,7 +123,7 @@
" - Dynamiczny graf obliczeń\n",
" - Możliwość osadzenia na urządzeniach Android i iOS ([Torch mobile](https://pytorch.org/mobile/home/))\n",
" - Serwowanie modeli przez REST dzięki [TorchServe](https://pytorch.org/serve/)\n",
" - Przykład klasyfikacji IRIS w PyTorch: https://www.kaggle.com/aaditkapoor1201/iris-classification-pytorch"
" - Przykład klasyfikacji Iris w PyTorch: https://www.kaggle.com/aaditkapoor1201/iris-classification-pytorch"
]
},
{
@ -162,7 +157,7 @@
" - zmergowana do repozytorium PyTorch\n",
" - Open source\n",
" - Głównie zastosowania produkcyjne, w tym modele embedded (Caffe2go)\n",
" - PyTorch: łatwość ekspoerymentowania, research. Caffe2: wydajność, urządzenia mobilne\n",
" - PyTorch: łatwość eksperymentowania, research. Caffe2: wydajność, urządzenia mobilne\n",
" - ONNX jako format wymiany między Caffe2 i PyTorch"
]
},
@ -182,7 +177,7 @@
" - Napisana w Javie i C++\n",
" - Interfejsy: Java, Scala, Clojure, Kotlin\n",
" - Możliość importu modeli Keras\n",
" - Przykład klasyfikacji IRIS: https://deeplearning4j.konduit.ai/android/linear-classifier\n"
" - Przykład klasyfikacji Iris: https://deeplearning4j.konduit.ai/android/linear-classifier\n"
]
},
{
@ -215,7 +210,7 @@
" - Open source (licencja MIT)\n",
" - Napisana w C#, C++\n",
" - API: .NET, Python (bindingi poprzez [NimbusML](https://github.com/microsoft/NimbusML))\n",
" - Przykłady klasyfikacji IRIS:\n",
" - Przykłady klasyfikacji Iris:\n",
" - https://docs.microsoft.com/pl-pl/dotnet/machine-learning/tutorials/iris-clustering\n",
" - https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/MulticlassClassification_Iris\n",
" - Więcej przykładów: https://github.com/dotnet/machinelearning-samples\n",
@ -233,7 +228,7 @@
"## 8. MXNet\n",
" - https://mxnet.apache.org/\n",
" - Open source (Apache 2.0)\n",
" - Rozwijana przez [Apache Software Foundation](https://www.apache.org/)\n",
" - Był rozwijany przez [Apache Software Foundation](https://www.apache.org/)\n",
" - Backend napisany w C++\n",
" - Iterfejsy: Python (główny) i dodatkowo for Scala, Julia, Clojure, Java, C++, R i Perl\n",
" - Możliwość osadzenia na urządzeniach mobilnych dzięki [amalgamacji](https://mxnet.apache.org/versions/1.8.0/api/faq/smart_device)"
@ -256,9 +251,9 @@
"|PyTorch |Facebook |BSD |C++,Python |C,Python, Java | |\n",
"|Caffe |[BAIR](https://bair.berkeley.edu/)|BSD|C++|Python,Matlab| |\n",
"|Caffe2 |Facebook |BSD |C++ |C++,Python |Od 3 lat (2018) część PyTorch|\n",
"|CNTK |Microsoft |MIT |C++ |Python, C++, C# |od 01.2019 nierozwijana|\n",
"|CNTK |Microsoft |MIT |C++ |Python, C++, C# |nierozwijany od 01.2019|\n",
"|ML.NET |Microsoft |MIT |C++, C## |.NET, Python || \n",
"|MXNet |Apache Foundation|Apache 2.0|C++, Python|Python, Scala, Julia, Clojure, Java, C++, R i Perl||"
"|MXNet |Apache Foundation|Apache 2.0|C++, Python|Python, Scala, Julia, Clojure, Java, C++, R i Perl|nierozwijany od 05.2022|"
]
},
{
@ -294,10 +289,10 @@
"source": [
"## Zadanie [22 pkt.]\n",
"\n",
"Termin: 2023-05-12\n",
"Termin: 24 kwietnia 2024\n",
"\n",
"1. Wybierz jeden z frameworków ML (jeden z powyższych, ale może być też inny) i zaimplementuj w nim prostą sieć neuronową rozwiązującą wybrany problem (np regresji lub klasyfikacji) na wybranym na poprzednich zajęciach zbiorze. Możesz wzorować się (lub nawet skopiować) na jednym z tutotoriali do danego frameworka.\n",
" - wczytaj dane trenujące z pliku [2 pkt.]\n",
"1. Wybierz jeden z frameworków ML (jeden z powyższych, ale może być też inny) i zaimplementuj w nim prostą sieć neuronową rozwiązującą wybrany problem (np regresji lub klasyfikacji) na wybranym na poprzednich zajęciach zbiorze. Możesz wzorować się (lub nawet skopiować) na jednym z tutoriali do danego frameworka.\n",
" - wczytaj dane trenujące [2 pkt.]\n",
" - wytrenuj na nich model [6 pkt.]\n",
" - zapisz model do pliku [2 pkt.]\n",
" - w osobnym skypcie, przy pomocy zapisanego wcześniej modelu, dokonaj predykcji na danych ze zbioru testującego [8 pkt.]\n",

View File

@ -8,14 +8,9 @@
}
},
"source": [
"## ![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 6. <i>Jenkins, część 2.</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2022)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 10 kwietnia 2024\n",
"# Jenkins, część 2"
]
},
{
@ -41,9 +36,9 @@
},
"source": [
"## Multibranch pipeline\n",
" - Multibranch Pipeline to rodzaj projektu na Jenkinsie, który automatycznie obsługuje wiele gałęzi (branch) w repozytorium\n",
" - Multibranch Pipeline to rodzaj projektu na Jenkinsie, który automatycznie obsługuje wiele gałęzi (*branch*) w repozytorium\n",
" - W dominującym dziś sposobie utrzymywania i rozwoju kodu możemy wyróżnić:\n",
" - gałąź główną (master branch) - tutaj znajduje się aktualna, gotowa do wydania (opulbikowania/wdrożenia) wersja kodu\n",
" - gałąź główną (*master/main branch*) - tutaj znajduje się aktualna, gotowa do wydania (opulbikowania/wdrożenia) wersja kodu\n",
" - gałęzie typu develop/feature/release/hotfix itp. ([tutaj](https://kamiljozwiak.net/gitflow-czyli-jak-korzystac-z-gita-i-nie-zwariowac/) przystępne wyjaśnienie czym się różnią), na których rozwijamy nasz kod/wprowadzamy nowe funkcjonalności/przygotowujemy wersje gotowe do włączenia do gałęzi master, naprawiamy błędy.\n",
" - Gałęzi może być sporo i każdą z nich musimy przetestować, najlepiej automatycznie, przed zmergowaniem jej do gałęzi master\n",
" - Świetnie nadaje się do tego własnie Multibranch pipeline\n",
@ -184,7 +179,7 @@
}
},
"source": [
"## Zadanie 1 [5 pkt] (termin: 2023-05-12)\n",
"## Zadanie 1 [5 pkt] (termin: 15 maja 2024)\n",
"1. Stwórz na Jenkins projekt typu Multibranch pipeline o nazwie s123456-training\n",
" Projekt ten powinien przeprowadzać trenowanie modelu korzystając z kodu przygotowanego na poprzednich zajęciach. Trenowanie powinno odbywać się wewnątrz kontenera docker. [2 pkt]\n",
"2. Projekt powinien odpalać się automatycznie po zakończonym budowaniu projektu s123456-create-dataset i kopiować z niego zbiór danych [1 pkt]\n",
@ -201,20 +196,20 @@
}
},
"source": [
"## Zadanie 2 [15 pkt] (termin: 2023-05-12)\n",
"1. Stwórz na Jenkins projekt typu Multibranch pipeline o nazwie s123456-evaluation.eg\n",
" Projekt ten będzie przeprowadzał ewaluację modelu stworzonego w s123456-training na danych ze zbioru testującego [1 pkt]\n",
"## Zadanie 2 [15 pkt] (termin: 15 maja 2024)\n",
"1. Stwórz na Jenkins projekt typu Multibranch pipeline o nazwie *s123456-evaluation*. \n",
" Projekt ten będzie przeprowadzał ewaluację modelu stworzonego w *s123456-training* na danych ze zbioru testującego [1 pkt]\n",
"2. Ewaluacja polega na:\n",
" - skopiowanie modelu z artefaktu z projektu training\n",
" - wczytaniu tego modelu\n",
" - dokonaniu predykcji na zbiorze testowym za pomocą wczytanego modelu i zapisanie wyników tej predykcji do pliku\n",
" - wyliczeniu zbiorczych metryk (1-3 metryki) na zbiorze testującym (np. Accuracy, Micro-avg precission/recall, F1, RMSE - patrz [wykład 4. \"Metody ewaluacji\"])(https://git.wmi.amu.edu.pl/AITech/aitech-uma/src/branch/master/wyk/04_Metody_ewaluacji.ipynb) z przedmiotu Uczenie Maszynowe), \n",
" - zapisaniu metryk do pliku\n",
" - zarchiwizowaniu go\n",
" - skopiowanie modelu z artefaktu z projektu *training*\n",
" - wczytaniu tego modelu\n",
" - dokonaniu predykcji na zbiorze testowym za pomocą wczytanego modelu i zapisanie wyników tej predykcji do pliku\n",
" - wyliczeniu zbiorczych metryk (1-3 metryki) na zbiorze testującym (np. Accuracy, Micro-avg precission/recall, F1, RMSE - patrz [wykład 4. \"Metody ewaluacji\"])(https://git.wmi.amu.edu.pl/AITech/aitech-uma/src/branch/master/wyk/04_Metody_ewaluacji.ipynb) z przedmiotu Uczenie Maszynowe), \n",
" - zapisaniu metryk do pliku\n",
" - zarchiwizowaniu go\n",
" [6 pkt]\n",
"3. W celu śledzenia zmian wartości metryk, zapisuj wartości kumulatywnie w jednym pliku. Żeby to osiągnąć można: \n",
" - zapisywać metryki w ścieżce zewnątrznej w stosunku do Jenkinsa (w innym przypadku mogą zostać nadpisane np. podczas checkout repozytorium) - tej opcji nie wykorzystamy\n",
" - dopisywać metrykę do końca pliku skopiowanego z artefaktów poprzedniego builda (należy uczynić kopiowanie tego artefaktu opcjonalnym, żeby pierwszt build na danym branchu nie \"wywalił się\" przy próbie skopiowania artefaktów z nieistniejącego joba) [2 pkt]\n",
" - zapisywać metryki w ścieżce zewnątrznej w stosunku do Jenkinsa (w innym przypadku mogą zostać nadpisane np. podczas checkout repozytorium) - tej opcji nie wykorzystamy\n",
" - dopisywać metrykę do końca pliku skopiowanego z artefaktów poprzedniego builda (należy uczynić kopiowanie tego artefaktu opcjonalnym, żeby pierwszt build na danym branchu nie \"wywalił się\" przy próbie skopiowania artefaktów z nieistniejącego joba) [2 pkt]\n",
"4. Mając skumulowane wartości metryk z wszystkich dotychczasowych buildów, stwórz wykres: na osi X numer builda, na osi Y wartość metryk(i). [2 pkt]\n",
" Możesz w tym celu użyć:\n",
" - pluginu [plot](https://plugins.jenkins.io/plot)\n",

View File

@ -8,14 +8,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 7. <i>Sacred</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2023)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 17 kwietnia 2024\n",
"# 7. Sacred"
]
},
{
@ -115,7 +110,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -126,18 +121,36 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: sacred in /home/tomek/miniconda3/lib/python3.9/site-packages (0.8.4)\n",
"Requirement already satisfied: jsonpickle>=1.2 in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (3.0.1)\n",
"Requirement already satisfied: colorama>=0.4 in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (0.4.6)\n",
"Requirement already satisfied: GitPython in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (3.1.31)\n",
"Requirement already satisfied: py-cpuinfo>=4.0 in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (9.0.0)\n",
"Requirement already satisfied: wrapt<2.0,>=1.0 in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (1.15.0)\n",
"Requirement already satisfied: munch<3.0,>=2.5 in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (2.5.0)\n",
"Requirement already satisfied: docopt<1.0,>=0.3 in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (0.6.2)\n",
"Requirement already satisfied: packaging>=18.0 in /home/tomek/miniconda3/lib/python3.9/site-packages (from sacred) (23.0)\n",
"Requirement already satisfied: six in /home/tomek/miniconda3/lib/python3.9/site-packages (from munch<3.0,>=2.5->sacred) (1.16.0)\n",
"Requirement already satisfied: gitdb<5,>=4.0.1 in /home/tomek/miniconda3/lib/python3.9/site-packages (from GitPython->sacred) (4.0.10)\n",
"Requirement already satisfied: smmap<6,>=3.0.1 in /home/tomek/miniconda3/lib/python3.9/site-packages (from gitdb<5,>=4.0.1->GitPython->sacred) (5.0.0)\n"
"Collecting sacred\n",
" Downloading sacred-0.8.5-py2.py3-none-any.whl (107 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m107.9/107.9 KB\u001b[0m \u001b[31m2.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hCollecting jsonpickle>=2.2.0\n",
" Downloading jsonpickle-3.0.4-py3-none-any.whl (39 kB)\n",
"Collecting colorama>=0.4\n",
" Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)\n",
"Collecting munch<5.0,>=2.5\n",
" Downloading munch-4.0.0-py2.py3-none-any.whl (9.9 kB)\n",
"Requirement already satisfied: packaging>=18.0 in ./venv/lib/python3.10/site-packages (from sacred) (24.0)\n",
"Collecting wrapt<2.0,>=1.0\n",
" Downloading wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m80.3/80.3 KB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting docopt<1.0,>=0.3\n",
" Downloading docopt-0.6.2.tar.gz (25 kB)\n",
" Preparing metadata (setup.py) ... \u001b[?25ldone\n",
"\u001b[?25hCollecting GitPython\n",
" Downloading GitPython-3.1.43-py3-none-any.whl (207 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m207.3/207.3 KB\u001b[0m \u001b[31m9.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting py-cpuinfo>=4.0\n",
" Downloading py_cpuinfo-9.0.0-py3-none-any.whl (22 kB)\n",
"Collecting gitdb<5,>=4.0.1\n",
" Downloading gitdb-4.0.11-py3-none-any.whl (62 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.7/62.7 KB\u001b[0m \u001b[31m15.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting smmap<6,>=3.0.1\n",
" Downloading smmap-5.0.1-py3-none-any.whl (24 kB)\n",
"Using legacy 'setup.py install' for docopt, since package 'wheel' is not installed.\n",
"Installing collected packages: py-cpuinfo, docopt, wrapt, smmap, munch, jsonpickle, colorama, gitdb, GitPython, sacred\n",
" Running setup.py install for docopt ... \u001b[?25ldone\n",
"\u001b[?25hSuccessfully installed GitPython-3.1.43 colorama-0.4.6 docopt-0.6.2 gitdb-4.0.11 jsonpickle-3.0.4 munch-4.0.0 py-cpuinfo-9.0.0 sacred-0.8.5 smmap-5.0.1 wrapt-1.16.0\n"
]
}
],
@ -158,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 11,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -169,12 +182,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting sacred_hello.py\n"
"Overwriting IUM_07/sacred_hello.py\n"
]
}
],
"source": [
"%%writefile sacred_hello.py\n",
"%%writefile IUM_07/sacred_hello.py\n",
"from sacred import Experiment\n",
"\n",
"ex = Experiment()\n",
@ -186,7 +199,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 12,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -197,11 +210,11 @@
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING - sacred_hello - No observers have been added to this run\r\n",
"INFO - sacred_hello - Running command 'my_main'\r\n",
"INFO - sacred_hello - Started\r\n",
"Witaj świecie!\r\n",
"INFO - sacred_hello - Completed after 0:00:00\r\n"
"WARNING - sacred_hello - No observers have been added to this run\n",
"INFO - sacred_hello - Running command 'my_main'\n",
"INFO - sacred_hello - Started\n",
"Witaj świecie!\n",
"INFO - sacred_hello - Completed after 0:00:00\n"
]
}
],
@ -240,7 +253,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -251,73 +264,73 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Usage:\r\n",
" sacred_hello.py [(with UPDATE...)] [options]\r\n",
" sacred_hello.py help [COMMAND]\r\n",
" sacred_hello.py (-h | --help)\r\n",
" sacred_hello.py COMMAND [(with UPDATE...)] [options]\r\n",
"\r\n",
"\r\n",
"\r\n",
"Options:\r\n",
" -b VALUE --beat-interval=VALUE Set the heart-beat interval for this run. Time\r\n",
" between two heartbeat events is measured in\r\n",
" seconds.\r\n",
" -C VALUE --capture=VALUE Control the way stdout and stderr are captured.\r\n",
" The argument value must be one of [no, sys, fd]\r\n",
" -c VALUE --comment=VALUE Add a comment to this run.\r\n",
" -d --debug Set this run to debug mode. Suppress warnings\r\n",
" about missing observers and don't filter the\r\n",
" stacktrace. Also enables usage with ipython\r\n",
" `--pdb`.\r\n",
" -e --enforce_clean Fail if any version control repository is\r\n",
" dirty.\r\n",
" -F VALUE --file_storage=VALUE Add a file-storage observer to the experiment.\r\n",
" The value of the arguement should be the base-\r\n",
" directory to write the runs to\r\n",
" -f --force Disable warnings about suspicious changes for\r\n",
" this run.\r\n",
" -h --help Print this help message and exit.\r\n",
" -i VALUE --id=VALUE Set the id for this run.\r\n",
" -l VALUE --loglevel=VALUE Set the LogLevel. Loglevel either as 0 - 50 or\r\n",
" as string: DEBUG(10), INFO(20), WARNING(30),\r\n",
" ERROR(40), CRITICAL(50)\r\n",
" -m VALUE --mongo_db=VALUE Add a MongoDB Observer to the experiment. The\r\n",
" argument value is the database specification.\r\n",
" Should be in the form: `[host:port:]db_name[.c\r\n",
" ollection[:id]][!priority]`\r\n",
" -n VALUE --name=VALUE Set the name for this run.\r\n",
" -D --pdb Automatically enter post-mortem debugging with\r\n",
" pdb on failure.\r\n",
" -p --print-config Always print the configuration first.\r\n",
" -P VALUE --priority=VALUE Sets the priority for a queued up experiment.\r\n",
" `--priority=NUMBER` The number represent the\r\n",
" priority for this run.\r\n",
" -q --queue Only queue this run, do not start it.\r\n",
" -S VALUE --s3=VALUE Add a S3 File observer to the experiment. The\r\n",
" argument value should be\r\n",
" `s3://<bucket>/path/to/exp`.\r\n",
" -s VALUE --sql=VALUE Add a SQL Observer to the experiment. The\r\n",
" typical form is:\r\n",
" dialect://username:password@host:port/database\r\n",
" -t VALUE --tiny_db=VALUE Add a TinyDB Observer to the experiment. The\r\n",
" argument is the path to be given to the\r\n",
" TinyDbObserver.\r\n",
" -u --unobserved Ignore all observers for this run.\r\n",
"\r\n",
"\r\n",
"Arguments:\r\n",
" COMMAND Name of command to run (see below for list of commands)\r\n",
" UPDATE Configuration assignments of the form foo.bar=17\r\n",
"\r\n",
"\r\n",
"Commands:\r\n",
" print_config Print the updated configuration and exit.\r\n",
" print_dependencies Print the detected source-files and dependencies.\r\n",
" save_config Store the updated configuration in a file.\r\n",
" print_named_configs Print the available named configs and exit.\r\n",
" my_main \r\n",
"\r\n"
"Usage:\n",
" sacred_hello.py [(with UPDATE...)] [options]\n",
" sacred_hello.py help [COMMAND]\n",
" sacred_hello.py (-h | --help)\n",
" sacred_hello.py COMMAND [(with UPDATE...)] [options]\n",
"\n",
"\n",
"\n",
"Options:\n",
" -b VALUE --beat-interval=VALUE Set the heart-beat interval for this run. Time\n",
" between two heartbeat events is measured in\n",
" seconds.\n",
" -C VALUE --capture=VALUE Control the way stdout and stderr are captured.\n",
" The argument value must be one of [no, sys, fd]\n",
" -c VALUE --comment=VALUE Add a comment to this run.\n",
" -d --debug Set this run to debug mode. Suppress warnings\n",
" about missing observers and don't filter the\n",
" stacktrace. Also enables usage with ipython\n",
" `--pdb`.\n",
" -e --enforce_clean Fail if any version control repository is\n",
" dirty.\n",
" -F VALUE --file_storage=VALUE Add a file-storage observer to the experiment.\n",
" The value of the arguement should be the base-\n",
" directory to write the runs to\n",
" -f --force Disable warnings about suspicious changes for\n",
" this run.\n",
" -h --help Print this help message and exit.\n",
" -i VALUE --id=VALUE Set the id for this run.\n",
" -l VALUE --loglevel=VALUE Set the LogLevel. Loglevel either as 0 - 50 or\n",
" as string: DEBUG(10), INFO(20), WARNING(30),\n",
" ERROR(40), CRITICAL(50)\n",
" -m VALUE --mongo_db=VALUE Add a MongoDB Observer to the experiment. The\n",
" argument value is the database specification.\n",
" Should be in the form: `[host:port:]db_name[.c\n",
" ollection[:id]][!priority]`\n",
" -n VALUE --name=VALUE Set the name for this run.\n",
" -D --pdb Automatically enter post-mortem debugging with\n",
" pdb on failure.\n",
" -p --print-config Always print the configuration first.\n",
" -P VALUE --priority=VALUE Sets the priority for a queued up experiment.\n",
" `--priority=NUMBER` The number represent the\n",
" priority for this run.\n",
" -q --queue Only queue this run, do not start it.\n",
" -S VALUE --s3=VALUE Add a S3 File observer to the experiment. The\n",
" argument value should be\n",
" `s3://<bucket>/path/to/exp`.\n",
" -s VALUE --sql=VALUE Add a SQL Observer to the experiment. The\n",
" typical form is:\n",
" dialect://username:password@host:port/database\n",
" -t VALUE --tiny_db=VALUE Add a TinyDB Observer to the experiment. The\n",
" argument is the path to be given to the\n",
" TinyDbObserver.\n",
" -u --unobserved Ignore all observers for this run.\n",
"\n",
"\n",
"Arguments:\n",
" COMMAND Name of command to run (see below for list of commands)\n",
" UPDATE Configuration assignments of the form foo.bar=17\n",
"\n",
"\n",
"Commands:\n",
" print_config Print the updated configuration and exit.\n",
" print_dependencies Print the detected source-files and dependencies.\n",
" save_config Store the updated configuration in a file.\n",
" print_named_configs Print the available named configs and exit.\n",
" my_main \n",
"\n"
]
}
],
@ -357,7 +370,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -386,7 +399,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 6,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -413,10 +426,10 @@
{
"data": {
"text/plain": [
"<sacred.run.Run at 0x7f89cc3175b0>"
"<sacred.run.Run at 0x7ff6cf76d600>"
]
},
"execution_count": 9,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@ -438,7 +451,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 7,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -451,7 +464,7 @@
"{'recipient': 'Świecie', 'greeting': 'Witaj', 'message': 'Witaj Świecie!'}"
]
},
"execution_count": 10,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@ -474,15 +487,23 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting IUM_07/sacred_scopes.py\n"
]
}
],
"source": [
"# %load IUM_07/sacred_scopes.py\n",
"%%writefile IUM_07/sacred_scopes.py\n",
"from sacred import Experiment\n",
"\n",
"ex = Experiment()\n",
@ -511,11 +532,11 @@
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING - sacred_scopes - No observers have been added to this run\r\n",
"INFO - sacred_scopes - Running command 'my_main'\r\n",
"INFO - sacred_scopes - Started\r\n",
"Witaj Przygodo!\r\n",
"INFO - sacred_scopes - Completed after 0:00:00\r\n"
"WARNING - sacred_scopes - No observers have been added to this run\n",
"INFO - sacred_scopes - Running command 'my_main'\n",
"INFO - sacred_scopes - Started\n",
"Witaj Przygodo!\n",
"INFO - sacred_scopes - Completed after 0:00:00\n"
]
}
],
@ -536,14 +557,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"INFO - sacred_scopes - Running command 'print_config'\r\n",
"INFO - sacred_scopes - Started\r\n",
"Configuration (\u001b[34mmodified\u001b[0m, \u001b[32madded\u001b[0m, \u001b[31mtypechanged\u001b[0m, \u001b[2mdoc\u001b[0m):\r\n",
" greeting = 'Witaj'\r\n",
" message = 'Witaj Świecie!'\r\n",
" recipient = 'Świecie'\r\n",
" seed = 269258424 \u001b[2m# the random seed for this experiment\u001b[0m\r\n",
"INFO - sacred_scopes - Completed after 0:00:00\r\n"
"INFO - sacred_scopes - Running command 'print_config'\n",
"INFO - sacred_scopes - Started\n",
"Configuration (\u001b[34mmodified\u001b[0m, \u001b[32madded\u001b[0m, \u001b[31mtypechanged\u001b[0m, \u001b[2mdoc\u001b[0m):\n",
" greeting = 'Witaj'\n",
" message = 'Witaj Świecie!'\n",
" recipient = 'Świecie'\n",
" seed = 166269169 \u001b[2m# the random seed for this experiment\u001b[0m\n",
"INFO - sacred_scopes - Completed after 0:00:00\n"
]
}
],
@ -564,14 +585,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"INFO - sacred_scopes - Running command 'print_config'\r\n",
"INFO - sacred_scopes - Started\r\n",
"Configuration (\u001b[34mmodified\u001b[0m, \u001b[32madded\u001b[0m, \u001b[31mtypechanged\u001b[0m, \u001b[2mdoc\u001b[0m):\r\n",
" greeting = 'Witaj'\r\n",
" message = 'Witaj Przygodo!'\r\n",
"\u001b[34m recipient = 'Przygodo'\u001b[0m\r\n",
" seed = 667939214 \u001b[2m# the random seed for this experiment\u001b[0m\r\n",
"INFO - sacred_scopes - Completed after 0:00:00\r\n"
"INFO - sacred_scopes - Running command 'print_config'\n",
"INFO - sacred_scopes - Started\n",
"Configuration (\u001b[34mmodified\u001b[0m, \u001b[32madded\u001b[0m, \u001b[31mtypechanged\u001b[0m, \u001b[2mdoc\u001b[0m):\n",
" greeting = 'Witaj'\n",
" message = 'Witaj Przygodo!'\n",
"\u001b[34m recipient = 'Przygodo'\u001b[0m\n",
" seed = 496449715 \u001b[2m# the random seed for this experiment\u001b[0m\n",
"INFO - sacred_scopes - Completed after 0:00:00\n"
]
}
],
@ -592,13 +613,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 17,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"{'recipient': 'samotności', 'greeting': 'Żegnaj'}"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# %load IUM_07/config.json\n",
"{\n",
@ -609,7 +641,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 18,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -639,7 +671,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 19,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -670,7 +702,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 20,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -680,10 +712,10 @@
{
"data": {
"text/plain": [
"{'recipient': 'samotności', 'greeting': 'Żegnaj', 'seed': 877272352}"
"{'recipient': 'samotności', 'greeting': 'Żegnaj', 'seed': 557578089}"
]
},
"execution_count": 22,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
@ -705,7 +737,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 21,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -751,7 +783,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 22,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -779,10 +811,10 @@
{
"data": {
"text/plain": [
"<sacred.run.Run at 0x7f89a0db5550>"
"<sacred.run.Run at 0x7ff69f8c0610>"
]
},
"execution_count": 24,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
@ -832,19 +864,16 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"total 20\r\n",
"drwsrwsr-t 2 tomek tomek 4096 May 28 2022 1\r\n",
"drwsrwsr-t 2 tomek tomek 4096 May 28 2022 2\r\n",
"drwxr-sr-x 2 tomek tomek 4096 Apr 12 15:11 3\r\n",
"drwxr-sr-x 2 tomek tomek 4096 Apr 12 15:11 _resources\r\n",
"drwsrwsr-t 2 tomek tomek 4096 May 28 2022 _sources\r\n"
"total 8\n",
"drwxr-xr-x 2 pawel pawel 4096 Apr 17 07:51 1\n",
"drwxr-xr-x 2 pawel pawel 4096 Apr 17 07:51 _sources\n"
]
}
],
@ -887,13 +916,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 24,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting IUM_07/file_observer.py\n"
]
}
],
"source": [
"%%writefile IUM_07/file_observer.py\n",
"from sacred.observers import FileStorageObserver\n",
@ -919,7 +956,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 25,
"metadata": {
"slideshow": {
"slide_type": "fragment"
@ -930,10 +967,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"INFO - file_observer - Running command 'my_main'\r\n",
"INFO - file_observer - Started run with ID \"4\"\r\n",
"Witaj Świecie!\r\n",
"INFO - file_observer - Completed after 0:00:00\r\n"
"INFO - file_observer - Running command 'my_main'\n",
"INFO - file_observer - Started run with ID \"1\"\n",
"Witaj Świecie!\n",
"INFO - file_observer - Completed after 0:00:00\n"
]
}
],
@ -954,7 +991,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 28,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -965,13 +1002,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"total 24\r\n",
"drwsrwsr-t 2 tomek tomek 4096 May 28 2022 1\r\n",
"drwsrwsr-t 2 tomek tomek 4096 May 28 2022 2\r\n",
"drwxr-sr-x 2 tomek tomek 4096 Apr 12 15:11 3\r\n",
"drwxr-sr-x 2 tomek tomek 4096 Apr 20 12:09 4\r\n",
"drwxr-sr-x 2 tomek tomek 4096 Apr 12 15:11 _resources\r\n",
"drwsrwsr-t 2 tomek tomek 4096 May 28 2022 _sources\r\n"
"total 8\n",
"drwxr-xr-x 2 pawel pawel 4096 Apr 17 07:51 1\n",
"drwxr-xr-x 2 pawel pawel 4096 Apr 17 07:51 _sources\n"
]
}
],
@ -981,7 +1014,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 29,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -992,11 +1025,11 @@
"name": "stdout",
"output_type": "stream",
"text": [
"total 16\r\n",
"-rw-r--r-- 1 tomek tomek 77 May 28 2022 config.json\r\n",
"-rw-r--r-- 1 tomek tomek 159 May 28 2022 cout.txt\r\n",
"-rw-r--r-- 1 tomek tomek 2 May 28 2022 metrics.json\r\n",
"-rw-r--r-- 1 tomek tomek 1659 May 28 2022 run.json\r\n"
"total 16\n",
"-rw-r--r-- 1 pawel pawel 77 Apr 17 07:51 config.json\n",
"-rw-r--r-- 1 pawel pawel 159 Apr 17 07:51 cout.txt\n",
"-rw-r--r-- 1 pawel pawel 2 Apr 17 07:51 metrics.json\n",
"-rw-r--r-- 1 pawel pawel 1715 Apr 17 07:51 run.json\n"
]
}
],
@ -1006,13 +1039,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 30,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"{'greeting': 'Witaj', 'recipient': 'Świecie', 'seed': 805857632}"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# %load my_runs/1/config.json\n",
"{\n",
@ -1035,10 +1079,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"INFO - file_observer - Running command 'my_main'\r\n",
"INFO - file_observer - Started run with ID \"1\"\r\n",
"Witaj Świecie!\r\n",
"INFO - file_observer - Completed after 0:00:00\r\n"
"INFO - file_observer - Running command 'my_main'\n",
"INFO - file_observer - Started run with ID \"1\"\n",
"Witaj Świecie!\n",
"INFO - file_observer - Completed after 0:00:00\n"
]
}
],
@ -1141,8 +1185,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"total 4\r\n",
"-rw-r--r-- 1 tomek tomek 464 May 28 2022 file_observer_cd34a0ef4a32fb0a966eaa01ea6371ad.py\r\n"
"total 4\n",
"-rw-r--r-- 1 pawel pawel 464 Apr 17 07:51 file_observer_cd34a0ef4a32fb0a966eaa01ea6371ad.py\n"
]
}
],
@ -1153,13 +1197,27 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 33,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"outputs": [
{
"ename": "RuntimeError",
"evalue": "Defining an experiment in interactive mode! The sourcecode cannot be stored and the experiment won't be reproducible. If you still want to run it pass interactive=True",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[33], line 5\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msacred\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mobservers\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m FileStorageObserver\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msacred\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Experiment\n\u001b[0;32m----> 5\u001b[0m ex \u001b[38;5;241m=\u001b[39m \u001b[43mExperiment\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mfile_observer\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m ex\u001b[38;5;241m.\u001b[39mobservers\u001b[38;5;241m.\u001b[39mappend(FileStorageObserver(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mmy_runs\u001b[39m\u001b[38;5;124m'\u001b[39m))\n\u001b[1;32m 9\u001b[0m \u001b[38;5;129m@ex\u001b[39m\u001b[38;5;241m.\u001b[39mconfig\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mmy_config\u001b[39m():\n",
"File \u001b[0;32m~/ium/venv/lib/python3.10/site-packages/sacred/experiment.py:119\u001b[0m, in \u001b[0;36mExperiment.__init__\u001b[0;34m(self, name, ingredients, interactive, base_dir, additional_host_info, additional_cli_options, save_git_info)\u001b[0m\n\u001b[1;32m 117\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m name\u001b[38;5;241m.\u001b[39mendswith(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m.pyc\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m 118\u001b[0m name \u001b[38;5;241m=\u001b[39m name[:\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m4\u001b[39m]\n\u001b[0;32m--> 119\u001b[0m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[38;5;21;43m__init__\u001b[39;49m\u001b[43m(\u001b[49m\n\u001b[1;32m 120\u001b[0m \u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 121\u001b[0m \u001b[43m \u001b[49m\u001b[43mingredients\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mingredients\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 122\u001b[0m \u001b[43m \u001b[49m\u001b[43minteractive\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minteractive\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 123\u001b[0m \u001b[43m \u001b[49m\u001b[43mbase_dir\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mbase_dir\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 124\u001b[0m \u001b[43m \u001b[49m\u001b[43m_caller_globals\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcaller_globals\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 125\u001b[0m \u001b[43m \u001b[49m\u001b[43msave_git_info\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msave_git_info\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 126\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 127\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdefault_command \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 128\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcommand(print_config, unobserved\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n",
"File \u001b[0;32m~/ium/venv/lib/python3.10/site-packages/sacred/ingredient.py:79\u001b[0m, in \u001b[0;36mIngredient.__init__\u001b[0;34m(self, path, ingredients, interactive, _caller_globals, base_dir, save_git_info)\u001b[0m\n\u001b[1;32m 71\u001b[0m (\n\u001b[1;32m 72\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmainfile,\n\u001b[1;32m 73\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msources,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 76\u001b[0m _caller_globals, save_git_info, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbase_dir\n\u001b[1;32m 77\u001b[0m )\n\u001b[1;32m 78\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmainfile \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m interactive:\n\u001b[0;32m---> 79\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\n\u001b[1;32m 80\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDefining an experiment in interactive mode! \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 81\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe sourcecode cannot be stored and the \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 82\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mexperiment won\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt be reproducible. If you still\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 83\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m want to run it pass interactive=True\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 84\u001b[0m )\n",
"\u001b[0;31mRuntimeError\u001b[0m: Defining an experiment in interactive mode! The sourcecode cannot be stored and the experiment won't be reproducible. If you still want to run it pass interactive=True"
]
}
],
"source": [
"# %load my_runs/_sources/file_observer_cd34a0ef4a32fb0a966eaa01ea6371ad.py\n",
"from sacred.observers import FileStorageObserver\n",
@ -1196,7 +1254,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 37,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -1208,7 +1266,7 @@
"output_type": "stream",
"text": [
"INFO - file_observer - Running command 'my_main'\n",
"INFO - file_observer - Started run with ID \"5\"\n",
"INFO - file_observer - Started run with ID \"3\"\n",
"INFO - file_observer - Completed after 0:00:00\n"
]
},
@ -1251,7 +1309,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 40,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -1262,14 +1320,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{\r\n",
" \"prepare_message_ts\": \"2023-04-20 12:10:28.197315\"\r\n",
"{\n",
" \"prepare_message_ts\": \"2024-04-17 07:53:12.105121\"\n",
"}"
]
}
],
"source": [
"cat my_runs/5/info.json"
"cat my_runs/3/info.json"
]
},
{
@ -1407,7 +1465,7 @@
},
{
"cell_type": "code",
"execution_count": 42,
"execution_count": 41,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -1418,8 +1476,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: pymongo in /home/tomek/miniconda3/lib/python3.9/site-packages (4.3.3)\r\n",
"Requirement already satisfied: dnspython<3.0.0,>=1.16.0 in /home/tomek/miniconda3/lib/python3.9/site-packages (from pymongo) (2.3.0)\r\n"
"Collecting pymongo\n",
" Downloading pymongo-4.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (676 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m676.9/676.9 KB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
"\u001b[?25hCollecting dnspython<3.0.0,>=1.16.0\n",
" Downloading dnspython-2.6.1-py3-none-any.whl (307 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 KB\u001b[0m \u001b[31m1.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[?25hInstalling collected packages: dnspython, pymongo\n",
"Successfully installed dnspython-2.6.1 pymongo-4.6.3\n"
]
}
],
@ -1429,7 +1493,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 44,
"metadata": {
"slideshow": {
"slide_type": "slide"
@ -1440,9 +1504,33 @@
"name": "stderr",
"output_type": "stream",
"text": [
"INFO - sacred_scopes - Running command 'my_main'\n",
"ERROR - sacred_scopes - Failed after 0:00:30!\n"
"INFO - sacred_scopes - Running command 'my_main'\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO - sacred_scopes - Started run with ID \"641\"\n",
"INFO - sacred_scopes - Completed after 0:00:00\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Witaj Świecie!\n"
]
},
{
"data": {
"text/plain": [
"<sacred.run.Run at 0x7ff69f7a74f0>"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
@ -1450,9 +1538,9 @@
"from sacred import Experiment\n",
"\n",
"ex = Experiment(\"sacred_scopes\", interactive=True)\n",
"ex.observers.append(MongoObserver(url='mongodb://admin:IUM_2021@172.17.0.1:27017',\n",
"ex.observers.append(MongoObserver(url='mongodb://admin:IUM_2021@tzietkiewicz.vm.wmi.amu.edu.pl:27017',\n",
" db_name='sacred')) # Tutaj podajemy dane uwierzytelniające i nazwę bazy skonfigurowane w pliku .env podczas uruchamiania bazy.\n",
"# W przypadku instancji na Jenkinsie url będzie wyglądał następująco: mongodb://admin:IUM_2021@172.17.0.1:27017\n",
"# W przypadku instancji na Jenkinsie url będzie wyglądał następująco: mongodb://admin:IUM_2021@tzietkiewicz.vm.wmi.amu.edu.pl:27017\n",
"@ex.config\n",
"def my_config():\n",
" recipient = \"Świecie\"\n",
@ -1500,13 +1588,46 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 45,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO - sacred_scopes - Running command 'my_main'\n",
"INFO - sacred_scopes - Started run with ID \"642\"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Witaj Świecie!\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO - sacred_scopes - Completed after 0:00:39\n"
]
},
{
"data": {
"text/plain": [
"<sacred.run.Run at 0x7ff6c726dcf0>"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sacred.observers import MongoObserver\n",
"from sacred import Experiment\n",
@ -1514,9 +1635,9 @@
"import time\n",
"\n",
"ex = Experiment(\"sacred_scopes\", interactive=True)\n",
"ex.observers.append(MongoObserver(url='mongodb://admin:IUM_2021@172.17.0.1:27017',\n",
"ex.observers.append(MongoObserver(url='mongodb://admin:IUM_2021@tzietkiewicz.vm.wmi.amu.edu.pl:27017',\n",
" db_name='sacred')) # Tutaj podajemy dane uwierzytelniające i nazwę bazy skonfigurowane w pliku .env podczas uruchamiania bazy.\n",
"# W przypadku instancji na Jenkinsie url będzie wyglądał następująco: mongodb://admin:IUM_2021@172.17.0.1:27017\n",
"# W przypadku instancji na Jenkinsie url będzie wyglądał następująco: mongodb://admin:IUM_2021@tzietkiewicz.vm.wmi.amu.edu.pl:27017\n",
"@ex.config\n",
"def my_config():\n",
" recipient = \"Świecie\"\n",
@ -1567,7 +1688,7 @@
}
},
"source": [
"## Zadanie [15 pkt] (do 2023-06-?)\n",
"## Zadanie [15 pkt] (do 2024-06-12)\n",
"1. \"Owiń\" wywołanie swojego eksperymentu za pomocą Sacred, w ten sposób, żeby zapisane zostały [10pkt]:\n",
" - parametry, z którymi wywołany był trening\n",
" - powstały plik z modelem (jako artefakt)\n",
@ -1578,7 +1699,7 @@
"Jako nazwę eksperymentu użyj swojego numeru indeksu tak, żebyś mogła/mógł je odnaleźć w Omniboard\n",
"\n",
"2. Wykorzystaj 2 obserwatory [5pkt]: \n",
" - MongoObserver, skorzytaj nastęþującego URL: `mongodb://admin:IUM_2021@172.17.0.1:27017` (będziesz mógł przeglądać wyniki na http://tzietkiewicz.vm.wmi.amu.edu.pl:9000/sacred)\n",
" - MongoObserver, skorzytaj nastęþującego URL: `mongodb://admin:IUM_2021@tzietkiewicz.vm.wmi.amu.edu.pl:27017` (będziesz mógł przeglądać wyniki na http://tzietkiewicz.vm.wmi.amu.edu.pl:9000/sacred)\n",
" - FileObserver - zapisane pliki zarchiwizuj na Jenkinsie jako jego artefakty\n"
]
}
@ -1603,7 +1724,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.12"
},
"slideshow": {
"slide_type": "slide"

View File

@ -10,4 +10,4 @@ def my_config():
@ex.automain
def my_main(message):
print(message)
print(message)

File diff suppressed because it is too large Load Diff

View File

@ -9,14 +9,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 9. <i>Środowiska wirtualne</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2022)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 15 maja 2024\n",
"# 9. Środowiska wirtualne"
]
},
{

View File

@ -9,14 +9,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 10. <i>DVC</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2023)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 22 maja 2024\n",
"# 10. DVC"
]
},
{

View File

@ -9,14 +9,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 11. <i>Github actions</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2023)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 29 maja 2024\n",
"# 11. GitHub Actions"
]
},
{

View File

@ -5,14 +5,9 @@
"id": "805668ca",
"metadata": {},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 12. <i>Przegląd rynku pracy</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2021)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 5 czerwca 2024\n",
"# 12. Przegląd rynku pracy"
]
},
{

View File

@ -9,14 +9,9 @@
}
},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Inżynieria uczenia maszynowego </h1>\n",
"<h2> 12. <i>Przygotowanie publikacji naukowej</i> [laboratoria]</h2> \n",
"<h3> Tomasz Ziętkiewicz (2021)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
"## Inżynieria uczenia maszynowego\n",
"### 5 czerwca 2024\n",
"# 13. Przygotowanie publikacji naukowej"
]
},
{

View File

@ -2,15 +2,19 @@
"cells": [
{
"cell_type": "markdown",
"id": "3c047009",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"id": "afe2a257",
"metadata": {},
"source": [
"## Inżynieria uczenia maszynowego\n",
"### 12 czerwca 2024\n",
"# 14. Kubernetes"
]
},
{
"cell_type": "markdown",
"id": "31ca02ad",
"metadata": {},
"source": [
"# Kubernetes\n",
"\n",
"<img style=\"height: 150px;\" src=\"img/kubernetes_logo.png\"/>"
]
},

View File

@ -5,7 +5,9 @@
"id": "f7b2b9cc",
"metadata": {},
"source": [
"# Google Cloud Vertex AI"
"## Inżynieria uczenia maszynowego\n",
"### 19 czerwca 2024\n",
"# 15. Google Cloud Vertex AI"
]
},
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
img/ci/github-actions.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB