@@ -256,13 +256,7 @@ def generate_version(self, settings):
256256
257257 def train (
258258 self ,
259- new_version_settings = {
260- "preprocessing" : {
261- "auto-orient" : True ,
262- "resize" : {"width" : 640 , "height" : 640 , "format" : "Stretch to" },
263- },
264- "augmentation" : {},
265- },
259+ new_version_settings = None ,
266260 speed = None ,
267261 checkpoint = None ,
268262 plot_in_notebook = False ,
@@ -294,6 +288,15 @@ def train(
294288 >>> version.train()
295289 """ # noqa: E501 // docs
296290
291+ if new_version_settings is None :
292+ new_version_settings = {
293+ "preprocessing" : {
294+ "auto-orient" : True ,
295+ "resize" : {"width" : 640 , "height" : 640 , "format" : "Stretch to" },
296+ },
297+ "augmentation" : {},
298+ }
299+
297300 new_version = self .generate_version (settings = new_version_settings )
298301 new_version = self .version (new_version )
299302 new_model = new_version .train (speed = speed , checkpoint = checkpoint , plot_in_notebook = plot_in_notebook )
@@ -557,13 +560,15 @@ def single_upload(
557560 split = "train" ,
558561 num_retry_uploads = 0 ,
559562 batch_name = None ,
560- tag_names = [] ,
563+ tag_names = None ,
561564 is_prediction : bool = False ,
562565 annotation_overwrite = False ,
563566 sequence_number = None ,
564567 sequence_size = None ,
565568 ** kwargs ,
566569 ):
570+ if tag_names is None :
571+ tag_names = []
567572 if image_path and image_id :
568573 raise Exception ("You can't pass both image_id and image_path" )
569574 if not (image_path or image_id ):
@@ -641,7 +646,7 @@ def search(
641646 in_dataset : Optional [str ] = None ,
642647 batch : bool = False ,
643648 batch_id : Optional [str ] = None ,
644- fields : list = [ "id" , "created" , "name" , "labels" ] ,
649+ fields : Optional [ list ] = None ,
645650 ):
646651 """
647652 Search for images in a project.
@@ -672,6 +677,9 @@ def search(
672677 """ # noqa: E501 // docs
673678 payload : Dict [str , Union [str , int , List [str ]]] = {}
674679
680+ if fields is None :
681+ fields = ["id" , "created" , "name" , "labels" ]
682+
675683 if like_image is not None :
676684 payload ["like_image" ] = like_image
677685
@@ -719,7 +727,7 @@ def search_all(
719727 in_dataset : Optional [str ] = None ,
720728 batch : bool = False ,
721729 batch_id : Optional [str ] = None ,
722- fields : list = [ "id" , "created" ] ,
730+ fields : Optional [ list ] = None ,
723731 ):
724732 """
725733 Create a paginated list of search results for use in searching the images in a project.
@@ -752,6 +760,10 @@ def search_all(
752760
753761 >>> print(result)
754762 """ # noqa: E501 // docs
763+
764+ if fields is None :
765+ fields = ["id" , "created" ]
766+
755767 while True :
756768 data = self .search (
757769 like_image = like_image ,
0 commit comments