Skip to content

Commit fc31e00

Browse files
authored
glm module deprecation warning (#4677)
* add warning message about glm module deprecation * update deprecation message with version
1 parent 0ff9e9b commit fc31e00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pymc3/glm/linear.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
import logging
1415

1516
import numpy as np
1617
import theano.tensor as tt
@@ -20,6 +21,7 @@
2021
from pymc3.glm.utils import any_to_tensor_and_labels
2122
from pymc3.model import Deterministic, Model
2223

24+
_log = logging.getLogger("pymc3")
2325
__all__ = ["LinearComponent", "GLM"]
2426

2527

@@ -216,6 +218,10 @@ def from_formula(
216218
See `patsy.dmatrix` and `patsy.EvalEnvironment` for details.
217219
Other arguments are documented in the constructor.
218220
"""
221+
_log.warning(
222+
"The glm module is deprecated and will be removed in version 4.0\nWe recommend to"
223+
+ " instead use Bambi https://bambinos.github.io/bambi/"
224+
)
219225
import patsy
220226

221227
eval_env = patsy.EvalEnvironment.capture(eval_env, reference=1)

0 commit comments

Comments
 (0)