Improvements
- Added
CodeFileclass to pzmm module for creating and uploading Python code files to SAS Intelligent Decisioning- New method
write_id_code_file()uploads a Python code file to a specified Viya folder and registers it with the Decisions service- Accepts code as a raw string, file path, or
Pathobject - Validates code format via the SAS Viya API before upload; can be disabled with
validate_code=False - Raises
ValueErrorif the file already exists in the target folder, if the folder is not found, or if validation fails - Cleans up the uploaded file if Decisions service registration fails
- Accepts code as a raw string, file path, or
- See
examples/pzmm_id_code_file_example.ipynbfor usage examples
- New method
Improvements
- Added
create_requirements_txtparameter tocreate_requirements_json()function inwrite_json_files.pyto optionally generate a requirements.txt file alongside the requirements.json file.
Improvements
- Added model versioning methods to
model_repository.pyto handle model version endpoints. - Allow for user to set custom timeout length for score testing in
score_model_with_cas.
Improvements
- Improved
upload_local_modelto allow for SAS Model Manager to properly intake local ASTORE models.
Improvements
- Added
upload_local_modeltotasks.py, which can be used to upload local directories to SAS Model Manager without any file generation.
Bugfixes
- Updated
calculate_model_statisticsfunction inwrite_json_files.pyto improve ROC tables as well as model card files.
Improvements
- Improved functionality for
score_definition.pyandscore_execution.py, allowing for more general usage of thescore_model_with_castask- Also allowed for model name to be passed into functions instead of requiring model UUID
- Pickle files now loaded with
pd.read_pickle()instead ofpickle.load()in score code, allowing for more flexibility between python environments
Bugfixes
- Updated
pzmm_generate_complete_model_card.ipynbto have better preprocessing function
Changes
- Added
score_definition.pyandscore_execution.pyto allow for score testing within SAS Model Manager- Included optional use of CAS Gateway for faster scoring. Only available in environments where Gateway scoring is properly set up.
- Added ability to include data pre-processing function within python score code using the
preprocess_functionargument.
Bugfixes
- Fixed issue where settings file was improperly imported in some score code files.
Changes
- Due to licensing restrictions, the
sasctlpackage will no longer be available through Anaconda.
Bugfixes
- Fixed a bug that caused an error when performing SSL verification without a CA bundle specified.
Improvements
- Refactor
tasks.pyto utilizesasctl.pzmmfunctions. - Add
model_infoclass to better capture model information.
Buxfixes
- Updated
write_json_files.pyto allow for better support for prediction models - Fixed issues relating to model card support.
Improvements
- Added example Jupyter notebook for OpenAI models.
Buxfixes
- Dropped support for Python 3.6 and Python 3.7, as those are no longer officially supported versions.
- Added
dmcas_misc.jsontemplate file for model card generation. - Updated generation of
ModelProperties.jsonto allow for model card generation immediately upon upload.
Bugfixes
- Updated all examples to use current versions of sasctl functions
- Fixed bug in
generate_model_cardthat threw an error when trying to generate thedmcas_misc.jsonfile
Improvements
- Introduced
generate_model_cardintowrite_json_files.pyto allow for python models to work with planned model card tab in SAS Model Manager.
Bugfixes
- Allow for score code to impute NaN values in tables that have been loaded into SAS Model Manager.
- Fix issue where target_value was not being properly set during score code generation
- Updated
pzmm_generate_requrirements_json.ipynbso the requirements file is generated properly. - Added missing statistics to
dmcas_fitstat.jsonfile.
Improvements
- Introduced ability to specify the target index of a binary model when creating score code.
- index can be specified in
pzmm.import_model.ImportModel.import_model() - Relevant examples updated to include target_index.
- index can be specified in
Bugfixes
- Reworked
write_score_code.pyto allow for proper execution of single line scoring. - Added template files for
assess_model_bias.pyto allow for proper execution
Improvements
write_score_code.pyrefactored to include ability to run batch scoring.- Added handling for TensorFlow Keras models.
- Updated project creation to automatically set project properties based on contained models.
- Included capability to assess biases of a model using CAS FairAITools using
pzmm.write_json_files.assess_model_bias(). - Added custom KPI support for H2O, statsmodels, TensorFlow, and xgboost.
- Updated examples:
- Added example walking through the creation process of a simple TensorFlow Keras model.
- Added example detailing the usage of
pzmm.write_json_files.assess_model_bias()for a simple regression model - Updated
pzmm_custom_kpi_model_parametersnotebook to have correct parameter casing.
Improvements
- Created pytest fixture to begin running Jupyter notebooks within the GitHub automated test actions.
- Updated examples:
- Custom KPI and model parameters example now checks for the performance job's status.
- Update H2O example to show model being published and scored using the "maslocal" destination.
- Updated models to be more realistic for
pzmm_binary_classification_model_import.ipynb.
Bugfixes
- Adjust
pzmm.ScoreCode.write_score_code()function to be compatible with future versions of pandas. - Reworked H2O section of
pzmm.ScoreCode.write_score_code()to properly call H2OFrame values. - Fixed call to
pzmm.JSONFiles.calculate_model_statistics()inpzmm_binary_classification_model_import.ipynb.
Improvements
- Refactored gitIntegration.py to
git_integration.pyand added unit tests for better test coverage.
Bugfixes
- Fixed issue with ROC and Lift charts not properly being written to disk.
- Fixed JSON conversion for Lift charts that caused TRAIN and TEST charts to be incorrect.
- Fixed issue with H2O score code and number of curly brackets.
- Updated score code logic for H2O to account for incompatibility with Path objects.
- Fixed issue where inputVar.json could supply invalid values to SAS Model Manager upon model import.
- Fixed issue with
services.model_publish.list_models, which was using an older API format that is not valid in SAS Viya 3.5 or SAS Viya 4.
Improvements
- Add recursive folder creation and an example.
- Add example for migrating models from SAS Viya 3.5 to SAS Viya 4.
Bugfixes
- Fixed improper json encoding for
pzmm_h2o_model_import.ipynbexample. - Set urllib3 < 2.0.0 to allow requests to update their dependencies.
- Set pandas >= 0.24.0 to include df.to_list alias for df.tolist.
- Fix minor errors in h2o score code generation
Improvements
- Updated handling of H2O models in
sasctl.pzmm.- Models are now saved with the appropriate
h2ofunctions within thesasctl.pzmm.PickleModel.pickle_trained_modelfunction. - Example notebooks have been updated to reflect this change.
- Models are now saved with the appropriate
Bugfixes
- Added check for
sasctl.pzmm.JSONFiles.calculate_model_statsisticsfunction to replace float NaN values invalid for JSON files. - Fixed issue where the
sasctl.pzmm.JSONFiles.write_model_propertiesfunction was replacing the user-defined model_function argument. - Added NpEncoder class to check for numpy values in JSON files. Numpy-types cannot be used in SAS Viya.
Improvements
sasctl.pzmmrefactored to follow PEP8 standards, include type hinting, and major expansion of code coverage.sasctl.pzmmfunctions that can generate files can now run in-memory instead of writing to disk.
- Added custom KPI handling via
pzmm.model_parameters, allowing users to interact with the KPI table generated by model performance via API.- Added a method for scikit-learn models to generate hyperparameters as custom KPIs.
- Reworked the
pzmm.write_score_code()logic to appropriately write score code for binary classification, multi-class classification, and regression models. - Updated all examples based on
sasctl.pzmmusage and model assets.- Examples from older versions moved to
examples/ARCHIVE/vX.X.
- Examples from older versions moved to
- DataStep or ASTORE models can include additional files when running
tasks.register_model().
Bugfixes
- Fixed an issue where invalid HTTP responses could cause an error when using
Session.version_info().
Improvements
folders.get_folder()can now handle folder paths and delegates (e.g. @public).
Bugfixes
- Fixed an issue with
model_management.execute_model_workflow_definition()where input values for workflow prompts were not correctly submitted. Note that theinput=parameter was renamed toprompts=to avoid conflicting with the built-ininput(). - Fixed an issue with
pzmm.importModel.model_exists()where project versions were incorrectly compared, resulting in improper behavior when the project version already existed.- Better handling for invalid project versions included.
Changes
- Adjusted workflow for code coverage reporting. Prepped to add components in next release.
- Added
generate_requirements_json.ipynbexample.
Bugfixes
- Fixed improper math.fabs use in
sasctl.pzmm.writeJSONFiles.calculateFitStat(). - Fixed incorrect ast node walk for module collection in
sasctl.pzmm.writeJSONFiles.create_requirements_json().
Improvements
- Added
Session.version_info()to check which version of Viya the session is connected to. - Updated the
properties=parameter ofmodel_repository.create_model()to accept a dictionary containing custom property names and values, and to correctly indicate their type (numeric, string, date, datetime) when passing the values to Viya. - Added
services.saslogonfor creating and removing OAuth clients. - Added
pzmm.JSONFiles.create_requirements_json()to create the requirements.json file for model deployment to containers based on the user's model assets and Python environment.
Changes
- Deprecated
core.platform_version()in favor ofSession.version_info(). - A
RuntimeErroris now raised if an obsolete service is called on a Viya 4 session (sentiment_analysis, text_categorization, and text_parsing) - Replaced the JSON cassettes used for testing with compressed binary cassettes to save space.
- Updated the testing framework to allow regression testing of multiple Viya versions.
- Refactored the authentication functionality in
Sessionto be more clear and less error prone. Relevant functions were also made private to reduce clutter in the class's public interface. - Began refactor for
sasctl.pzmmto adhere to PEP8 guidelines and have better code coverage.
Bugfixes
- Fixed an issue with
register_model()that caused invalid SAS score code to be generated when registering an ASTORE model in Viya 3.5. - Fixed a bug where calling a "get_item()" function and passing
Nonewould throw an error on most services instead of returningNone. - Fixed a bug that caused the authentication flow to be interrupted if Kerberos was missing.
Improvements
- Refactor astore model upload to fix 422 response from SAS Viya 4
- ASTORE model import now uses SAS Viya to generate ASTORE model assets
- Expanded usage for cas_management service (credit to @SilvestriStefano)
Bugfixes
- ASTORE model import no longer returns a 422 error
- Fix improper filter usage for model_repository service
- Fix error with loss of stream in add_model_content call for duplicate content
- Update integration test cassettes for SAS Viya 4
Improvements
- Added a new example notebook for git integration
- Added a model migration tool for migrating Python models from Viya 3.5 to Viya 4
- Improved handling of CAS authentication with tokens
Bugfixes
- Fixed git integration failure caused by detached head
- Fixed minor bugs in score code generation feature
- Fixed 500 error when importing models to Viya 4 with prewritten score code
- Fixed incorrect handling of optional packages in pzmm
Bugfixes
- Removed linux breaking import from new git integration feature
- Various minor bug fixes in the git integration feature
Improvements
- Added Git integration for better tracking of model history and versioning.
- Added MLFlow integration for simple models, allowing users to import simple MLFlow models, such as sci-kit learn, to SAS Model Manager
Bugfixes
- Fixed an issue where
folders.create_folder()would attempt to use root folder as parent if desired parent folder wasn't found. Now correctly handles parent folders and raises an error if folder not found.
Bugfixes
- Fix an issue where
pzmm.ZipModel.zipFiles()threw an error on Python 3.6.1 and earlier.
Bugfixes
- Fixed an issue with
register_model()where random forest, gradient boosting, and SVM regression models with nominal inputs where incorrectly treated as classification models.
Improvements
model_repository.add_model_content()will now overwrite existing files instead of failing.
Bugfixes
PagedList.__repr__()no longer appears to be an empty list.
Improvements
Sessionnow supports authorization using OAuth2 tokens. Use thetoken=parameter in the constructor when an existing access token token is known. Alternatively, omitting theusername=andpassword=parameters will now prompt the user for an auth code.
Changes
current_sessionnow stores & returns the most recently created session, not the first created session. This was done to alleviate quirks where an old, expired session is implicitly used instead of a newly-created session.- Removed deprecated
raw=parameter fromsasctl.core.request(). - Dropped support for Python 2.
Bugfixes
- Fixed an issue that caused score code generation by
pzmmmodule to fail with Viya 3.5.
Bugfixes
- SSL warnings no longer repeatedly raised when
verify_ssl=FalsebutCAS_CLIENT_SSL_CA_LISTis specified. model_repository.delete_model_contents()no longer fails when only one file is found.
Improvements
- All
delete_*()service methods returnNoneinstead of empty string. - All
get_*()service methods issue a warning if multiple items are found when retrieving by name.
Bugfixes
- Fixed an import issue that could cause an error while using the
pzmmsubmodule.
Improvements
PagedListhandles situations where the server over-estimates the number of items available for paging.- The version of SAS Viya on the server can now be determined using
sasctl.platform_version().
Bugfixes
- Reworked the
model_repository.get_repository()to prevent HTTP 403 errors that could occur with some Viya environments.
Bugfixes*
- Fixed an issue with JSON parsing that caused the
publish_modeltask to fail with Viya 4.0.
Improvements
- Added the
as_swatmethod to theSessionobject, allowing connection to CAS through SWAT without an additional authentication step.
Changes
- Integrated PZMM into
Sessioncalls and removed redundant function calls in PZMM. - ROC and Lift statistic JSON files created by PZMM are now generated through CAS actionset calls.
- Updated the PZMM example notebook,
FleetMaintenance.ipynb, to include integration of PZMM with sasctl functions.
Bugfixes
- Reworked the
model_repository.get_repository()to prevent HTTP 403 errors that could occur with some Viya environments.
Bugfixes
- Added PZMM fitstat JSON file to manifest.
Improvements
- PZMM module moved from a stand-alone repository to a sasctl submodule.
- Introduced deprecation warnings for Python 2 users.
Bugfixes
- Fixed PyMAS utilities to correctly work functions not bound to pickled objects.
- Model target variables should no longer appear as an input variable when registering ASTORE models.
Improvements
- Registered Python models will now include both
predictandpredict_probamethods. - Added a new Relationships service for managing links between objects.
- Added a new Reports service for retrieving SAS Visual Analytics reports.
- Added a new Report_Images service for rendering content from reports.
- Additional metadata fields are set when registering an ASTORE model.
- Collections of items should now return an instance of
PagedListfor lazy loading of results. - Module steps can now be called using
module.step(df)wheredfis the row of a DataFrame or Numpy array. register_modelsets additional project properties when registering an ASTORE model.
Changes
- Replaced the
rawparameter of therequestmethods with aformatparameter, allowing more control over the returned value. - The
get_file_contentmethod of the Files service now returns the actual content instead of the file metadata. - JSON output when using
sasctlfrom the command line is now formatted correctly.
Bugfixes
model_publish.delete_destinationnow works correctly.
Bugfixes
- Fixed an issue where the
REQUESTS_CA_BUNDLEenvironment variable was taking precedence over theverify_sslparameter.
Changes
- Saving of package information can now be disabled using the
record_packagesparameter ofregister_model.
Bugfixes
- Added support for uint data types to the
register_modeltask. - Fixed an issue where long package names caused
register_modelto fail. Sessioncreation now works with older versions of urllib3.
Bugfixes
- Match performance definitions based on project instead of model.
Bugfixes
- Model versioning now works correctly for Python models
- Fixed an issue where
Nonevalues in Python caused issues with MAS models.
Bugfixes
- Fixed project properties when registering a model from ASTORE.
- Fixed model metadata when registering a datastep model.
Bugfixes
- Fixed an issue where string inputs to Python models were incorrectly handled by DS2.
Changes
PyMAS.score_codenow supports adest='Python'option to retrieve the generated Python wrapper code.register_modeltask includes apython_wrapper.pyfile when registering a Python model.- Improved error message when user lacks required permissions to register a model.
Bugfixes
- Fixed an issue with CAS/EP score code that caused problems with model performance metrics.
Improvements
- Added
update_performancetask for easily uploading performance information for a model. - New (experimental) pyml2sas sub-package provides utilities for generating SAS code from Python gradient boosting models.
- New (experimental) methods for managing workflows added to
model_managementservice.
Changes
register_modeltask automatically captures installed Python packages.- All
list_xxxmethods return all matching items unless alimitparameter is specified. - Improved API documentation.
- Updated
full_lifecycleexample with performance monitoring.
Changes
- Registering an ASTORE model now creates an empty ASTORE file in Model Manager to be consistent with Model Studio behavior.
Bugfixes
microanalytic_score.define_stepsnow works with steps having no input parameters.- Fixed an issue where score code generated from an ASTORE model lacked output variables.
Bugfixes
model_repository.get_model_contentsno longer raises an HTTP 406 error.
Changes
putrequest will take anitemparameter that's used to automatically populate headers for updates.
Bugfixes
- Convert NaN values to null (None) when calling
microanalytic_score.execute_module_step.
Bugfixes
register_modeltask should now correctly identify columns when registering a Sci-kit pipeline.
Improvements
- Added the ability for
register_modelto correctly handle CAS tables containing data step score code.
Improvements
- Added
create_model_versionandlist_model_versionstomodel_repository - Added an explicit
ValueErrorwhen attempting to register an ASTORE that can't be downloaded. - Added
startandlimitpagination parameters to all defaultlist_*service methods. - Added
create_destination,create_cas_destinationandcreate_mas_destinationmethods formodel_publishservice.
Changes
Session.add_stderr_loggerdefault logging level changed toDEBUG.
Bugfixes
- Fixed an issue where
model_repositorydid not find models, projects, or repositories by name once pagination limits were reached.
Bugfixes
- The
register_modeltask now generates dmcas_epscorecode.sas files for ASTORE models.
Bugfixes
- Fixed problem causing
register_modeltask to include output variables in the input variables list.
Improvements
- CAS model table automatically reloaded on
publish_modeltask.
Bugfixes
- Fixed DS2 score code for CAS that was generated when registering a Python model.
PyMAS.score_code(dest='ESP')corrected todest='EP'- Fixed an issue where long user-defined properties prevented model registration.
Bugfixes
- Fixed an issue where usernames were not parsed correctly from .authinfo files, resulting in failed logins.
Improvements
- Added
update_moduleanddelete_modulemethods to MAS service.
Changed
- Added
replaceparameter tosasctl.tasks.publish_model Sessionhostname's can now be specified in HTTP format: 'http://example.com'.
Bugfixes
- Renamed
microanalytic_storeservice tomicroanalytic_score
Changed
- Exceptions moved from
sasctl.coretosasctl.exceptions SWATCASActionErrorraised if ASTORE cannot be saved during model registration.- Improved handling of MAS calls made via
define_steps()
Changed
- services are now classes instead of modules.
Imports of services in the format
import sasctl.services.model_management as mmmust be changed tofrom sasctl.services import model_management as mm. hostanduserparameters ofSessionrenamed tohostnameandusernameto align with SWAT.- Only
InsecureRequestWarningis suppred instead of allHTTPWarning
Improvements
- Added
copy_analytic_storemethod tomodel_repositoryservice AuthenticationErrorreturned instead ofHTTPErrorif session authentication fails.
Improvements
- public_model task also defines methods mapped to MAS module steps when publishing to MAS.
- SSL verification can be disable with
SSLREQCERTenvironment variable. - CAs to use for validating SSL certificates can also be specified through the
SSLCALISTLOCenvironment variable. - Added
execute_performance_task
Changes
- Updated method signature for
create_performance_definitionin Model Manager.
Bugfixes
- register_model task no longer adds
rcandmsgvariables from MAS to the project variables.
Initial public release.