import os from gtd.io import Workspace # Set location of local data directory from environment variable env_var = 'TEXTMORPH_DATA' if env_var not in os.environ: assert False, env_var + ' environmental variable must be set.' root = os.environ[env_var] # define workspace workspace = Workspace(root) # config workspace.add_file('config', 'config.txt') # Training runs workspace.add_dir('edit_runs', 'edit_runs') workspace.add_dir('lm_runs', 'lm_runs') workspace.add_dir('retriever_runs', 'retriever_runs') # user IDs workspace.add_file('user_ids', 'user_ids.json') # word vectors workspace.add_dir('word_vectors', 'word_vectors') # nearest neighbors workspace.add_dir('nearest_sentences', 'nearest_sentences')
import os from gtd.io import Workspace # Set location of local data directory from environment variable env_var = 'COPY_EDIT_DATA' if env_var not in os.environ: assert False, env_var + ' environmental variable must be set.' root = os.environ[env_var] # define workspace workspace = Workspace(root) # Training runs workspace.add_dir('sc_runs') workspace.add_dir('edit_runs') # word vectors workspace.add_dir('word_vectors') # dataset dir workspace.add_dir('datasets')
from writter import GrllWritter from logger import logging_setup, config_run_logging_setup, handle_exception import sys import logging #TODO parse arg to the config file with default to default # basic logging setup logging_setup() sys.excepthook = handle_exception # Loading the Configs configs = GrllConfig() # Workspace setup exps_workspace = Workspace(data.workspace.assess_results_runs) if len(sub_dirs(exps_workspace.root)) == 0: exp_folder_name = "exp_" + str(0) else: exp_num = max([ int(re.search('(\d+)$', sub_dir_path).group(0)) for sub_dir_path in sub_dirs(exps_workspace.root) ]) + 1 exp_folder_name = "exp_" + str(exp_num) exps_workspace.add_dir(exp_folder_name, exp_folder_name) runs_workspace = Workspace(getattr(exps_workspace, exp_folder_name)) for idx, config_run in enumerate(configs): # 0. Setup the Config Run config_ = config_run.obj run_workspace = Workspace(
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os from gtd.io import Workspace # Set location of local data directory from environment variable env_var = "HRL_DATA" if env_var not in os.environ: assert False, env_var + " environmental variable must be set." root = os.environ[env_var] # define workspace workspace = Workspace(root) workspace.add_dir("experiments", "experiments") workspace.add_dir("visualization_rooms", "visualization_rooms") workspace.add_dir("montezuma_rooms", "visualization_rooms/montezuma") workspace.add_dir("pitfall_rooms", "visualization_rooms/pitfall") workspace.add_dir("private_eye_rooms", "visualization_rooms/private_eye") workspace.add_dir("whitelist", "whitelist") workspace.add_file("montezuma_whitelist", "whitelist/montezuma.txt") workspace.add_file("pitfall_whitelist", "whitelist/pitfall.txt") workspace.add_file("private_eye_whitelist", "whitelist/private_eye.txt") workspace.add_file("arial", "arial.ttf")
import os from os.path import join from gtd.io import Workspace # Set location of local data directory from environment variable env_var = 'WEBREP_DATA' if env_var not in os.environ: assert False, env_var + ' environmental variable must be set.' root = os.environ[env_var] # define workspace workspace = Workspace(root) workspace.add_dir("glove", "glove") workspace.add_dir("vocab", "vocab") workspace.add_dir("experiments", "experiments") workspace.add_dir("phrase_node", "phrase-node-dataset")
import os from gtd.io import Workspace # Set location of local data directory from environment variable env_var = 'RL_DATA' if env_var not in os.environ: assert False, env_var + ' environmental variable must be set.' root = os.environ[env_var] # define workspace workspace = Workspace(root) workspace.add_dir("experiments", "experiments") workspace.add_dir("glove", "glove") workspace.add_dir("demonstrations", "demonstrations")
import os from gtd.io import Workspace # Set location of local data directory from environment variable env_var = 'WEBREP_DATA' if env_var not in os.environ: assert False, env_var + ' environmental variable must be set.' root = os.environ[env_var] output_var = 'OUTPUT_DATA' if output_var not in os.environ: assert False, output_var + ' environmental variable must be set.' output_root = os.environ[output_var] # define workspace workspace = Workspace(root) workspace.add_dir("vocab", "vocab") workspace.add_dir("phrase_node", "phrase-node-dataset") workspace.add_dir("word_embeddings", "word_embeddings") output_workspace = Workspace(output_root) output_workspace.add_dir("experiments", "experiments")