def __init__(self, storage, cache_dir=".", **kwargs): self.id = kwargs["id"] self.key = kwargs["key"] self.metadata_root = kwargs["metadata_root"] self.name = kwargs["name"] self.endpoint = kwargs["endpoint"] self.predictor = Predictor(storage, cache_dir, **kwargs["predictor"]) self.tracker = None if kwargs.get("tracker") is not None: self.tracker = Tracker(**kwargs["tracker"]) self.cache_dir = cache_dir self.storage = storage host_ip = os.environ["HOST_IP"] datadog.initialize(statsd_host=host_ip, statsd_port="8125") self.statsd = datadog.statsd
def __init__(self, provider, storage, cache_dir=".", **kwargs): self.provider = provider self.id = kwargs["id"] self.key = kwargs["key"] self.metadata_root = kwargs["metadata_root"] self.name = kwargs["name"] self.endpoint = kwargs["endpoint"] self.predictor = Predictor(provider, cache_dir, **kwargs["predictor"]) self.monitoring = None if kwargs.get("monitoring") is not None: self.monitoring = Monitoring(**kwargs["monitoring"]) self.cache_dir = cache_dir self.storage = storage if provider != "local": host_ip = os.environ["HOST_IP"] datadog.initialize(statsd_host=host_ip, statsd_port="8125") self.statsd = datadog.statsd