python/docs/source/reference/python_8110_900_migration_guide.md
You can do nothing and everything should still work when migrating to VW 9. But if you want to move to the new way to avoid deprecation warnings and future breaks here's a rundown.
Modules are now direcly accessible from the root module. In the past from vowpalwabbit import ... was needed, but now import vowpalwabbit and accessing with . will work.
pyvwThe old pyvw types are now available under the root module.
Instead of:
from vowpalwabbit import pyvw
Use:
import vowpalwabbit
And use the corresponding types exposed by {py:mod}vowpalwabbit instead of {py:mod}vowpalwabbit.pyvw.
{py:class}`vowpalwabbit.pyvw.SearchTask` is only available under {py:mod}`vowpalwabbit.pyvw` due to its advanced nature and less usage.
DFtoVWReplace any reference to the old module name DFtoVW with {py:mod}vowpalwabbit.dftovw.
sklearn_vwReplace any reference to the old module name sklearn_vw with {py:class}vowpalwabbit.sklearn.
vowpalwabbit.pyvw.vw with {py:class}vowpalwabbit.Workspacevowpalwabbit.pyvw.example with {py:class}vowpalwabbit.Examplevowpalwabbit.pyvw.example_namespace with {py:class}vowpalwabbit.ExampleNamespacevowpalwabbit.pyvw.namespace_id with {py:class}vowpalwabbit.NamespaceIdvowpalwabbit.pyvw.abstract_label with {py:class}vowpalwabbit.AbstractLabelvowpalwabbit.pyvw.simple_label with {py:class}vowpalwabbit.SimpleLabelvowpalwabbit.pyvw.multiclass_label with {py:class}vowpalwabbit.MulticlassLabelvowpalwabbit.pyvw.multiclass_probabilities_label with {py:class}vowpalwabbit.MulticlassProbabilitiesLabelvowpalwabbit.pyvw.cost_sensitive_label with {py:class}vowpalwabbit.CostSensitiveLabelvowpalwabbit.pyvw.cbandits_label with {py:class}vowpalwabbit.CBLabelget_predictionInstead of calling the free function {py:func}vowpalwabbit.pyvw.get_prediction call {py:meth}vowpalwabbit.Example.get_prediction on an {py:class}vowpalwabbit.Example instance.
vowpalwabbit.pyvw.pylibvw.vw.pSCALAR use the corresponding value in {py:class}vowpalwabbit.PredictionTypevowpalwabbit.pyvw.pylibvw.vw.lSimple use the corresponding value in {py:class}vowpalwabbit.LabelType
vowpalwabbit.pyvw.pylibvw.vw.lBinary use {py:obj}vowpalwabbit.LabelType.SCALARvowpalwabbit.pyvw.pylibvw.vw.lDefault use a value of Nonevowpalwabbit.pyvw.pylibvw.vw.lMax did not have a corresponding typevowpalwabbit.Example.get_label, you should change the parameter from a class type to a {py:class}vowpalwabbit.LabelType.vowpalwabbit.AbstractLabel.from_example. This has changed from a method on an existing instance to a static factory function which accepts an {py:class}vowpalwabbit.Example and returns an instance of the correspodning label type. Using {py:meth}vowpalwabbit.Example.get_label is preferred.The first argument of {py:meth}vowpalwabbit.ExampleNamespace.push_features was removed as it was not needed and unused. Using two arguments is deprecated, to fix the callsites remove the first argument.