Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, api_url, mongo_uri, **kwargs):
self.url = api_url
self.name = socket.gethostname()
self.http_client = AsyncHTTPClient()
self.models = {"keras": KerasModel(**kwargs)}
self.data_path = os.path.join(os.path.dirname(__file__), "data")
self.data_loader = DataLoader(api_url, mongo_uri)
self.exp_id = exp_id
self.model = None
self.data = None
self.data_loader = None
# How many epoch to train (if score earlystopping doesn't kick in earlier)
self.nb_epoch = nb_epoch
# How many epoch of not improving before earlystopper kicks in
self.patience = patience
self.mongo_uri = mongo_uri
self.factory = KerasModelFactory()
self.data_loader = DataLoader("http://localhost:8080", self.mongo_uri)