Skip to content

Commit 692604c

Browse files
authored
Merge branch 'master' into master
2 parents 0e407c5 + 9b5e4c1 commit 692604c

File tree

549 files changed

+38390
-1420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

549 files changed

+38390
-1420
lines changed

.conda/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ requirements:
2121
- python >=3.6
2222
- pip
2323
run:
24+
- dill
2425
- python >=3.6
2526
- pandas
2627
- requests

.github/workflows/build-test-deploy.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
LANG: en_US.UTF-8
2222
strategy:
2323
matrix:
24-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
24+
python-version: ['3.8', '3.9', '3.10', '3.11']
2525
os-version: ['ubuntu-20.04', 'windows-latest', 'macos-latest']
2626
# Pinned Ubuntu version to 20.04 since no Python 3.6 builds available on ubuntu-latest (22.04) as of 2022-12-7.
2727
# os-version: [ubuntu-latest, windows-latest, macos-latest]
@@ -45,7 +45,7 @@ jobs:
4545
run: |
4646
# Setup tox & code coverage
4747
pip install --upgrade pip
48-
pip install tox tox-gh-actions pytest pytest-cov scikit-learn
48+
pip install tox tox-gh-actions pytest pytest-cov 'scikit-learn<=1.5.0' 'numpy<2.0.0'
4949
5050
- name: Run Tests
5151
run: |
@@ -113,7 +113,7 @@ jobs:
113113
run: sphinx-build -Ean -b html -j auto -D todo_include_todos=0 ./docs ./docs/_build/html
114114

115115
- name: Archive artifacts
116-
uses: actions/upload-artifact@v2
116+
uses: actions/upload-artifact@v4
117117
with:
118118
name: html-docs
119119
path: ./docs/_build/html
@@ -159,13 +159,13 @@ jobs:
159159
160160
- name: Archive distribution artifacts
161161
# Archive distribution files for use by auto (or manual) PyPI upload
162-
uses: actions/upload-artifact@v3
162+
uses: actions/upload-artifact@v4
163163
with:
164164
name: pypi-dist
165165
path: ./dist
166166

167167
- name: Archive changelog artifacts
168-
uses: actions/upload-artifact@v3
168+
uses: actions/upload-artifact@v4
169169
with:
170170
name: release_notes
171171
path: release_notes.md
@@ -199,7 +199,7 @@ jobs:
199199
200200
# Archive distribution files. Will upload in a downstream job.
201201
- name: Archive distribution artifacts
202-
uses: actions/upload-artifact@v3
202+
uses: actions/upload-artifact@v4
203203
with:
204204
name: conda-dist
205205
path: .build
@@ -214,19 +214,19 @@ jobs:
214214

215215
steps:
216216
- name: Download documentation
217-
uses: actions/download-artifact@v3
217+
uses: actions/download-artifact@v4
218218
with:
219219
name: html-docs
220220
path: ./html-docs
221221

222222
- name: Download release
223-
uses: actions/download-artifact@v3
223+
uses: actions/download-artifact@v4
224224
with:
225225
name: pypi-dist
226226
path: ./dist
227227

228228
- name: Download release notes
229-
uses: actions/download-artifact@v3
229+
uses: actions/download-artifact@v4
230230
with:
231231
name: release_notes
232232

@@ -292,7 +292,7 @@ jobs:
292292
293293
# Download release files
294294
- name: Download release
295-
uses: actions/download-artifact@v3
295+
uses: actions/download-artifact@v4
296296
with:
297297
name: conda-dist
298298
path: ./dist

CHANGELOG.md

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,49 @@
1-
Unreleased
2-
----------
1+
v1.10.7 (2024-10-02)
2+
--------------------
3+
**Bugfixes**
4+
- Fixed a bug that caused an error when performing SSL verification without a CA bundle specified.
5+
6+
v1.10.6 (2024-08-26)
7+
--------------------
38
**Improvements**
49
- Refactor `tasks.py` to utilize `sasctl.pzmm` functions.
510
- Add `model_info` class to better capture model information.
6-
- Test `/examples` Jupyter notebooks within normal test suite.
11+
12+
v1.10.5 (2024-08-01)
13+
--------------------
14+
**Buxfixes**
15+
- Updated `write_json_files.py` to allow for better support for prediction models
16+
- Fixed issues relating to model card support.
17+
18+
v1.10.4 (2024-07-08)
19+
--------------------
20+
**Improvements**
21+
- Added example Jupyter notebook for OpenAI models.
22+
23+
**Buxfixes**
24+
- Dropped support for Python 3.6 and Python 3.7, as those are no longer officially supported versions.
25+
- Added `dmcas_misc.json` template file for model card generation.
26+
- Updated generation of `ModelProperties.json` to allow for model card generation immediately upon upload.
27+
28+
v1.10.3 (2024-04-12)
29+
--------------------
30+
**Bugfixes**
31+
- Updated all examples to use current versions of sasctl functions
32+
- Fixed bug in `generate_model_card` that threw an error when trying to generate the `dmcas_misc.json` file
33+
34+
v1.10.2 (2024-04-10)
35+
--------------------
36+
**Improvements**
37+
- Introduced `generate_model_card` into `write_json_files.py` to allow for python models to work with planned model card tab in SAS Model Manager.
38+
39+
**Bugfixes**
40+
- Allow for score code to impute NaN values in tables that have been loaded into SAS Model Manager.
41+
- Fix issue where target_value was not being properly set during score code generation
42+
- Updated `pzmm_generate_requrirements_json.ipynb` so the requirements file is generated properly.
43+
- Added missing statistics to `dmcas_fitstat.json` file.
744

845
v1.10.1 (2023-08-24)
9-
----------
46+
--------------------
1047
**Improvements**
1148
- Introduced ability to specify the target index of a binary model when creating score code.
1249
- index can be specified in `pzmm.import_model.ImportModel.import_model()`
@@ -17,7 +54,7 @@ v1.10.1 (2023-08-24)
1754
- Added template files for `assess_model_bias.py` to allow for proper execution
1855

1956
v1.10 (2023-08-31)
20-
----------
57+
------------------
2158
**Improvements**
2259
- `write_score_code.py` refactored to include ability to run batch scoring.
2360
- Added handling for TensorFlow Keras models.
@@ -30,7 +67,7 @@ v1.10 (2023-08-31)
3067
- Updated `pzmm_custom_kpi_model_parameters` notebook to have correct parameter casing.
3168

3269
v1.9.4 (2023-06-15)
33-
----------
70+
-------------------
3471
**Improvements**
3572
- Created pytest fixture to begin running Jupyter notebooks within the GitHub automated test actions.
3673
- Updated examples:
@@ -44,7 +81,7 @@ v1.9.4 (2023-06-15)
4481
- Fixed call to `pzmm.JSONFiles.calculate_model_statistics()` in `pzmm_binary_classification_model_import.ipynb`.
4582

4683
v1.9.3 (2023-06-08)
47-
----------
84+
-------------------
4885
**Improvements**
4986
- Refactored gitIntegration.py to `git_integration.py` and added unit tests for better test coverage.
5087

@@ -57,7 +94,7 @@ v1.9.3 (2023-06-08)
5794
- 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.
5895

5996
v1.9.2 (2023-05-17)
60-
----------
97+
-------------------
6198
**Improvements**
6299
- Add recursive folder creation and an example.
63100
- Add example for migrating models from SAS Viya 3.5 to SAS Viya 4.
@@ -69,7 +106,7 @@ v1.9.2 (2023-05-17)
69106
- Fix minor errors in h2o score code generation
70107

71108
v1.9.1 (2023-05-04)
72-
----------
109+
-------------------
73110
**Improvements**
74111
- Updated handling of H2O models in `sasctl.pzmm`.
75112
- Models are now saved with the appropriate `h2o` functions within the `sasctl.pzmm.PickleModel.pickle_trained_model` function.
@@ -81,7 +118,7 @@ v1.9.1 (2023-05-04)
81118
- Added NpEncoder class to check for numpy values in JSON files. Numpy-types cannot be used in SAS Viya.
82119

83120
v1.9.0 (2023-04-04)
84-
----------
121+
-------------------
85122
**Improvements**
86123
- `sasctl.pzmm` refactored to follow PEP8 standards, include type hinting, and major expansion of code coverage.
87124
- `sasctl.pzmm` functions that can generate files can now run in-memory instead of writing to disk.
@@ -109,7 +146,7 @@ v1.8.2 (2023-01-30)
109146
- Better handling for invalid project versions included.
110147

111148
v1.8.1 (2023-01-19)
112-
----------
149+
-------------------
113150
**Changes**
114151
- Adjusted workflow for code coverage reporting. Prepped to add components in next release.
115152
- Added `generate_requirements_json.ipynb` example.

doc/api/services/report_images.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ sasctl.services.report_images
33

44
.. automodule:: sasctl._services.report_images
55
:members:
6-
:undoc-members:
6+
:undoc-members:
7+
:show-inheritance:

doc/api/services/reports.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ sasctl.services.reports
44
.. automodule:: sasctl._services.reports
55
:members:
66
:undoc-members:
7+
:show-inheritance:

doc/conf.py

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,32 @@
4444
"sphinx.ext.autodoc",
4545
"sphinx.ext.autosummary",
4646
"sphinx.ext.viewcode",
47-
"numpydoc", # "sphinx.ext.napoleon",
47+
"sphinx.ext.napoleon",
4848
"sphinx.ext.intersphinx",
4949
"sphinx.ext.todo",
5050
]
5151

5252
intersphinx_mapping = {
53-
"python": ("https://docs.python.org/3", None),
53+
"python": ("https://docs.python.org/3/", None),
54+
"pandas": ("https://pandas.pydata.org/docs/", None),
55+
"sklearn": ("https://scikit-learn.org/stable/", None),
56+
"numpy": ("https://numpy.org/doc/stable/", None),
5457
"swat": ("https://sassoftware.github.io/python-swat/", None),
5558
"pytest": ("https://docs.pytest.org/en/latest/", None),
5659
"betamax": ("https://betamax.readthedocs.io/en/latest/", None),
57-
"requests": ("https://2.python-requests.org/en/master/", None),
58-
"tox": ("https://tox.readthedocs.io/en/latest/", None),
59-
"flake8": ("http://flake8.pycqa.org/en/latest/", None),
60+
"requests": ("https://requests.readthedocs.io/en/latest/", None),
61+
"tox": ("https://tox.wiki/en/latest/", None),
62+
"flake8": ("https://flake8.pycqa.org/en/latest/", None),
6063
}
6164

6265
autosummary_generate = True
6366

67+
# Napoleon settings
68+
napoleon_google_docstring = False
69+
napoleon_numpy_docstring = True
70+
napoleon_use_ivar = True
71+
napoleon_use_rtype = False
72+
6473
todo_include_todos = True
6574

6675
todo_emit_warnings = True
@@ -92,6 +101,17 @@
92101
# The name of the Pygments (syntax highlighting) style to use.
93102
pygments_style = "sphinx"
94103

104+
# Suppress warnings 'py:class reference target not found: <type>'
105+
nitpicky = True
106+
nitpick_ignore = [
107+
('py:class','optional'),
108+
('py:class','json.encoder.JSONEncoder'), # I don't understand why it can't find it
109+
('py:class','Response'),
110+
('py:class','Request'),
111+
('py:class','_io.BytesIO'),
112+
('py:class','sasctl.utils.pymas.ds2.Ds2Variable'), # not sure what is wrong
113+
('py:class','sasctl._services.service.Service') # should the Service class be documented?
114+
]
95115

96116
# -- Options for HTML output -------------------------------------------------
97117

doc/index.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ sasctl
44

55
Version |version|
66

7-
.. toctree::
8-
:maxdepth: 3
9-
:hidden: true
10-
11-
index
127

138
Introduction
149
------------
@@ -313,7 +308,7 @@ Logging
313308
+++++++
314309

315310
All logging is handled through the built-in :mod:`logging` module with standard module-level loggers. The one exception
316-
to this is :class:`.Session` request/response logging. Sessions contain a :attr:`~sasctl.core.Session.message_log` which is exclusively used
311+
to this is :class:`.Session` request/response logging. Sessions contain a `message_log` which is exclusively used
317312
to record requests and responses made through the session. Message recording can be configured on a per-session basis
318313
by updating this logger, or the ``sasctl.core.session`` logger can be configured to control all message recording by all sessions.
319314

@@ -497,7 +492,7 @@ Python versions.
497492

498493
Useful Tox Commands
499494
+++++++++++++++++++
500-
:mod:`tox` is used to automate common development tasks such as testing, linting, and building documentation.
495+
:mod:`tox` is used to automate common development tasks such as testing, linting, and building documentation.
501496
Running :program:`tox` from the project root directory will automatically build virtual environments for all Python interpreters
502497
found on the system and then install the required packages necessary to perform a given task. The simplest way to run Tox is:
503498

examples/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Tasks and Services
3737
- [Modeling with Python & SAS AutoML](#modeling-with-python--sas-automl)
3838
- [Making direct REST API calls](#making-direct-rest-api-calls)
3939

40+
- [Register an Azure OpenAI GPT model using REST API calls](#register-an-azure-openai-gpt-model-using-rest-api-calls)
41+
4042
---
4143
Register binary classification models
4244
-------------------------------------
@@ -94,11 +96,11 @@ Generates a requirements.json file which includes the minimal number of dependen
9496

9597
Create and update custom model KPIs
9698
-----------------------------------
97-
Filename: [pzmm_custom_kpis.ipynb](pzmm_custom_kpis.ipynb)
99+
Filename: [pzmm_custom_kpis.ipynb](pzmm_custom_kpi_model_parameters.ipynb)
98100

99101
Level: Intermediate
100102

101-
Create and update custom model parameters and kpis on SAS Model Manager
103+
Create and update custom model parameters and kpis on SAS Model Manager.
102104

103105

104106
Register a SAS classification model
@@ -206,3 +208,11 @@ Level: Advanced
206208
Demonstrates using `sasctl` to make REST calls over HTTP(S) directly to the SAS microservices.
207209

208210
Use if you need to customize behavior or use functionality not yet exposed through higher-level `sasctl` functions.
211+
212+
Register an Azure OpenAI GPT Model Using REST API Calls
213+
--------------------------
214+
Filename: [register_Azure_OpenAI_model_using_REST_calls.ipynb](register_Azure_OpenAI_model_using_REST_calls.ipynb)
215+
216+
Level: Intermediate
217+
218+
Leverages a GPT-3.5-Turbo model from Azure OpenAI in SAS® Model Manager and SAS® Intelligent Decisioning.

0 commit comments

Comments
 (0)