Skip to content

Commit

Permalink
rename things
Browse files Browse the repository at this point in the history
  • Loading branch information
vitchyr committed Apr 23, 2021
1 parent 759cae8 commit 4c0f02c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions doodad/wrappers/easy_launch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Easy-launch is a wrapper around doodad that makes it easier to launch experiment
Usage:

```python
from doodad.wrappers.easy_launch.python_function import sweep_function
from doodad.wrappers.easy_launch.core import sweep_function


def function(doodad_config, variant):
Expand Down Expand Up @@ -78,11 +78,12 @@ NON_CODE_DIRS_TO_MOUNT = [
),
]
LOCAL_LOG_DIR = '/home/user/logs'
DEFAULT_DOCKER = 'user/image'
```

After that, the settings are specific to the different mode you want to use
And example docker file is provided in [docker_example/Dockerfile](docker_example/Dockerfile).)

## BRC (sss and htp mode)
## BRC (sss and htp mode - deprecated)
_Disclaimer: this workflow is not polished, but it works. Hopefully we'll update this BRC workflow to be more similar to [this doodad version](https://github.com/rail-berkeley/doodad), but that's a work in progress._

Setting up doodad + BRC takes a bit of extra leg-work, because you can't launched code from outside BRC using a API. Instead, you need to log in to the BRC node and launch code from inside of it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def sweep_function(
name_runs_by_id=True,
add_time_to_run_id=True,
start_run_id=0,
docker_img=config.DEFAULT_DOCKER,
docker_image=config.DEFAULT_DOCKER,
):
"""
Usage:
Expand Down Expand Up @@ -82,7 +82,7 @@ def function(doodad_config, variant):
datestamp = time.strftime("%y-%m-%d")
log_path = '%s_%s' % (datestamp, log_path)
target = osp.join(REPO_DIR, 'doodad/wrappers/easy_launch/run_experiment.py')
sweeper, output_mount = _create_sweeper_and_output_mount(mode, log_path, docker_img)
sweeper, output_mount = create_sweeper_and_output_mount(mode, log_path, docker_image)
git_infos = metadata.generate_git_infos()

doodad_config = metadata.DoodadConfig(
Expand Down Expand Up @@ -192,7 +192,7 @@ def _run_method_here_no_doodad(
method_call(doodad_config, param)


def _create_mounts():
def create_mounts():
NON_CODE_MOUNTS = [
doodad.MountLocal(**non_code_mapping)
for non_code_mapping in config.NON_CODE_DIRS_TO_MOUNT
Expand All @@ -207,15 +207,15 @@ def _create_mounts():
return mounts


def _create_sweeper_and_output_mount(mode, log_path, docker_img):
mounts = _create_mounts()
def create_sweeper_and_output_mount(mode, log_path, docker_image):
mounts = create_mounts()
az_mount = doodad.MountAzure(
'',
mount_point='/output',
)
sweeper = DoodadSweeper(
mounts=mounts,
docker_img=docker_img,
docker_img=docker_image,
azure_subscription_id=config.AZ_SUB_ID,
azure_storage_connection_str=config.AZ_CONN_STR,
azure_client_id=config.AZ_CLIENT_ID,
Expand Down

0 comments on commit 4c0f02c

Please sign in to comment.