Skip to content

Commit

Permalink
remove outdated search code and update example config
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasSchaefer committed Jul 23, 2024
1 parent d813927 commit 76f8880
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion src/search.config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ grid-search:
grid-search-groups:
env0:
- "--env-config": "gymma"
- env_args.key: lbforaging:Foraging-8x8-2p-3f-v0
- env_args.key: lbforaging:Foraging-8x8-2p-3f-v3
- env_args.time_limit: 25
21 changes: 0 additions & 21 deletions src/search.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import multiprocessing
import subprocess
from pathlib import Path
from itertools import product
from collections import defaultdict
import re
import yaml
import random

Expand All @@ -20,13 +17,6 @@ def _flatten_lists(object):
yield item


def _filter_configs(configs, mask):
ingredient, mask = _get_ingredient_from_mask(mask)
regex = re.compile(mask)
configs[ingredient] = list(filter(regex.search, configs[ingredient]))
return configs


def _compute_combinations(config_file, shuffle, seeds):
config = yaml.load(config_file, Loader=yaml.FullLoader)
combinations = []
Expand Down Expand Up @@ -75,17 +65,6 @@ def cli():
pass


@cli.command()
@click.argument("output", type=click.Path(exists=False, dir_okay=False, writable=True))
def write(output):
from train import ex

config_dict = dict(ex.configurations[0]())
config_dict = {"grid-search": config_dict, "exclude": None}
with open(output, "w") as f:
documents = yaml.dump(config_dict, f)


@cli.group()
@click.option("--config", type=click.File(), default="config.yaml")
@click.option("--shuffle/--no-shuffle", default=True)
Expand Down

0 comments on commit 76f8880

Please sign in to comment.