Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _main(config, num_trials):
load_metadata(config)
# Load data
if config.train:
comb_train_ds = read_data(config, 'train', config.task)
comb_dev_ds = read_data(config, 'dev', config.task)
test_task = config.task if not config.task == 'joint' else 'all'
comb_test_ds = read_data(config, 'test', test_task)
# For quick draft initialize (deubgging).
if config.draft:
config.train_num_batches = 1
config.val_num_batches = 1
config.test_num_batches = 1
config.num_epochs = 2
config.val_period = 1
config.save_period = 1
# TODO : Add any other parameter that induces a lot of computations
pprint(config.__dict__)
def _main(config, num_trials):
load_metadata(config)
# Load data
if config.train:
comb_train_ds = read_data(config, 'train', config.task)
comb_dev_ds = read_data(config, 'dev', config.task)
test_task = config.task if not config.task == 'joint' else 'all'
comb_test_ds = read_data(config, 'test', test_task)
# For quick draft initialize (deubgging).
if config.draft:
config.train_num_batches = 1
config.val_num_batches = 1
config.test_num_batches = 1
config.num_epochs = 2
config.val_period = 1
config.save_period = 1
# TODO : Add any other parameter that induces a lot of computations
pprint(config.__dict__)
# TODO : specify eval tensor names to save in evals folder
def _main(config, num_trials):
load_metadata(config)
# Load data
if config.train:
comb_train_ds = read_data(config, 'train', config.task)
comb_dev_ds = read_data(config, 'dev', config.task)
test_task = config.task if not config.task == 'joint' else 'all'
comb_test_ds = read_data(config, 'test', test_task)
# For quick draft initialize (deubgging).
if config.draft:
config.train_num_batches = 1
config.val_num_batches = 1
config.test_num_batches = 1
config.num_epochs = 2
config.val_period = 1
config.save_period = 1
# TODO : Add any other parameter that induces a lot of computations
pprint(config.__dict__)
# TODO : specify eval tensor names to save in evals folder
eval_tensor_names = ['a', 'rf', 'rb', 'correct', 'yp']
eval_ph_names = ['q', 'q_mask', 'x', 'x_mask', 'y']