Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolarisHubSettings does not play well with other .env files #201

Closed
ThomasRochefortB opened this issue Sep 19, 2024 · 1 comment · Fixed by #216
Closed

PolarisHubSettings does not play well with other .env files #201

ThomasRochefortB opened this issue Sep 19, 2024 · 1 comment · Fixed by #216
Assignees
Labels
bug Something isn't working

Comments

@ThomasRochefortB
Copy link

Polaris version

0.7.9

Python Version

3.12.5

Operating System

MacOS

Installation

Micromamba

Description

Hello!

I am running polaris from a directory that has a .env file to store other API keys. When I try to do so, the PolarisHubSettings class is trying to read from the .env file and throws the error:

ValidationError: 3 validation errors for PolarisHubSettings
is_local
  Extra inputs are not permitted [type=extra_forbidden, input_value='true', input_type=str]
    For further information visit https://errors.pydantic.dev/2.9/v/extra_forbidden
wandb_api_key
  Extra inputs are not permitted [type=extra_forbidden, input_value='wandb_api_key_obfuscated', input_type=str]
    For further information visit https://errors.pydantic.dev/2.9/v/extra_forbidden
model_name
  Extra inputs are not permitted [type=extra_forbidden, input_value='model-v0', input_type=str]
    For further information visit https://errors.pydantic.dev/2.9/v/extra_forbidden

This is caused by pydantic which by default does not allow extra argument.

I am going around this problem by moving directory or moving the .env file before using Polaris.

Thank you for the help!

Steps to reproduce

Write a .env file with some random stuff/ fake API keys.
Run polaris login from this folder.

Additional output

 Name                              Version       Build                 Channel    
─────────────────────────────────────────────────────────────────────────────────────
 annotated-types                   0.7.0         pyhd8ed1ab_0          conda-forge
 anyio                             4.4.0         pyhd8ed1ab_0          conda-forge
 asciitree                         0.3.3         py_2                  conda-forge
 authlib                           1.3.0         pyhd8ed1ab_0          conda-forge
 aws-c-auth                        0.7.31        hc27b277_0            conda-forge
 aws-c-cal                         0.7.4         h41dd001_1            conda-forge
 aws-c-common                      0.9.28        hd74edd7_0            conda-forge
 aws-c-compression                 0.2.19        h41dd001_1            conda-forge
 aws-c-event-stream                0.4.3         h40a8fc1_2            conda-forge
 aws-c-http                        0.8.10        hf5a2c8c_0            conda-forge
 aws-c-io                          0.14.18       hc3cb426_9            conda-forge
 aws-c-mqtt                        0.10.5        h3acc7b9_1            conda-forge
 aws-c-s3                          0.6.5         hd16c091_7            conda-forge
 aws-c-sdkutils                    0.1.19        h41dd001_3            conda-forge
 aws-checksums                     0.1.20        h41dd001_0            conda-forge
 aws-crt-cpp                       0.28.3        hfd2b498_3            conda-forge
 aws-sdk-cpp                       1.11.379      h0455a66_11           conda-forge
 azure-core-cpp                    1.13.0        hd01fc5c_0            conda-forge
 azure-identity-cpp                1.8.0         h13ea094_2            conda-forge
 azure-storage-blobs-cpp           12.12.0       hfde595f_0            conda-forge
 azure-storage-common-cpp          12.7.0        hcf3b6fd_1            conda-forge
 azure-storage-files-datalake-cpp  12.11.0       h082e32e_1            conda-forge
 brotli                            1.1.0         hd74edd7_2            conda-forge
 brotli-bin                        1.1.0         hd74edd7_2            conda-forge
 brotli-python                     1.1.0         py312hde4cb15_2       conda-forge
 bzip2                             1.0.8         h99b78c6_7            conda-forge
 c-ares                            1.33.1        hd74edd7_0            conda-forge
 ca-certificates                   2024.8.30     hf0a4a13_0            conda-forge
 cairo                             1.18.0        hb4a6bf7_3            conda-forge
 certifi                           2024.8.30     pyhd8ed1ab_0          conda-forge
 cffi                              1.17.1        py312h0fad829_0       conda-forge
 chardet                           5.2.0         py312h81bd7bf_2       conda-forge
 charset-normalizer                3.3.2         pyhd8ed1ab_0          conda-forge
 click                             8.1.7         unix_pyh707e725_0     conda-forge
 colorama                          0.4.6         pyhd8ed1ab_0          conda-forge
 contourpy                         1.3.0         py312h6142ec9_1       conda-forge
 cryptography                      43.0.1        py312h3ddc590_0       conda-forge
 cycler                            0.12.1        pyhd8ed1ab_0          conda-forge
 datamol                           0.12.5        pyhd8ed1ab_0          conda-forge
 exceptiongroup                    1.2.2         pyhd8ed1ab_0          conda-forge
 expat                             2.6.3         hf9b8971_0            conda-forge
 fasteners                         0.17.3        pyhd8ed1ab_0          conda-forge
 filelock                          3.16.0        pyhd8ed1ab_0          conda-forge
 font-ttf-dejavu-sans-mono         2.37          hab24e00_0            conda-forge
 font-ttf-inconsolata              3.000         h77eed37_0            conda-forge
 font-ttf-source-code-pro          2.038         h77eed37_0            conda-forge
 font-ttf-ubuntu                   0.83          h77eed37_2            conda-forge
 fontconfig                        2.14.2        h82840c6_0            conda-forge
 fonts-conda-ecosystem             1             0                     conda-forge
 fonts-conda-forge                 1             0                     conda-forge
 fonttools                         4.53.1        py312h024a12e_1       conda-forge
 freetype                          2.12.1        hadb7bae_2            conda-forge
 freetype-py                       2.3.0         pyhd8ed1ab_0          conda-forge
 fsspec                            2024.9.0      pyhff2d567_0          conda-forge
 gflags                            2.2.2         hf9b8971_1005         conda-forge
 glog                              0.7.1         heb240a5_0            conda-forge
 greenlet                          3.1.0         py312hde4cb15_2       conda-forge
 h11                               0.14.0        pyhd8ed1ab_0          conda-forge
 h2                                4.1.0         pyhd8ed1ab_0          conda-forge
 hpack                             4.0.0         pyh9f0ad1d_0          conda-forge
 httpcore                          1.0.5         pyhd8ed1ab_0          conda-forge
 httpx                             0.27.2        pyhd8ed1ab_0          conda-forge
 hyperframe                        6.0.1         pyhd8ed1ab_0          conda-forge
 icu                               75.1          hfee45f7_0            conda-forge
 idna                              3.10          pyhd8ed1ab_0          conda-forge
 importlib_resources               6.4.5         pyhd8ed1ab_0          conda-forge
 joblib                            1.4.2         pyhd8ed1ab_0          conda-forge
 kiwisolver                        1.4.7         py312h6142ec9_0       conda-forge
 krb5                              1.21.3        h237132a_0            conda-forge
 lcms2                             2.16          ha0e7c42_0            conda-forge
 lerc                              4.0.0         h9a09cb3_0            conda-forge
 libabseil                         20240116.2    cxx17_h00cdb27_1      conda-forge
 libarrow                          17.0.0        h3ba790a_15_cpu       conda-forge
 libarrow-acero                    17.0.0        hf9b8971_15_cpu       conda-forge
 libarrow-dataset                  17.0.0        hf9b8971_15_cpu       conda-forge
 libarrow-substrait                17.0.0        hbf8b706_15_cpu       conda-forge
 libblas                           3.9.0         23_osxarm64_openblas  conda-forge
 libboost                          1.84.0        h29978a0_6            conda-forge
 libboost-python                   1.84.0        py312h707656b_6       conda-forge
 libbrotlicommon                   1.1.0         hd74edd7_2            conda-forge
 libbrotlidec                      1.1.0         hd74edd7_2            conda-forge
 libbrotlienc                      1.1.0         hd74edd7_2            conda-forge
 libcblas                          3.9.0         23_osxarm64_openblas  conda-forge
 libcrc32c                         1.1.2         hbdafb3b_0            conda-forge
 libcurl                           8.10.0        h13a7ad3_0            conda-forge
 libcxx                            18.1.8        h3ed4263_7            conda-forge
 libdeflate                        1.21          h99b78c6_0            conda-forge
 libedit                           3.1.20191231  hc8eb9b7_2            conda-forge
 libev                             4.33          h93a5062_2            conda-forge
 libevent                          2.1.12        h2757513_1            conda-forge
 libexpat                          2.6.3         hf9b8971_0            conda-forge
 libffi                            3.4.2         h3422bc3_5            conda-forge
 libgfortran                       5.0.0         13_2_0_hd922786_3     conda-forge
 libgfortran5                      13.2.0        hf226fd6_3            conda-forge
 libglib                           2.80.3        h59d46d9_2            conda-forge
 libgoogle-cloud                   2.29.0        hfa33a2f_0            conda-forge
 libgoogle-cloud-storage           2.29.0        h90fd6fa_0            conda-forge
 libgrpc                           1.62.2        h9c18a4f_0            conda-forge
 libiconv                          1.17          h0d3ecfb_2            conda-forge
 libintl                           0.22.5        h8414b35_3            conda-forge
 libjpeg-turbo                     3.0.0         hb547adb_1            conda-forge
 liblapack                         3.9.0         23_osxarm64_openblas  conda-forge
 libnghttp2                        1.58.0        ha4dd798_1            conda-forge
 libopenblas                       0.3.27        openmp_h517c56d_1     conda-forge
 libparquet                        17.0.0        hf0ba9ef_15_cpu       conda-forge
 libpng                            1.6.44        hc14010f_0            conda-forge
 libpq                             16.4          h671472c_1            conda-forge
 libprotobuf                       4.25.3        hbfab5d5_0            conda-forge
 librdkit                          2024.03.5     h54a62e4_3            conda-forge
 libre2-11                         2023.09.01    h7b2c953_2            conda-forge
 libsqlite                         3.46.1        hc14010f_0            conda-forge
 libssh2                           1.11.0        h7a5bd25_0            conda-forge
 libthrift                         0.20.0        h64651cc_1            conda-forge
 libtiff                           4.6.0         hf8409c0_4            conda-forge
 libutf8proc                       2.8.0         h1a8c8d9_0            conda-forge
 libwebp-base                      1.4.0         h93a5062_0            conda-forge
 libxcb                            1.16          hc9fafa5_1            conda-forge
 libxml2                           2.12.7        h01dff8b_4            conda-forge
 libzlib                           1.3.1         hfb2fe0b_1            conda-forge
 llvm-openmp                       18.1.8        hde57baf_1            conda-forge
 loguru                            0.7.2         py312h81bd7bf_2       conda-forge
 lz4-c                             1.9.4         hb7217d7_0            conda-forge
 markdown-it-py                    3.0.0         pyhd8ed1ab_0          conda-forge
 matplotlib-base                   3.9.2         py312h9bd0bc6_1       conda-forge
 mdurl                             0.1.2         pyhd8ed1ab_0          conda-forge
 msgpack-python                    1.1.0         py312h6142ec9_0       conda-forge
 munkres                           1.1.4         pyh9f0ad1d_0          conda-forge
 ncurses                           6.5           h7bae524_1            conda-forge
 numcodecs                         0.13.0        py312h8ae5369_0       conda-forge
 numpy                             1.26.4        py312h8442bc7_0       conda-forge
 openjpeg                          2.5.2         h9f1df11_0            conda-forge
 openssl                           3.3.2         h8359307_0            conda-forge
 orc                               2.0.2         h75dedd0_0            conda-forge
 packaging                         24.1          pyhd8ed1ab_0          conda-forge
 pandas                            2.1.4         py312h9e53831_0       conda-forge
 patsy                             0.5.6         pyhd8ed1ab_0          conda-forge
 pcre2                             10.44         h297a79d_2            conda-forge
 pillow                            10.4.0        py312h8609ca0_1       conda-forge
 pip                               24.2          pyh8b19718_1          conda-forge
 pixman                            0.43.4        hebf3989_0            conda-forge
 platformdirs                      4.3.3         pyhd8ed1ab_0          conda-forge
 polaris                           0.7.9         pyhecae5ae_0          conda-forge
 pthread-stubs                     0.4           h27ca646_1001         conda-forge
 pyarrow                           17.0.0        py312ha814d7c_1       conda-forge
 pyarrow-core                      17.0.0        py312he20ac61_1_cpu   conda-forge
 pycairo                           1.27.0        py312h798cee4_0       conda-forge
 pycparser                         2.22          pyhd8ed1ab_0          conda-forge
 pydantic                          2.9.2         pyhd8ed1ab_0          conda-forge
 pydantic-core                     2.23.4        py312he431725_0       conda-forge
 pydantic-settings                 2.5.2         pyhd8ed1ab_0          conda-forge
 pygments                          2.18.0        pyhd8ed1ab_0          conda-forge
 pyparsing                         3.1.4         pyhd8ed1ab_0          conda-forge
 pysocks                           1.7.1         pyha2e5f31_6          conda-forge
 python                            3.12.6        h739c21a_0_cpython    conda-forge
 python-dateutil                   2.9.0         pyhd8ed1ab_0          conda-forge
 python-dotenv                     1.0.1         pyhd8ed1ab_0          conda-forge
 python-tzdata                     2024.1        pyhd8ed1ab_0          conda-forge
 python_abi                        3.12          5_cp312               conda-forge
 pytz                              2024.2        pyhd8ed1ab_0          conda-forge
 pyyaml                            6.0.2         py312h024a12e_1       conda-forge
 qhull                             2020.2        h420ef59_5            conda-forge
 rdkit                             2024.03.5     py312h619ea94_3       conda-forge
 re2                               2023.09.01    h4cba328_2            conda-forge
 readline                          8.2           h92ec313_1            conda-forge
 reportlab                         4.2.2         py312h024a12e_1       conda-forge
 requests                          2.32.3        pyhd8ed1ab_0          conda-forge
 rich                              13.8.1        pyhd8ed1ab_0          conda-forge
 rlpycairo                         0.2.0         pyhd8ed1ab_0          conda-forge
 scikit-learn                      1.5.2         py312h387f99c_1       conda-forge
 scipy                             1.14.1        py312heb3a901_0       conda-forge
 seaborn                           0.13.2        hd8ed1ab_2            conda-forge
 seaborn-base                      0.13.2        pyhd8ed1ab_2          conda-forge
 selfies                           2.1.1         pyhd8ed1ab_0          conda-forge
 setuptools                        73.0.1        pyhd8ed1ab_0          conda-forge
 shellingham                       1.5.4         pyhd8ed1ab_0          conda-forge
 six                               1.16.0        pyh6c4a22f_0          conda-forge
 snappy                            1.2.1         hd02b534_0            conda-forge
 sniffio                           1.3.1         pyhd8ed1ab_0          conda-forge
 sqlalchemy                        2.0.35        py312h024a12e_0       conda-forge
 statsmodels                       0.14.3        py312h755e627_0       conda-forge
 tenacity                          9.0.0         pyhd8ed1ab_0          conda-forge
 termcolor                         2.4.0         pyhd8ed1ab_0          conda-forge
 threadpoolctl                     3.5.0         pyhc1e730c_0          conda-forge
 tk                                8.6.13        h5083fa2_1            conda-forge
 tqdm                              4.66.5        pyhd8ed1ab_0          conda-forge
 typer                             0.12.5        pyhd8ed1ab_0          conda-forge
 typer-slim                        0.12.5        pyhd8ed1ab_0          conda-forge
 typer-slim-standard               0.12.5        hd8ed1ab_0            conda-forge
 typing-extensions                 4.12.2        hd8ed1ab_0            conda-forge
 typing_extensions                 4.12.2        pyha770c72_0          conda-forge
 tzdata                            2024a         h8827d51_1            conda-forge
 urllib3                           2.2.3         pyhd8ed1ab_0          conda-forge
 wheel                             0.44.0        pyhd8ed1ab_0          conda-forge
 xorg-libxau                       1.0.11        hb547adb_0            conda-forge
 xorg-libxdmcp                     1.1.3         h27ca646_0            conda-forge
 xz                                5.2.6         h57fd34a_0            conda-forge
 yaml                              0.2.5         h3422bc3_2            conda-forge
 yaspin                            2.2.0         pyhd8ed1ab_0          conda-forge
 zarr                              2.18.3        pyhd8ed1ab_0          conda-forge
 zipp                              3.20.2        pyhd8ed1ab_0          conda-forge
 zlib                              1.3.1         hfb2fe0b_1            conda-forge
 zstandard                         0.23.0        py312h15fbf35_1       conda-forge
 zstd                              1.5.6         hb46c0d2_0            conda-forge
@ThomasRochefortB ThomasRochefortB added the bug Something isn't working label Sep 19, 2024
@jstlaurent jstlaurent self-assigned this Nov 11, 2024
@cwognum
Copy link
Collaborator

cwognum commented Nov 11, 2024

@vanguard737 Thanks for your email! That was the little nudge we needed to actually fix this issue despite the detailed and early bug report of @ThomasRochefortB ! Let us know if you run into any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants