File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -490,14 +490,18 @@ def precompute_image_embeddings(
490490 data_signature = _compute_data_signature (input_ )
491491
492492 f = zarr .open (save_path , "a" )
493- key_vals = [("data_signature" , data_signature ),
494- ("tile_shape" , tile_shape ), ("model_type" , predictor .model_type )]
493+ key_vals = [
494+ ("data_signature" , data_signature ),
495+ ("tile_shape" , tile_shape if tile_shape is None else list (tile_shape )),
496+ ("halo" , halo if halo is None else list (halo )),
497+ ("model_type" , predictor .model_type )
498+ ]
495499 for key , val in key_vals :
496500 if "input_size" in f .attrs : # we have computed the embeddings already
497501 # key signature does not match or is not in the file
498502 if key not in f .attrs or f .attrs [key ] != val :
499503 warnings .warn (
500- f"Embeddings file { save_path } is invalid due to unmatching { key } ."
504+ f"Embeddings file { save_path } is invalid due to unmatching { key } . "
501505 "Please recompute embeddings in a new file."
502506 )
503507 if wrong_file_callback is not None :
You can’t perform that action at this time.
0 commit comments