text
stringlengths
81
112k
Function to prune the feedmap of nodes which no longer exist. def prune_feed_map(meta_graph, feed_map): """Function to prune the feedmap of nodes which no longer exist.""" node_names = [x.name + ":0" for x in meta_graph.graph_def.node] keys_to_delete = [] for k, _ in feed_map.items(): if k not in node_name...
Writes to `filename` atomically. This means that when `filename` appears in the filesystem, it will contain all of `contents`. With write_string_to_file, it is possible for the file to appear in the filesystem with `contents` only partially written. Accomplished by writing to a temp file and then renaming it....
Builds a path to a new subdirectory within the base directory. Each export is written into a new subdirectory named using the current time. This guarantees monotonically increasing version numbers even across multiple runs of the pipeline. The timestamp used is the number of seconds since epoch UTC. Args: ...
Builds a directory name based on the argument but starting with 'temp-'. This relies on the fact that TensorFlow Serving ignores subdirectories of the base directory that can't be parsed as integers. Args: timestamped_export_dir: the name of the eventual export directory, e.g. /foo/bar/<timestamp> ...
Deletes older exports, retaining only a given number of the most recent. Export subdirectories are assumed to be named with monotonically increasing integers; the most recent are taken to be those with the largest values. Args: export_dir_base: the base directory under which each export is in a versio...
Generate a human-readable string representing number of bytes. The units B, kB, MB and GB are used. Args: num_bytes: (`int` or None) Number of bytes. include_b: (`bool`) Include the letter B at the end of the unit. Returns: (`str`) A string representing the number of bytes in a human-readable way, ...
Generates a new release announcement entry in the docs. def announce(version): """Generates a new release announcement entry in the docs.""" # Get our list of authors stdout = check_output(["git", "describe", "--abbrev=0", "--tags"]) stdout = stdout.decode("utf-8") last_version = stdout.strip() ...
Generates new docs, release announcements and creates a local tag. def pre_release(version): """Generates new docs, release announcements and creates a local tag.""" announce(version) regen() changelog(version, write_out=True) fix_formatting() msg = "Preparing release version {}".format(versio...
A basic wrapper around Pickle to serialize a list of prediction and/or an algorithm on drive. What is dumped is a dictionary with keys ``'predictions'`` and ``'algo'``. Args: file_name(str): The name (with full path) specifying where to dump the predictions. predictions(list of...
delete a HorizontalPodAutoscaler This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_horizontal_pod_autoscaler(name, namespace, async_req=True) >>> result = thread.get() :par...
get available resources This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() :param async_req bool :return: V1APIResourceList...
partially update the specified HorizontalPodAutoscaler This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_horizontal_pod_autoscaler(name, namespace, body, async_req=True) >>> result =...
partially update status of the specified HorizontalPodAutoscaler This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True) ...
replace the specified HorizontalPodAutoscaler This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_horizontal_pod_autoscaler(name, namespace, body, async_req=True) >>> result = thread...
replace status of the specified HorizontalPodAutoscaler This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True) >>...
Sets the ca_bundle of this V1alpha1WebhookClientConfig. `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. :param ca_bundle: The ca_bundle of this V1alpha1WebhookClientConfig. :type...
create a PodPreset This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_pod_preset(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool :pa...
delete collection of PodPreset This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_pod_preset(namespace, async_req=True) >>> result = thread.get() :param async_req...
list or watch objects of kind PodPreset This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_pod_preset_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool ...
create a CronJob This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_cron_job(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool :param ...
delete collection of CronJob This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() :param async_req boo...
list or watch objects of kind CronJob This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cron_job_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind CronJob This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
read the specified CronJob This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
read status of the specified CronJob This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job_status(name, namespace, async_req=True) >>> result = thread.get() :param async...
create a CustomResourceDefinition This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_custom_resource_definition(body, async_req=True) >>> result = thread.get() :param async_req bool ...
delete a CustomResourceDefinition This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_custom_resource_definition(name, async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind CustomResourceDefinition This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_custom_resource_definition(async_req=True) >>> result = thread.get() :param asyn...
read the specified CustomResourceDefinition This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_custom_resource_definition(name, async_req=True) >>> result = thread.get() :param async_req...
read status of the specified CustomResourceDefinition This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_custom_resource_definition_status(name, async_req=True) >>> result = thread.get() ...
delete an Ingress This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_ingress(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool :param ...
list or watch objects of kind Ingress This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_ingress(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
partially update the specified Ingress This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_ingress(name, namespace, body, async_req=True) >>> result = thread.get() :param asyn...
partially update status of the specified Ingress This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_ingress_status(name, namespace, body, async_req=True) >>> result = thread.get() ...
read the specified Ingress This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_ingress(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
replace the specified Ingress This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_ingress(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req b...
replace status of the specified Ingress This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_ingress_status(name, namespace, body, async_req=True) >>> result = thread.get() :...
connect DELETE requests to proxy of Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_delete_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thr...
connect GET requests to exec of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_get_namespaced_pod_exec(name, namespace, async_req=True) >>> result = thread.get() :param async_...
connect GET requests to proxy of Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_get_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() :pa...
connect HEAD requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_head_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() :param as...
connect HEAD requests to proxy of Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_head_node_proxy(name, async_req=True) >>> result = thread.get() :param async_req bool ...
connect OPTIONS requests to proxy of Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_options_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() ...
connect PATCH requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_patch_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() :param ...
connect PATCH requests to proxy of Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_patch_node_proxy(name, async_req=True) >>> result = thread.get() :param async_req bool ...
connect POST requests to portforward of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_post_namespaced_pod_portforward(name, namespace, async_req=True) >>> result = thread.get() ...
connect POST requests to proxy of Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_post_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread....
connect PUT requests to proxy of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_put_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() ...
connect PUT requests to proxy of Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_put_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() :param async_re...
create Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_endpoints(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool :param...
create an Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_event(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool :param str ...
create a Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_pod(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool :param str names...
create a ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_replication_controller(namespace, body, async_req=True) >>> result = thread.get() :param as...
create a ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_service_account(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool ...
delete collection of Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_endpoints(namespace, async_req=True) >>> result = thread.get() :param async_req ...
delete collection of Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_event(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
delete collection of Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_pod(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
delete collection of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_pod_template(namespace, async_req=True) >>> result = thread.get() :param async...
delete collection of Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_secret(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
delete collection of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_service_account(namespace, async_req=True) >>> result = thread.get() :param...
delete a Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespace(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of t...
delete a ConfigMap This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_config_map(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool :pa...
delete a LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_limit_range(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool :...
delete a PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_persistent_volume_claim(name, namespace, async_req=True) >>> result = thread.get() :param a...
delete a ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_replication_controller(name, namespace, async_req=True) >>> result = thread.get() :param as...
delete a ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_resource_quota(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
delete a ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_service_account(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
delete a Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_node(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: name of the Node (r...
list objects of kind ComponentStatus This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_component_status(async_req=True) >>> result = thread.get() :param async_req bool :param st...
list or watch objects of kind ConfigMap This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_config_map_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_endpoints_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_limit_range_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool...
list or watch objects of kind Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespace(async_req=True) >>> result = thread.get() :param async_req bool :param str pr...
list or watch objects of kind ConfigMap This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_config_map(namespace, async_req=True) >>> result = thread.get() :param async_req boo...
list or watch objects of kind Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_event(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_limit_range(namespace, async_req=True) >>> result = thread.get() :param async_req b...
list or watch objects of kind PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_persistent_volume_claim(namespace, async_req=True) >>> result = thread.get() ...
list or watch objects of kind Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_pod(namespace, async_req=True) >>> result = thread.get() :param async_req bool :pa...
list or watch objects of kind PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_pod_template(namespace, async_req=True) >>> result = thread.get() :param async_req...
list or watch objects of kind ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_replication_controller(namespace, async_req=True) >>> result = thread.get() ...
list or watch objects of kind ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_resource_quota(namespace, async_req=True) >>> result = thread.get() :param async...
list or watch objects of kind Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_secret(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_service(namespace, async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_service_account(namespace, async_req=True) >>> result = thread.get() :param asy...
list or watch objects of kind Node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_node(async_req=True) >>> result = thread.get() :param async_req bool :param str pretty: If '...
list or watch objects of kind PersistentVolume This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_persistent_volume(async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_persistent_volume_claim_for_all_namespaces(async_req=True) >>> result = thread.get() ...
list or watch objects of kind Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_pod_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool :param...
list or watch objects of kind PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_pod_template_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bo...
list or watch objects of kind ReplicationController This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_replication_controller_for_all_namespaces(async_req=True) >>> result = thread.get() ...
list or watch objects of kind ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_resource_quota_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_re...
list or watch objects of kind Secret This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_secret_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool ...
list or watch objects of kind ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_service_account_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_...
list or watch objects of kind Service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_service_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool ...
partially update the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespace(name, body, async_req=True) >>> result = thread.get() :param async_req bool ...
partially update status of the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespace_status(name, body, async_req=True) >>> result = thread.get() :param async...
partially update the specified ConfigMap This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_config_map(name, namespace, body, async_req=True) >>> result = thread.get() :param...
partially update the specified Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_endpoints(name, namespace, body, async_req=True) >>> result = thread.get() :param ...
partially update the specified Event This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_event(name, namespace, body, async_req=True) >>> result = thread.get() :param async_re...
read status of the specified PersistentVolumeClaim This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_persistent_volume_claim_status(name, namespace, async_req=True) >>> result = threa...