class_docstr: An implementation of data store which uses NFS for storing policy checkpoints when using Coach in distributed mode.
  The policy checkpoints are written by the trainer and read by the rollout worker.
class_docstr_tok: ["An","implementation","of","data","store","which","uses","NFS","for","storing","policy","checkpoints","when","using","Coach","in","distributed","mode",".","The","policy","checkpoints","are","written","by","the","trainer","and","read","by","the","rollout","worker","."]
docstr: Delete NFS resources such as PV and PVC from the Kubernetes orchestrator.
docstr_tok: ["Delete","NFS","resources","such","as","PV","and","PVC","from","the","Kubernetes","orchestrator","."]
code: def delete_k8s_nfs_resources(self) -> bool:
      """
      Delete NFS resources such as PV and PVC from the Kubernetes orchestrator.
      """
      from kubernetes import client as k8sclient
  
      del_options = k8sclient.V1DeleteOptions()
      k8s_api_client = k8sclient.CoreV1Api()
  
      try:
          k8s_api_client.delete_persistent_volume(
              self.params.pv_name, del_options
          )
      except k8sclient.rest.ApiException as e:
          screen.print("Got exception: %s\n while deleting NFS PV", e)
          return False
  
      try:
          k8s_api_client.delete_namespaced_persistent_volume_claim(
              self.params.pvc_name, self.params.namespace, del_options
          )
      except k8sclient.rest.ApiException as e:
          screen.print("Got exception: %s\n while deleting NFS PVC", e)
          return False
  
      return True
  
file_path: coach/rl_coach/data_stores/nfs_data_store.py
imports: import uuid
  from rl_coach.data_stores.data_store import DataStoreParameters
  from rl_coach.data_stores.checkpoint_data_store import CheckpointDataStore
  from rl_coach.logger import screen
label_desc: Use image node_id 10 for calling the NFSDataStore obj's underlying member method code with example usage: obj.delete_k8s_nfs_resources() and returns: True, False, False