Пример #1
0
 def build(self):
   runs = []
   for epsilon in configStep(self.config):
     job = Job(epsilon, self.mapRatio)
     run = Run([job, job], self.delta, epsilon)
     runs.append(run)
   return Experiment(runs, self.__class__.details, self.config)
Пример #2
0
 def build(self):
   runs = []
   for beta in configStep(self.config):
     job1 = Job(self.job0.epsilon, self.job0.mapRatio * beta)
     run = Run([self.job0, job1], self.delta, beta)
     runs.append(run)
   return Experiment(runs, self.__class__.details, self.config)
Пример #3
0
	def build_jobs(epoch_no, network=None):
		local_job_name = NAMER(epoch_no) + '_LOCAL'
		local_job = Job(local_job_name, local_exp, local_nests,
						save_loc=SCHEDULE_DIR)
		local_job.write()

		global_job_name = NAMER(epoch_no) + '_GLOBAL'
		global_job = Job(global_job_name, global_exp, global_nests,
						 save_loc=SCHEDULE_DIR)
		global_job.write()
	def build_jobs(epoch_no, network=None):
		local_job_name = '%s_EPOCH%04d_LOCAL' % (NAME, epoch_no)
		local_job = Job(local_job_name, local_exp, local_nests,
						save_loc=SCHEDULE_DIR)
		local_job.write()


		global_job_name = '%s_EPOCH%04d_GLOBAL' % (NAME, epoch_no)
		global_job = Job(global_job_name, global_exp, global_nests,
						 save_loc=SCHEDULE_DIR)
		global_job.write()
		def build_jobs(epoch_no, network=None, NAME=NAME, reg_name=reg_name):
			prefix = '%s_REG%s_EPOCH%04d' % (NAME, reg_name, epoch_no)
			local_exp = Experiment(LOCAL_METHODS, network=network, **exp_kwargs)
			global_exp = Experiment(GLOBAL_METHODS, network=network, **exp_kwargs)

			local_job = Job('%s_LOCAL' % prefix, local_exp, local_nests,
							save_loc=SCHEDULE_DIR)
			global_job = Job('%s_GLOBAL' % prefix, global_exp, global_nests,
							 save_loc=SCHEDULE_DIR)

			local_job.write()
			global_job.write()
Пример #6
0
	def build_jobs(network, **exp_kwargs):
		local_exp = Experiment([FastLip, LipLP, LipMIP], 
							   network=network, **exp_kwargs)	
		global_exp = Experiment([LipMIP, FastLip, LipLP, SeqLip, LipSDP, NaiveUB], 
								network=network, **exp_kwargs)
		prefix = NAME_FXN(network)
		#prefix = '%s_RELUS%02d' % (NAME, network.num_relus)
		local_job_name = prefix + "_LOCAL"
		local_job = Job(local_job_name, local_exp, local_nests,
						save_loc=SCHEDULE_DIR)
		global_job_name = prefix + "_GLOBAL"
		global_job = Job(global_job_name, global_exp, global_nests,
						 save_loc=SCHEDULE_DIR)
		local_job.write()		
		global_job.write()
Пример #7
0
def job_from_dict(job_data):
    """
    Helper function to create an Arcs Job from CrowdFlower job data.

    Args:
        job_data (dict): A dictionary of CrowdFlower job data

    Returns:
        An Arcs Job
    """
    metadata = dict(job_data)

    data = {
        "external_id": job_data["id"],
        "platform": "crowdflower",
        "metadata": metadata
    }

    return Job(**data)
Пример #8
0
 def __init__(self, config):
   self.config = config
   epsilon = config["epsilon"]
   mapRatio = config["mapRatio"]
   self.job0 = Job(epsilon, mapRatio)
   self.delta = config["delta"]