@@ -209,11 +209,11 @@ def train(
209209
210210 new_version = self .generate_version (settings = new_version_settings )
211211 new_version = self .version (new_version )
212- new_version .train (
212+ new_model = new_version .train (
213213 speed = speed , checkpoint = checkpoint , plot_in_notebook = plot_in_notebook
214214 )
215215
216- return True
216+ return new_model
217217
218218 def version (self , version_number , local = None ):
219219 """Retrieves information about a specific version, and throws it into an object.
@@ -348,7 +348,7 @@ def __annotation_upload(self, annotation_path, image_id):
348348 annotation_string = open (annotation_path , "r" ).read ()
349349 # Set annotation upload url
350350
351- project_name = self .id .rsplit ("/" )[1 ]
351+ project_name = self .id .rsplit ("/" )[1 ]
352352
353353 self .annotation_upload_url = "" .join (
354354 [
@@ -528,14 +528,18 @@ def single_upload(
528528 if "success" in response_data .keys ():
529529 annotation_success = True
530530 elif "error" in response_data .keys ():
531- warnings .warn (f"Uploading annotation data for image failed: { str (response_data ['error' ])} " )
531+ warnings .warn (
532+ f"Uploading annotation data for image failed: { str (response_data ['error' ])} "
533+ )
532534 annotation_success = False
533535 else :
534- warnings .warn (f"Uploading annotation data for image failed: { str (response_data )} " )
535- annotation_success = False
536+ warnings .warn (
537+ f"Uploading annotation data for image failed: { str (response_data )} "
538+ )
539+ annotation_success = False
536540 except :
537541 warnings .warn (f"Bad response: { response .status_code } " )
538- annotation_success = False
542+ annotation_success = False
539543
540544 # Give user warning that annotation failed to upload
541545 if not annotation_success :
0 commit comments