@@ -412,15 +412,15 @@ def add_model(
412412 os .path .expanduser (requirements_txt_file )
413413 ):
414414 raise UnboxResourceError (
415- f"The file path `{ requirements_txt_file } ` specified on `requirements_txt_file ` does not"
416- " contain a file with the requirements. \n "
415+ f"File at path `{ requirements_txt_file } ` does not"
416+ " contain the requirements. \n "
417417 ) from None
418418
419419 # Setup script
420420 if setup_script and not os .path .isfile (os .path .expanduser (setup_script )):
421421 raise UnboxResourceError (
422- f"The file path `{ setup_script } ` specified on `setup_script ` does not"
423- " contain a file with the bash script with commands required before model loading. \n "
422+ f"File at path `{ setup_script } ` does not"
423+ " contain the bash script with commands required before model loading. \n "
424424 ) from None
425425
426426 # Dependent dir
@@ -441,9 +441,8 @@ def add_model(
441441 if train_sample_df .isnull ().values .any ():
442442 raise UnboxResourceError (
443443 context = "There is an issue with the specified `train_sample_df`. \n " ,
444- message = f"The `train_sample_df` contains missing values. \n " ,
445- mitigation = "Currently, Unbox does not support datasets with missing values."
446- + "Make sure to upload a training set sample without missing values by applying the same"
444+ message = f"The `train_sample_df` contains missing values, which is currently not supported. \n " ,
445+ mitigation = "Make sure to upload a training set sample without missing values by applying the same"
447446 + " preprocessing steps expected by your model." ,
448447 ) from None
449448
@@ -454,7 +453,7 @@ def add_model(
454453 # predict_proba
455454 if not isinstance (function , Callable ):
456455 raise UnboxValidationError (
457- f"- The argument `{ function } ` specified as `function` is not callable. \n "
456+ f"- `{ function } ` specified as `function` is not callable. \n "
458457 ) from None
459458
460459 user_args = function .__code__ .co_varnames [: function .__code__ .co_argcount ][2 :]
@@ -496,7 +495,7 @@ def add_model(
496495 if "tokenizer" not in kwargs :
497496 raise UnboxResourceError (
498497 context = "There is a missing keyword argument for the specified model type. \n " ,
499- message = "The `tokenizer` must be specified in kwargs when using a transformers model. \n " ,
498+ message = "`tokenizer` must be specified in kwargs when using a transformers model. \n " ,
500499 mitigation = "Make sure to specify the additional kwargs needed for the model type." ,
501500 ) from None
502501
@@ -516,7 +515,7 @@ def add_model(
516515 if feature not in headers
517516 ]
518517 raise UnboxDatasetInconsistencyError (
519- f"The features { features_not_in_dataset } specified in `feature_names` are not on the dataset. \n "
518+ f"Features { features_not_in_dataset } specified in `feature_names` are not on the dataset. \n "
520519 ) from None
521520
522521 required_fields = [
@@ -792,7 +791,7 @@ def add_dataset(
792791 object_name = "original.csv"
793792 if not os .path .isfile (exp_file_path ):
794793 raise UnboxResourceError (
795- f"The file path `{ file_path } ` specified on `file_path` does not contain a file with the dataset. \n "
794+ f"File at path `{ file_path } ` does not contain the dataset. \n "
796795 ) from None
797796
798797 with open (exp_file_path , "rt" ) as f :
@@ -805,9 +804,8 @@ def add_dataset(
805804 if df .isnull ().values .any ():
806805 raise UnboxResourceError (
807806 context = "There is an issue with the specified dataset. \n " ,
808- message = "The dataset contains missing values. \n " ,
809- mitigation = "Currently, Unbox does not support datasets with missing values."
810- + "Make sure to upload a training set sample without missing values by applying the same"
807+ message = "The dataset contains missing values, which is currently not supported. \n " ,
808+ mitigation = "Make sure to upload a training set sample without missing values by applying the same"
811809 + " preprocessing steps expected by your model." ,
812810 ) from None
813811
@@ -817,13 +815,13 @@ def add_dataset(
817815 headers .index (label_column_name )
818816 except ValueError :
819817 raise UnboxDatasetInconsistencyError (
820- f"The column `{ label_column_name } ` specified as `label_column_name` is not on the dataset. \n "
818+ f"`{ label_column_name } ` specified as `label_column_name` is not on the dataset. \n "
821819 ) from None
822820
823821 dataset_classes = list (df [label_column_name ].unique ())
824822 if len (dataset_classes ) > len (class_names ):
825823 raise UnboxDatasetInconsistencyError (
826- f"There are { len (dataset_classes )} classes represented on the dataset, but there are only"
824+ f"There are { len (dataset_classes )} classes represented on the dataset, but there are only "
827825 f"{ len (class_names )} items on the `class_names` list. \n " ,
828826 mitigation = f"Make sure that there are at most { len (class_names )} classes in your dataset." ,
829827 ) from None
@@ -837,14 +835,14 @@ def add_dataset(
837835 except ValueError :
838836 if text_column_name :
839837 raise UnboxDatasetInconsistencyError (
840- f"The column `{ text_column_name } ` specified as `text_column_name` is not on the dataset. \n "
838+ f"`{ text_column_name } ` specified as `text_column_name` is not on the dataset. \n "
841839 ) from None
842840 else :
843841 features_not_in_dataset = [
844842 feature for feature in feature_names if feature not in headers
845843 ]
846844 raise UnboxDatasetInconsistencyError (
847- f"The features { features_not_in_dataset } specified in `feature_names` are not on the dataset. \n "
845+ f"Features { features_not_in_dataset } specified in `feature_names` are not on the dataset. \n "
848846 ) from None
849847
850848 # Tag column validation
@@ -853,7 +851,7 @@ def add_dataset(
853851 headers .index (tag_column_name )
854852 except ValueError :
855853 raise UnboxDatasetInconsistencyError (
856- f"The column `{ tag_column_name } ` specified as `tag_column_name` is not on the dataset. \n "
854+ f"`{ tag_column_name } ` specified as `tag_column_name` is not on the dataset. \n "
857855 ) from None
858856
859857 # ----------------------- Subscription plan validations ---------------------- #
0 commit comments