forked from tzietkiewicz/aitech-ium
19 lines
463 B
Python
19 lines
463 B
Python
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 |