diff --git a/examples/tutorial/example_config.yaml b/examples/tutorial/example_config.yaml deleted file mode 100644 index 1d6b5655..00000000 --- a/examples/tutorial/example_config.yaml +++ /dev/null @@ -1,33 +0,0 @@ -seml: - executable: examples/tutorial/example_experiment.py - name: example_experiment - output_dir: examples/logs - project_root_dir: ../.. - -slurm: - experiments_per_job: 1 - sbatch_options: - gres: gpu:1 # num GPUs - mem: 16G # memory - cpus-per-task: 2 # num cores - time: 0-08:00 # max time, D-HH:MM - -fixed: - max_epochs: 500 - -grid: - learning_rate: - type: choice - options: - - 1 - - 2 - - 3 - -small_datasets: - fixed: - hidden_sizes: [32, 16] # this will be parsed into a Python list. - -large_datasets: - - fixed: - hidden_sizes: [128, 64, 32] diff --git a/examples/tutorial/example_experiment.py b/examples/tutorial/example_experiment.py deleted file mode 100644 index 3e8359f9..00000000 --- a/examples/tutorial/example_experiment.py +++ /dev/null @@ -1,39 +0,0 @@ -import logging -import time - -import numpy as np -import seml -from sacred import Experiment - -ex = Experiment() -seml.setup_logger(ex) - - -@ex.config -def config(): - overwrite = None - db_collection = None - if db_collection is not None: - ex.observers.append( - seml.create_mongodb_observer(db_collection, overwrite=overwrite) - ) - - -@ex.automain -def run(hidden_sizes: list, learning_rate: float, max_epochs: int): - # Note that regularization_params contains the corresponding sub-dictionary from the configuration. - logging.info("Received the following configuration:") - logging.info( - f"Hidden sizes: {hidden_sizes}, learning_rate: {learning_rate}, " - f"max_epochs: {max_epochs}" - ) - # res = hidden_sizes / 2 - # do your processing here - time.sleep(60) - results = { - "test_acc": learning_rate * np.sqrt(np.arange(1, 1001, 1)) - + np.random.uniform(0, 5), - # ... - } - # the returned result will be written into the database - return results