Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting local paths 4 #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ENV ENVIRONMENT_GCP "DESKTOP"
ENV WANDB_PROJECT "PROJECT"
RUN apt-get install -y wget
RUN wget -O "run_flow.py" "https://raw.githubusercontent.com/AIStream-Peelout/flow_docker/master/wandb_conf.py"
ENTRYPOINT wandb agent $WANDB_SWEEP_ID
ENTRYPOINT wandb agent $WANDB_SWEEP_ID
15 changes: 9 additions & 6 deletions wandb_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class DynamicAccessNestedDict:
"""Dynamically get/set nested dictionary keys of 'data' dict"""

def __init__(self, data: dict):
"""
"""
self.data = data

def getval(self, keys: List):
Expand Down Expand Up @@ -62,12 +64,13 @@ def make_config(wandb_config: Dict, base_config_path: str):
def main():
print("Running the code now")
result_wandb = convert_args(sys.argv)
with open("config.json", "w+") as f:
# A limitation of this script is it only will get internet web
# urls at the moment update to include local.
r = requests.get(os.environ["BASE_CONFIG_PATH"])
f.write(r.text)
the_config = make_config(result_wandb, "config.json")
if "https://" in os.environ["BASE_CONFIG_PATH"]:
with open("config.json", "w+") as f:
r = requests.get(os.environ["BASE_CONFIG_PATH"])
f.write(r.text)
the_config = make_config(result_wandb, "config.json")
else:
the_config = make_config(result_wandb, os.environ["BASE_CONFIG_PATH"])
train_function("PyTorch", the_config)


Expand Down