MCPcopy Create free account
hub / github.com/Kaggle/docker-python / patched_init

Function patched_init

patches/kaggle_gcp.py:195–200  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

193def monkeypatch_aiplatform_init(aiplatform_klass, kaggle_kernel_credentials):
194 aiplatform_init = aiplatform_klass.init
195 def patched_init(*args, **kwargs):
196 specified_credentials = kwargs.get('credentials')
197 if specified_credentials is None:
198 logging.info("No credentials specified, using KaggleKernelCredentials.")
199 kwargs['credentials'] = kaggle_kernel_credentials
200 return aiplatform_init(*args, **kwargs)
201
202 if (not has_been_monkeypatched(aiplatform_klass.init)):
203 aiplatform_klass.init = patched_init

Callers

nothing calls this directly

Calls 2

set_kaggle_user_agentFunction · 0.85

Tested by

no test coverage detected