mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-09-15 22:10:22 +00:00
Allow setting other handlers in the logging
This commit is contained in:
parent
b76ace9570
commit
f44285038c
3 changed files with 6 additions and 5 deletions
|
|
@ -17,7 +17,7 @@ import logging
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger('fbprophet')
|
||||||
|
|
||||||
|
|
||||||
def generate_cutoffs(df, horizon, initial, period):
|
def generate_cutoffs(df, horizon, initial, period):
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,10 @@ from fbprophet.plot import (
|
||||||
plot_seasonality,
|
plot_seasonality,
|
||||||
)
|
)
|
||||||
|
|
||||||
logging.basicConfig()
|
logger = logging.getLogger('fbprophet')
|
||||||
logger = logging.getLogger(__name__)
|
logger.addHandler(logging.NullHandler())
|
||||||
|
if len(logger.handlers) == 1:
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
|
|
||||||
class Prophet(object):
|
class Prophet(object):
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,8 @@ import pandas as pd
|
||||||
|
|
||||||
from fbprophet.diagnostics import performance_metrics
|
from fbprophet.diagnostics import performance_metrics
|
||||||
|
|
||||||
|
logger = logging.getLogger('fbprophet')
|
||||||
|
|
||||||
logging.basicConfig()
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from matplotlib import pyplot as plt
|
from matplotlib import pyplot as plt
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue