@@ -445,10 +445,6 @@ def _get_project_or_create(self, project_name, verbose=False):
445445 def _upload (self , filename ):
446446 project = self ._get_project_or_create (self ._project_name )
447447 dotName = f"project-{ project ['id' ][:8 ]} -default-workspace"
448- #upload = requests.put(
449- # self._hostname+f"/v2/dotmesh/s3/{self._auth[0]}:{dotName}/{filename}", auth=self._auth,
450- # data=open(filename, 'rb').read(),
451- #)
452448 attempt = 0
453449 while attempt < 10 :
454450 attempt += 1
@@ -574,9 +570,6 @@ def flatten(d):
574570 commit [f"run.{ self .currentRun ._id } .workload-file" ] = sys .argv [0 ]
575571 # TODO add timestamp?
576572
577- #import pprint
578- #pprint.pprint(commit)
579-
580573 project = self ._get_project_or_create (self ._project_name )
581574 dotName = f"project-{ project ['id' ][:8 ]} -default-workspace"
582575 dot = self ._dotmesh_client .getDot (dotname = dotName , ns = self ._auth [0 ])
@@ -590,10 +583,7 @@ def _find_model_id(self, run_id):
590583 attempt = 0
591584 while attempt < 10 :
592585 attempt += 1
593- # TODO: maybe retry for a bit, as presumably populating the model lib
594- # from the commit is async
595586 # TODO: replace with a query arg in the backend to avoid iterating
596-
597587 models = requests .get (self ._hostname + "/v2/models" , auth = self ._auth ).json ()
598588 model_id = None
599589 for model in models :
@@ -671,10 +661,6 @@ def _build_docker_image_on_hub(self):
671661 else :
672662 raise Exception ("Unable to load error" )
673663
674- # TODO poll /v2/models/{model-id}/builds/{build-id} until built
675-
676- #self._docker_image = "quay.io/dotmesh/mnist-demo:latest" #"quay.io/dotmesh/dotscience-model-pipeline:ds-version-276ae14c-e20d-416e-9891-317b745b0cc1"
677-
678664 return self ._docker_image
679665
680666 def _deploy_to_kube (self ):
@@ -705,11 +691,6 @@ def _deploy_to_kube(self):
705691 body ["model_classes" ] = classes_encoded .decode ('ascii' )
706692 except Exception as e :
707693 print ("Unable to extract classes file (error = %s), continuing regardless (try passing classes=\" classes.json\" to ds.model, where classes.json contains a single map from class ids (strings) to human readable classnames..." % (e ,))
708- #print("SENDING BODY")
709- #import pprint
710- #pprint.pprint(body)
711- #import pdb; pdb.set_trace()
712- #"model_classes": classes_encoded,
713694 deployment = requests .post (
714695 self ._hostname + f"/v2/deployers/{ deployer ['id' ]} /deployments" ,
715696 json = body ,
@@ -753,7 +734,6 @@ def _setup_grafana(self):
753734 deployer_id = self ._deployer ["id" ]
754735 deployment_id = self ._deployment ["id" ]
755736 grafana = requests .post (
756- # "/v2/deployers/{id}/deployments/{deploymentId}/dashboard"
757737 self ._hostname + f"/v2/deployers/{ deployer_id } /deployments/{ deployment_id } /dashboard" ,
758738 json = {},
759739 auth = self ._auth ,
0 commit comments