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

Older examples needs to be updated for JSONFiles API changes #178

Open
pebblehut opened this issue Sep 7, 2023 · 1 comment
Open

Older examples needs to be updated for JSONFiles API changes #178

pebblehut opened this issue Sep 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@pebblehut
Copy link

Describe the issue
This example has some API calls that don't work with the updated version of sasctl - changes to JSONFiles:
https://github.com/sassoftware/python-sasctl/blob/master/examples/pzmmCompleteModelExampleMLFlowSklearn.ipynb

For example, writeModelPropertiesJSON is now write_model_properties_json and has many changes in the parameters.

Other examples:
writeFileMetadataJSON
writeVarJSON

I checked other examples and it seems any of them 6 months or older are now out of date with the newer sasctl API.

To Reproduce
Run this command using latest sasctl

J.writeVarJSON(inputsDict, isInput=True, jPath=zipFolder)

and you will get things like

AttributeError: 'JSONFiles' object has no attribute 'writeVarJSON'. Did you mean: 'write_var_json'?

Version
The SHA is 729e72c

@pebblehut pebblehut added the bug Something isn't working label Sep 7, 2023
@SilvestriStefano
Copy link
Contributor

Hello,
I was going through the notebook mentioned above and I noticed that more things have changed since sasctl v1.8.2:

  • writeVarJSON() has been renamed write_var_json();
  • writeModelPropertiesJSON() has been renamed write_model_properties_json();
  • writeFileMetadataJSON() has been renamed write_file_metadata_json();

also for each of those methods some parameters have a different name and use snake-case instead of camel-case.
Moreover, the parameters of writeModelPropertiesJSON() used in the notebook do not all match the ones in write_model_properties_json() :

  • targetEvent:int and numTargetCategories:int do not exists anymore, I think they have been substituted with target_values:list
  • eventProbVar i believe has also been removed because it is handled in the code directly
  • modelType is now model_algorithm
  • modelPredictors has been removed

I will update if I find more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants