Anomalous backslash in string: '\*'. String constant might be missing an r prefix.
7
8
9def _filter_files(file_dir: Union[str, Path], is_viya4: Optional[bool] = False) -> list:
10 """11 Filters file list to only contain files used for model import. Models imported into
12 SAS Viya 3.5 and SAS Viya 4 have a difference in total files imported, due to
13 differences in Python handling.
Anomalous backslash in string: '\*'. String constant might be missing an r prefix.
37 score_code_path: Union[Path, str, None] = None,
38 **kwargs,
39 ) -> Union[dict, None]:
40 """ 41 Generates Python score code based on training data used to create the model
42 object.
43
Anomalous backslash in string: '\*'. String constant might be missing an r prefix.
33 is_binary_string: bool = False,
34 mlflow_details: Optional[dict] = None,
35 ) -> Union[dict, str, None]:
36 """ 37 Write trained model to a binary pickle file, H2O MOJO file, or a binary string
38 object.
39
Anomalous backslash in string: '\*'. String constant might be missing an r prefix.
200 overwrite_project_properties: Optional[bool] = False,
201 **kwargs,
202 ) -> Tuple[RestObj, Union[dict, str, Path]]:
203 """204 Import a model to SAS Model Manager using pzmm submodule.
205
206 Using pzmm, generate Python score code and import the model files into
Description
Backslash is present in the literal string but is not a valid escape sequence. If it is intended to be an escape sequence, use the correct escape characters. If it is intended to be a literal backslash, it can either be replaced with with an escaped backslash \\
, or you can add an r
prefix to make it a "raw" string.
Bad practice
filepath = "C:\myfiles\run.py"
Recommended
filepath = "C:\\myfiles\\run.py" # use `\\` to render one backslash
filepath = r"C:\myfiles\run.py" # use the `r` prefix to avoid unnecessary escapes