update `ptype_data` to `prototype_data` by isabelizimm · Pull Request #138 · rstudio/vetiver-python · GitHub
Skip to content

update ptype_data to prototype_data#138

Merged
isabelizimm merged 9 commits into
mainfrom
prototype
Dec 19, 2022
Merged

update ptype_data to prototype_data#138
isabelizimm merged 9 commits into
mainfrom
prototype

Conversation

@isabelizimm

Copy link
Copy Markdown
Contributor

in parity with rstudio/vetiver-r#84 and rstudio/vetiver-r#166

This PR deprecates the ptype_data argument in favor of prototype_data.

VetiverModel(model, "my_model", ptype_data = X_train)

Will result in:
Deprecation warning: argument for saving input data prototype has changed to save_prototype, from save_ptype

The argument name change is not reflected in functions such as vetiver_create_ptype that are almost exclusively used in programmatic model creation.

Comment thread vetiver/server.py Outdated
@isabelizimm isabelizimm marked this pull request as ready for review December 15, 2022 15:19

@juliasilge juliasilge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a couple of things that I had questioned about, but looking great! 🙌

Comment thread vetiver/pin_read_write.py Outdated
Comment thread vetiver/server.py Outdated
Comment thread vetiver/tests/test_sklearn.py Outdated

@has2k1 has2k1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary, two main points.

  1. Any reference to ptype should be associated with the deprecated name.
  2. Tackle the other confusion that the ptype (now prototype) is also "model".

Comment thread vetiver/vetiver_model.py Outdated
Comment thread vetiver/handlers/torch.py Outdated
Comment thread vetiver/server.py Outdated
Comment thread vetiver/server.py Outdated
Comment thread vetiver/vetiver_model.py Outdated
Comment thread vetiver/ptype.py Outdated
Comment thread vetiver/ptype.py
Comment thread vetiver/vetiver_model.py Outdated
@isabelizimm isabelizimm merged commit 612d957 into main Dec 19, 2022
@isabelizimm isabelizimm deleted the prototype branch May 25, 2023 16:57
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.

3 participants