1
0
forked from pms/ium

07. Sacred

This commit is contained in:
Tomasz Ziętkiewicz 2021-04-26 11:44:34 +02:00
parent 72e50d9fb6
commit f3864d18b4
7 changed files with 1485 additions and 0 deletions

1442
IUM_07.Sacred.ipynb Normal file

File diff suppressed because it is too large Load Diff

4
IUM_07/config.json Normal file
View File

@ -0,0 +1,4 @@
{
"recipient": "samotności",
"greeting": "Żegnaj"
}

19
IUM_07/file_observer.py Normal file
View File

@ -0,0 +1,19 @@
from sacred.observers import FileStorageObserver
from sacred import Experiment
ex = Experiment("file_observer")
ex.observers.append(FileStorageObserver('my_runs'))
@ex.config
def my_config():
recipient = "Świecie"
greeting = "Witaj"
@ex.capture
def prepare_message(recipient, greeting):
return "{0} {1}!".format(greeting, recipient)
@ex.automain
def my_main(recipient, greeting):
print(prepare_message()) ## Nie musimy przekazywać wartości

BIN
IUM_07/metrics.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
IUM_07/omniboard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

7
IUM_07/sacred_hello.py Normal file
View File

@ -0,0 +1,7 @@
from sacred import Experiment
ex = Experiment()
@ex.automain
def my_main():
print('Witaj świecie!')

13
IUM_07/sacred_scopes.py Normal file
View File

@ -0,0 +1,13 @@
from sacred import Experiment
ex = Experiment()
@ex.config
def my_config():
recipient = "Świecie"
greeting = "Witaj"
message = "{0} {1}!".format(greeting, recipient)
@ex.automain
def my_main(message):
print(message)