Skip to content

Exception: 'tqdm_asyncio' object has no attribute 'postfix' #887

Description

@johann-petrak

I just got this very unexpected exception:

    super().fit(df, sampling_temperature=sampling_temperature, **kwargs)
  File "/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/forecaster/forecaster.py", line 164, in fit
    _posterior_samples, training_metrics = estimator.fit(
                                           ^^^^^^^^^^^^^^
  File "/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/orbit/estimators/stan_estimator.py", line 143, in fit
    stan_mcmc_fit = compiled_mod.sample(
                    ^^^^^^^^^^^^^^^^^^^^
  File "/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/cmdstanpy/model.py", line 1098, in sample
    progress_hook("Done", -1)  # -1 == all chains finished
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/johann/software/anaconda/envs/sipfront/lib/python3.11/site-packages/cmdstanpy/model.py", line 2155, in progress_hook
    pbar.postfix[0]["value"] = 'Sampling completed'
    ^^^^^^^^^^^^
AttributeError: 'tqdm_asyncio' object has no attribute 'postfix'

This happens when using

os.environ['TQDM_DISABLE'] = '1'

before importing orbit modules in an attempt to disable those annotying progress bars. As far as I know setting this environment variable is a standard way to disable the output and seems to be the only way as orbit does not have any setting to do it in some other way. So when that environment variable is set, orbit should definitely NOT crash.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions