Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev v1.7 #61

Draft
wants to merge 47 commits into
base: master
Choose a base branch
from
Draft

Dev v1.7 #61

wants to merge 47 commits into from

Conversation

jlwalke2
Copy link
Collaborator

No description provided.

jlwalke2 and others added 4 commits April 13, 2020 22:12
* compare_models functionality

* roc and lift base

* added templates

* Dev v1.5 (#53)

* include python 3.8

* fix KeyError

* fix KeyError

* remove lightgbm restriction

* disable checks for Py3.8

* versionadded

* custom wrapper function name

* wrappers for sklearn methods

* drop class inheritance from object to avoid @wraps error in 2.7

* Revert "drop class inheritance from object to avoid @wraps error in 2.7"

This reverts commit 0259e46

* updated target code

* updated predict_proba output

* moved pymas setup to package init()

* fix for py27

* multiple wrapped functions

* remove double counted vars

* updated target

* no return code/message by default

* prep for release

* content-type during file uploads

* specify response format

* cleanup

* cleanup

* allow rc and msg in output variables

* added tests

* fixed binary file content

* added relationships service

* added cassette

* determine algorithm

* improved metadata from astore

* added neural net

* added svm

* binary gradboost model

* added bayes net

* cleanup

* improved astore registration

* added reports and report_images service

* added reports and report_images service

* enable testing against live server

* moved dataset fixtures

* explicitly load table

* explicitly load table

* cleanup

* fixed case

* cleanup for live tests

* change score() to predict()

* cleanup

* assorted bugfixes & refreshed cassettes

* added pagingiterator

* require futures for py27

* updated requirements in docs

* test PagingIterator

* test param combinations

* update doc

* fixed performance task

* refactoring for PagedList implementation

* fixes for py27

* add iterator next() methods for py27

* py27 compatibility

* debug

* debug

* debug

* implement __getslice__

* cleanup

* py27 compatibility

* PagedList changes

* cleanup & assorted fixes

* added example data

* enable passing dataframes and arrays directly to module steps

* bug fix

* pass pd.Series instance

* added dataset readme

* drop .sas file extensions

* test JSON output from CLI

* add --format option

* fixed error formatting

* improved parsing of target level

* improved parsing of target level

* CLI improvements

* handle single-row dataframe input

* recoded astore pipeline

* sklearn pipeline

* verify unpickle

* render individual elements

* activate deepsource

* release file handles

* add tests

* cleanup

* cleanup

* cleanup

* cleanup

* code qual updates

* remove list comprehension

* code quality

* code quality

* code quality

* fix len() comparisons

* code qual

* code qual

* perf improvements

* cleanup

* cleanup

* refresh cassettes

* ignore private files

* ds2 package constructor

* bug fix

* skip mas publish

* add cassette

* code qual improvements

* code qual improvements

* code qual improvements

* fix for py27

* check swat build

* fix py27 error

* check pandas compatibility

* code qual improvements

* code qual improvements

* code qual improvements

* consistent project creation in register_model

* fix KeyErrors

* fixed delete_destination

* cleanup

* cleanup

* include basic REST functions

* add iris dataset

* use local dataset

* fix astore model inputs

* cleanup

* updated pymas wrapper

* convert numpy values to scalar

* do not wrap predict_proba method by default.

* handle string and numeric outputs

* handle predict_proba methods.  deprecated return_msg and return_code.

* updated targets

* fixed tests

* fixed formatting

* fixed formatting

* code quality

* fixed astore example

* fixed full lifecycle example

* test sklearn classification model

* any valid classification

* code quality

* code quality

* fix for py 2.7

* added SGF examples

* updated for py27

* initial draft

* record cassettes for scenarios

* initial draft

* trim spaces

* suppress pickle warnings

* renamed files

* updated list_folders example

* HATEOAS section

* skipcq

* cleanup

* enabled additional tests

* enable tests on non-master branches

* prep for release

* cleanup perf issues

* cleanup

* spelling corrections

* rename to 'metrics'

* added testing

* updates to roc calculations

* cleanup

* calc lift statistics (incomplete)

* refactored to sasctl.utils.metrics

* working lift stats

* additional testing for lift stats

* test fit stats for binary classification

* test fit stats with numpy arrays

* compute roc statistics

* working fit stats for regression & binary classificatio

* updated for py27

* updated for py27

* bug fixes

Co-authored-by: ivnard <ivan.nardini@sas.com>
Co-authored-by: teoland <45943823+teoland@users.noreply.github.com>
Co-authored-by: IvanNardini <48505268+IvanNardini@users.noreply.github.com>
…into dev-v1.6

# Conflicts:
#	.travis.yml
#	CHANGELOG.md
#	examples/register_scikit_regression_model.py
#	src/sasctl/__init__.py
#	src/sasctl/tasks.py
#	src/sasctl/utils/pymas/core.py
#	tests/cassettes/tests.integration.test_astore_models.test_bayesnet_binary_classification_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_bayesnet_classification_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_forest_classification_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_forest_regression_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_glm_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_gradboost_binary_classification_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_gradboost_classification_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_gradboost_regression_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_logistic_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_neuralnet_regression_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_svm_classification_swat.json
#	tests/cassettes/tests.integration.test_astore_models.test_svm_regression_swat.json
#	tests/integration/test_astore_models.py
#	tests/integration/test_pymas.py
@codecov
Copy link

codecov bot commented Apr 14, 2020

Codecov Report

Merging #61 (02b6e3f) into master (f18bf54) will increase coverage by 2.44%.
The diff coverage is 78.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
+ Coverage   69.14%   71.59%   +2.44%     
==========================================
  Files          49       52       +3     
  Lines        3828     4305     +477     
==========================================
+ Hits         2647     3082     +435     
- Misses       1181     1223      +42     
Impacted Files Coverage Δ
src/sasctl/tasks.py 77.56% <53.33%> (-7.15%) ⬇️
src/sasctl/utils/pymas/python.py 86.59% <66.66%> (-6.59%) ⬇️
src/sasctl/utils/models.py 69.33% <69.33%> (ø)
src/sasctl/_services/ml_pipeline_automation.py 70.58% <70.58%> (ø)
src/sasctl/utils/pymas/ds2.py 86.72% <86.53%> (+8.21%) ⬆️
src/sasctl/utils/metrics.py 88.06% <88.06%> (ø)
src/sasctl/utils/pymas/core.py 92.00% <91.22%> (+1.55%) ⬆️
src/sasctl/__init__.py 100.00% <100.00%> (ø)
src/sasctl/services.py 100.00% <100.00%> (ø)
src/sasctl/utils/pymas/__init__.py 100.00% <100.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f18bf54...02b6e3f. Read the comment docs.

jlwalke2 and others added 13 commits December 9, 2020 12:51
pickleTrainedModel should be static not object-bound.
Fixed errors in docstring.
Adjusted docstrings and converted some methods to static.
…into dev-v1.6

# Conflicts:
#	CHANGELOG.md
#	src/sasctl/pzmm/pickleModel.py
#	src/sasctl/pzmm/writeScoreCode.py
#	src/sasctl/pzmm/zipModel.py
* include python 3.8

* fix KeyError

* fix KeyError

* remove lightgbm restriction

* disable checks for Py3.8

* versionadded

* custom wrapper function name

* wrappers for sklearn methods

* drop class inheritance from object to avoid @wraps error in 2.7

* Revert "drop class inheritance from object to avoid @wraps error in 2.7"

This reverts commit 0259e46

* updated target code

* updated predict_proba output

* moved pymas setup to package init()

* fix for py27

* multiple wrapped functions

* remove double counted vars

* updated target

* no return code/message by default

* prep for release

* content-type during file uploads

* specify response format

* cleanup

* cleanup

* allow rc and msg in output variables

* added tests

* fixed binary file content

* added relationships service

* added cassette

* determine algorithm

* improved metadata from astore

* added neural net

* added svm

* binary gradboost model

* added bayes net

* cleanup

* improved astore registration

* added reports and report_images service

* added reports and report_images service

* enable testing against live server

* moved dataset fixtures

* explicitly load table

* explicitly load table

* cleanup

* fixed case

* cleanup for live tests

* change score() to predict()

* cleanup

* assorted bugfixes & refreshed cassettes

* added pagingiterator

* require futures for py27

* updated requirements in docs

* test PagingIterator

* test param combinations

* update doc

* fixed performance task

* refactoring for PagedList implementation

* fixes for py27

* add iterator next() methods for py27

* py27 compatibility

* debug

* debug

* debug

* implement __getslice__

* cleanup

* py27 compatibility

* PagedList changes

* cleanup & assorted fixes

* added example data

* enable passing dataframes and arrays directly to module steps

* bug fix

* pass pd.Series instance

* added dataset readme

* drop .sas file extensions

* test JSON output from CLI

* add --format option

* fixed error formatting

* improved parsing of target level

* improved parsing of target level

* CLI improvements

* handle single-row dataframe input

* recoded astore pipeline

* sklearn pipeline

* verify unpickle

* render individual elements

* activate deepsource

* release file handles

* add tests

* cleanup

* cleanup

* cleanup

* cleanup

* code qual updates

* remove list comprehension

* code quality

* code quality

* code quality

* fix len() comparisons

* code qual

* code qual

* perf improvements

* cleanup

* cleanup

* refresh cassettes

* ignore private files

* ds2 package constructor

* bug fix

* skip mas publish

* add cassette

* code qual improvements

* code qual improvements

* code qual improvements

* fix for py27

* check swat build

* fix py27 error

* check pandas compatibility

* code qual improvements

* code qual improvements

* code qual improvements

* consistent project creation in register_model

* fix KeyErrors

* fixed delete_destination

* cleanup

* cleanup

* include basic REST functions

* add iris dataset

* use local dataset

* fix astore model inputs

* cleanup

* first draft

* test project creation

* services consistently define classmethods

* fixed service discovery

* cleanup

* build_pipeline

* added cas_management.upload_file

* support uploading of local files

* updated pymas wrapper

* session.to_swat()

* convert numpy values to scalar

* do not wrap predict_proba method by default.

* handle string and numeric outputs

* handle predict_proba methods.  deprecated return_msg and return_code.

* updated targets

* fixed tests

* fixed formatting

* fixed formatting

* code quality

* fixed astore example

* fixed full lifecycle example

* test sklearn classification model

* any valid classification

* code quality

* code quality

* fix for py 2.7

* raise exception if service unavailable

* cleanup

* override server in Session.to_swat()

* added to_swat()

* DLPy example

* fixed regression tests

* docstring fix

* bugfix & prep for 1.5.5

* tweaked optional dependencies

* Adding a New Example Notebook (#85)

* Adding New Example Notebook

I am adding a new example notebook that walks through creating models in SWAT and XGBOOST and then using SASCTL and PZMM to create the appropriate metadata before pushing everything into Model Manager. This notebook was designed for Viya 2020 environments.

* Adding data for example

* Adding notebook with requested changes

-Changed /Data to /data
-Swapped code in SWAT Model Manager function with suggested code

* added readme for examples

* improve paging when server count is approximate

* rough draft

* pzmm updates (#87)

* Merge 4075/4083 commits from OMMR

* Adjust pzmm zipping method to output iofile.

* Remove now-redundant pzmm model upload process.

* Edit notebook example to leverage sasctl framework.

* Adjust dmcas writers doc_strings to state acceptance of dataframe, array, or list

* First attempt to change dmcas_fitstat writer to accept more data types.

* added Session.as_swat()

* updated docs

* test as_swat()

* Combine Lift/ROC chart generation into one call.

* Spell transpose correctly and remove unused functions.

* Remove uploadData from init statement.

* Include empty ROC and Lift dmcas JSON files in installation.

* Lowercase all references to pzmm.

* Add empty dmcas lift/roc JSON files.

* Add missing null roc json file.

* Final dev updates to Lift/ROC chart fixes.

* custom get_repository() method to ignore 403 errors.  Improved efficiency for default_repository()

* Adjust score code for invalid column names/values.

* Fix missing numpy package in writeScoreCode

* Fix isidentifer error with improper type.

* Add error for no data provided in calculateFitStat

* Fix dataframe input for generateROCLiftStat()

* Update example notebook to include new features

* Adjust protocol for Session object.

* Fix error in generating ROC/LIFT charts.

* Update example notebook and outputs.

* Fix overwritten model object on repeat runs.

* Adjust text to documentation standards.

* Remove sas server names from example before GitHub release.

* include docs and examples

* additional example

* Merge from Github

* Fix missing argument in pickle and zipping calls.

* refreshed cassettes

* refreshed cassettes

* refreshed cassettes

* temporary disable regression test

* temporary disable regression test

* correctly mock default repo

* fix tests

* fixed cli command for get_repository

* Update changelog.md

* prep for release

* Adjust score code for invalid column names/values.

* Fix missing numpy package in writeScoreCode

* Fix isidentifer error with improper type.

* Merge 4075/4083 commits from OMMR

* Adjust dmcas writers doc_strings to state acceptance of dataframe, array, or list

* First attempt to change dmcas_fitstat writer to accept more data types.

* custom get_repository() method to ignore 403 errors.  Improved efficiency for default_repository()

* Adjust protocol for Session object.

* Update example notebook and outputs.

* Fix overwritten model object on repeat runs.

* Adjust text to documentation standards.

* Adjust score code for invalid column names/values.

* Fix missing numpy package in writeScoreCode

* Fix isidentifer error with improper type.

* Adjust score code for invalid column names/values.

* Fix missing numpy package in writeScoreCode

* Fix isidentifer error with improper type.

* Change writeScoreCode intercept default behavior

* writeScoreCode should handle non-binary targets

* Add software version checking API call and task.

* Added MM version check to writeScoreCode().

* Add DS2 wrapper function to writeScoreCode.py

* Include future API builds for Viya 4.0

* Add API call to move Python score resources.

* Fix doc_string errors.

* Add f(x) to upload/copy pzmm Python/DS2 score code

* Include upload/copy score code in writeScore()

* Fix indentation error

* First run of testing new copy/upload task.

* Fix incorrect role assignment of pickle file.

* Add headers to PUT scoreResources API call.

* Adjust version to differentiate between main/dev versions.

* Handle case of Viya 3.5 & no model provided.

* General fixes to DS2 converter.

* Fix dtype vs string error.

* Call ds2 wrapper endpoint and adjust writeScoreCode.

* Add mojo model file handling to PickelModel.

* Add H2O option to writeFileMetaData.

* Add mojo file to zippable files

* Fix astore vs Python typo

* Add new import file to handle model imports and adjust init file

* Adjust examples and create new simple/h2o notebooks

* Include single row csv for testing

* Major update to writeScoreCode

* Final modification to writeScoreCode & new notebooks

* Edit notebook to remove unused cells

* Fix pathing and .zip errors in H2O example

* Fix trailing .zip

* Include default method for scoring/validating in CAS for Viya 3.5 users.

* Required *.sas files for scoring in CAS/MAS

* Remove reference to uncommitted feature

* Bug fixes for CAS wrapper and documentation

* Delete FleetManagementSimple.ipynb

* Update FleetManagementSimpleH2O.ipynb

* Update H2OModelFleetMaintenance.ipynb

* Adjust to new handling of model importing

* Delete fleet_maintenance.csv

* Update change to CSV files

* Update H2OModelFleetMaintenance.ipynb

* Update README.md

* moved get_software_version() to platform_version()

* removed f strings for compatibility

* bugfix

* remove f strings

* removed duplicate method

Co-authored-by: Scott Lindauer <Scott.Lindauer@sas.com>
Co-authored-by: Scott Lindauer <60105574+smlindauer@users.noreply.github.com>

* test platform_version

* migrated new tasks

* prep for release

* gh-action test

* rough draft

* updated doc folder

* cleanup actions

* default sphinx build

* prep for release

* check platform_version()

* codecov badge

* html fix

* html fix

* cleanup

* install from source link

* fixed import

* prep for release

* 1.5.7 update

* install from source link

* drop regression testing on py34.  codecov no longer supports.

* syntax: fixed decorators

* code cleanup

* syntax: py27

* update test envs

* fix py39 env

* drop py27 support

* drop py39

* removed notebook test

Co-authored-by: Sophia Rowland <sophiarowland@outlook.com>
Co-authored-by: Scott Lindauer <Scott.Lindauer@sas.com>
Co-authored-by: Scott Lindauer <60105574+smlindauer@users.noreply.github.com>
# Conflicts:
#	CHANGELOG.md
#	src/sasctl/__init__.py
#	src/sasctl/core.py
#	src/sasctl/pzmm/writeScoreCode.py
#	src/sasctl/pzmm/zipModel.py
#	src/sasctl/tasks.py
@jlwalke2 jlwalke2 self-assigned this May 11, 2021
@jlwalke2 jlwalke2 changed the title Dev v1.6 Dev v1.7 Aug 18, 2021
…are/python-sasctl into dev-v1.6

# Conflicts:
#	.travis.yml
#	README.md
#	src/sasctl/__init__.py
#	src/sasctl/_services/cas_management.py
#	src/sasctl/_services/concepts.py
#	src/sasctl/_services/data_sources.py
#	src/sasctl/_services/folders.py
#	src/sasctl/_services/microanalytic_score.py
#	src/sasctl/_services/projects.py
#	src/sasctl/_services/service.py
#	src/sasctl/core.py
#	src/sasctl/pzmm/writeJSONFiles.py
#	src/sasctl/services.py
#	src/sasctl/tasks.py
#	src/sasctl/utils/pymas/__init__.py
#	src/sasctl/utils/pymas/core.py
#	src/sasctl/utils/pymas/ds2.py
#	src/sasctl/utils/pymas/python.py
#	tests/integration/test_pymas.py
#	tests/unit/test_pymas.py
#	tox.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant