def get_results(self, experiment=None): if not os.path.exists(".openmined/grid/experiments.json") and self.jobId is None: raise Exception("There are no saved experiments and you have not submitted a job.") if not os.path.exists(".openmined/grid/experiments.json") and experiment is None: raise Exception("There are no saved experiments. Submit a job first.") usedJob = None if not experiment is None: if not os.path.exists(".openmined/grid/experiments.json"): raise Exception("There are no saved experiments.") with open('.openmined/grid/experiments.json', 'r') as outfile: d = json.loads(outfile.read()) for __experiment in d: if experiment == __experiment["uuid"]: usedJob = __experiment["jobId"] if usedJob is None and not experiment is None: raise Exception(f"No experiments matching {Fore.GREEN}{experiment}{Style.RESET_ALL}") if usedJob is None and not self.jobId is None: usedJob = self.jobId if usedJob is None: raise Exception("There are no saved experiments and you have not submitted a job.") results = self.controller.send_json({ "objectType": "Grid", "functionCall": "getResults", "experimentId": usedJob }) modelIds = json.loads(results) return ExperimentResults(list(map(lambda id: nn.Sequential(id=id), modelIds)))
def getResults(self): results = self.controller.send_json({ "objectType": "Grid", "functionCall": "getResults", "experimentId": self.jobId }) modelIds = json.loads(results) return ExperimentResults( list(map(lambda id: nn.Sequential(id=id), modelIds)))
def __init__(self): self.syft = nn.Sequential() self.layers = list() self.compiled = False
def __init__(self): self.syft = nn.Sequential()