online-ml / beaver

🦫 MLOps for (online) machine learning
BSD 3-Clause "New" or "Revised" License
80 stars 13 forks source link

problem while bulding the project #2

Closed dberardo-com closed 2 years ago

dberardo-com commented 2 years ago

i am trying to build the project using this dockerifle:

FROM python

RUN pip install poetry
RUN poetry install
RUN poetry shell
RUN pip install river

here the error log:

[2/5] RUN pip install poetry 14.5s => ERROR [3/5] RUN poetry install 1.0s

[3/5] RUN poetry install:

7 0.938

7 0.938 RuntimeError

7 0.938

7 0.938 Poetry could not find a pyproject.toml file in / or its parents

7 0.938

7 0.939 at /usr/local/lib/python3.10/site-packages/poetry/core/factory.py:369 in locate

7 0.966 365│ if poetry_file.exists():

7 0.966 366│ return poetry_file

7 0.967 367│

7 0.967 368│ else:

7 0.967 → 369│ raise RuntimeError(

7 0.967 370│ "Poetry could not find a pyproject.toml file in {} or its parents".format(

7 0.968 371│ cwd

7 0.968 372│ )

7 0.968 373│ )


executor failed running [/bin/sh -c poetry install]: exit code: 1 ERROR: Service 'beaver-server' failed to build : Build failed

dberardo-com commented 2 years ago

i am sorry .. forgot to clone the repo : D

dberardo-com commented 2 years ago

here the real problem:

corrected dockerfile

FROM python

WORKDIR /home/beaver

RUN apt-get install git
RUN pip install poetry

RUN cd /tmp && git clone https://github.com/online-ml/beaver
RUN mv /tmp/beaver/*  .

RUN poetry install
RUN poetry shell
RUN pip install river
> [7/9] RUN poetry install:
#10 1.065 Creating virtualenv beaver-OGYz3pCF-py3.10 in /root/.cache/pypoetry/virtualenvs
#10 2.360 Installing dependencies from lock file
#10 3.760
#10 3.761 Package operations: 68 installs, 0 updates, 0 removals
#10 3.761
#10 3.763   • Installing pyparsing (3.0.7)
#10 3.765   • Installing six (1.16.0)
#10 6.315   • Installing asttokens (2.0.5)
#10 6.317   • Installing executing (0.8.3)
#10 6.320   • Installing idna (3.3)
#10 6.325   • Installing parso (0.8.3)
#10 6.329   • Installing ptyprocess (0.7.0)
#10 6.332   • Installing pure-eval (0.2.2)
#10 6.335   • Installing packaging (21.3)
#10 6.339   • Installing sniffio (1.2.0)
#10 6.347   • Installing traitlets (5.1.1)
#10 6.353   • Installing wcwidth (0.2.5)
#10 8.963   • Installing anyio (3.5.0)
#10 8.966   • Installing backcall (0.2.0)
#10 8.969   • Installing entrypoints (0.4)
#10 8.974   • Installing jedi (0.18.1)
#10 8.979   • Installing jupyter-core (4.9.2)
#10 8.982   • Installing matplotlib-inline (0.1.3)
#10 8.986   • Installing mypy-extensions (0.4.3)
#10 8.986   • Installing nest-asyncio (1.5.5)
#10 8.989   • Installing decorator (5.1.1)
#10 8.997   • Installing pexpect (4.8.0)
#10 9.000   • Installing marshmallow (3.15.0)
#10 9.044   • Installing numpy (1.22.3)
#10 11.91   • Installing pickleshare (0.7.5)
#10 12.11   • Installing prompt-toolkit (3.0.29)
#10 12.20   • Installing pygments (2.11.2)
#10 12.21   • Installing python-dateutil (2.8.2)
#10 12.38   • Installing pytz (2022.1)
#10 12.38   • Installing pyzmq (22.3.0)
#10 12.45   • Installing stack-data (0.2.0)
#10 12.54   • Installing tornado (6.1)
#10 12.82   • Installing typing-extensions (4.1.1)
#10 22.80   • Installing asgiref (3.5.0)
#10 22.80   • Installing attrs (21.4.0)
#10 22.80   • Installing certifi (2021.10.8)
#10 22.81   • Installing charset-normalizer (2.0.12)
#10 22.81   • Installing debugpy (1.6.0)
#10 22.82   • Installing greenlet (1.1.2)
#10 22.82   • Installing h11 (0.13.0)
#10 22.82   • Installing ipython (8.2.0)
#10 22.83   • Installing jupyter-client (7.2.1)
#10 22.83   • Installing marshmallow-enum (1.5.1)
#10 22.83   • Installing iniconfig (1.1.1)
#10 22.85   • Installing click (8.0.4)
#10 25.40   • Installing pandas (1.4.2)
#10 25.70   • Installing pathspec (0.9.0)
#10 25.74   • Installing platformdirs (2.5.1)
#10 25.80   • Installing pluggy (1.0.0)
#10 26.07   • Installing psutil (5.9.0)
#10 26.19   • Installing py (1.11.0)
#10 26.21   • Installing pydantic (1.9.0)
#10 26.27   • Installing scipy (1.6.1)
#10 26.57   • Installing starlette (0.17.1)
#10 26.63   • Installing tomli (2.0.1)
#10 28.48   • Installing typing-inspect (0.7.1)
#10 29.50   • Installing urllib3 (1.26.9)
#10 53.27
#10 53.27   EnvCommandError
#10 53.27
#10 53.27   Command ['/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/bc/74/e2/a22451059efb69c32be2d51a7727b1133375122dd7564e8a8e9df4f1cd/scipy-1.6.1.tar.gz'] errored with the following return code 1, and output:
#10 53.27   Processing /root/.cache/pypoetry/artifacts/bc/74/e2/a22451059efb69c32be2d51a7727b1133375122dd7564e8a8e9df4f1cd/scipy-1.6.1.tar.gz
#10 53.27     Installing build dependencies: started
#10 53.27     Installing build dependencies: finished with status 'done'
#10 53.27     Getting requirements to build wheel: started
#10 53.27     Getting requirements to build wheel: finished with status 'done'
#10 53.27     Preparing metadata (pyproject.toml): started
#10 53.27     Preparing metadata (pyproject.toml): finished with status 'error'
#10 53.27     error: subprocess-exited-with-error
#10 53.27
#10 53.27     × Preparing metadata (pyproject.toml) did not run successfully.
#10 53.27     │ exit code: 1
#10 53.27     ╰─> [108 lines of output]
#10 53.27         setup.py:461: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-njf0a40b'), proceeding with generating Cython sources and expanding templates
#10 53.27           warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
#10 53.27         Running from SciPy source directory.
#10 53.27         INFO: lapack_opt_info:
#10 53.27         INFO: lapack_armpl_info:
#10 53.27         INFO: customize UnixCCompiler
#10 53.27         INFO:   libraries armpl_lp64_mp not found in ['/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: lapack_mkl_info:
#10 53.27         INFO:   libraries mkl_rt not found in ['/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: openblas_lapack_info:
#10 53.27         INFO:   libraries openblas not found in ['/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: openblas_clapack_info:
#10 53.27         INFO:   libraries openblas,lapack not found in ['/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: flame_info:
#10 53.27         INFO:   libraries flame not found in ['/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: accelerate_info:
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: atlas_3_10_threads_info:
#10 53.27         INFO: Setting PTATLAS=ATLAS
#10 53.27         INFO:   libraries tatlas,tatlas not found in /root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib
#10 53.27         INFO:   libraries tatlas,tatlas not found in /usr/local/lib
#10 53.27         INFO:   libraries tatlas,tatlas not found in /usr/lib
#10 53.27         INFO:   libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu
#10 53.27         INFO: <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: atlas_3_10_info:
#10 53.27         INFO:   libraries satlas,satlas not found in /root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib
#10 53.27         INFO:   libraries satlas,satlas not found in /usr/local/lib
#10 53.27         INFO:   libraries satlas,satlas not found in /usr/lib
#10 53.27         INFO:   libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu
#10 53.27         INFO: <class 'numpy.distutils.system_info.atlas_3_10_info'>
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: atlas_threads_info:
#10 53.27         INFO: Setting PTATLAS=ATLAS
#10 53.27         INFO:   libraries ptf77blas,ptcblas,atlas not found in /root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib
#10 53.27         INFO:   libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
#10 53.27         INFO:   libraries ptf77blas,ptcblas,atlas not found in /usr/lib
#10 53.27         INFO:   libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu
#10 53.27         INFO: <class 'numpy.distutils.system_info.atlas_threads_info'>
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: atlas_info:
#10 53.27         INFO:   libraries f77blas,cblas,atlas not found in /root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib
#10 53.27         INFO:   libraries f77blas,cblas,atlas not found in /usr/local/lib
#10 53.27         INFO:   libraries f77blas,cblas,atlas not found in /usr/lib
#10 53.27         INFO:   libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu
#10 53.27         INFO: <class 'numpy.distutils.system_info.atlas_info'>
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         INFO: lapack_info:
#10 53.27         INFO:   libraries lapack not found in ['/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         /tmp/pip-build-env-zw715d9p/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1902: UserWarning:
#10 53.27             Lapack (http://www.netlib.org/lapack/) libraries not found.
#10 53.27             Directories to search for the libraries can be specified in the
#10 53.27             numpy/distutils/site.cfg file (section [lapack]) or by setting
#10 53.27             the LAPACK environment variable.
#10 53.27           return getattr(self, '_calc_info_{}'.format(name))()
#10 53.27         INFO: lapack_src_info:
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         /tmp/pip-build-env-zw715d9p/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1902: UserWarning:
#10 53.27             Lapack (http://www.netlib.org/lapack/) sources not found.
#10 53.27             Directories to search for the sources can be specified in the
#10 53.27             numpy/distutils/site.cfg file (section [lapack_src]) or by setting
#10 53.27             the LAPACK_SRC environment variable.
#10 53.27           return getattr(self, '_calc_info_{}'.format(name))()
#10 53.27         INFO:   NOT AVAILABLE
#10 53.27         INFO:
#10 53.27         Traceback (most recent call last):
#10 53.27           File "/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
#10 53.27             main()
#10 53.27           File "/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
#10 53.27             json_out['return_val'] = hook(**hook_input['kwargs'])
#10 53.27           File "/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
#10 53.27             return hook(metadata_directory, config_settings)
#10 53.27           File "/tmp/pip-build-env-zw715d9p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 161, in prepare_metadata_for_build_wheel
#10 53.27             self.run_setup()
#10 53.27           File "/tmp/pip-build-env-zw715d9p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 253, in run_setup
#10 53.27             super(_BuildMetaLegacyBackend,
#10 53.27           File "/tmp/pip-build-env-zw715d9p/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 145, in run_setup
#10 53.27             exec(compile(code, __file__, 'exec'), locals())
#10 53.27           File "setup.py", line 588, in <module>
#10 53.27             setup_package()
#10 53.27           File "setup.py", line 584, in setup_package
#10 53.27             setup(**metadata)
#10 53.27           File "/tmp/pip-build-env-zw715d9p/overlay/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup
#10 53.27             config = configuration()
#10 53.27           File "setup.py", line 499, in configuration
#10 53.27             raise NotFoundError(msg)
#10 53.27         numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found.
#10 53.27         To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
#10 53.27         See site.cfg.example in the Scipy source directory and
#10 53.27         https://docs.scipy.org/doc/scipy/reference/building/index.html for details.
#10 53.27         [end of output]
#10 53.27
#10 53.27     note: This error originates from a subprocess, and is likely not a problem with pip.
#10 53.27   error: metadata-generation-failed
#10 53.27
#10 53.27   × Encountered error while generating package metadata.
#10 53.27   ╰─> See above for output.
#10 53.27
#10 53.27   note: This is an issue with the package mentioned above, not pip.
#10 53.27   hint: See above for details.
#10 53.27   WARNING: You are using pip version 22.0.4; however, version 22.1.1 is available.
#10 53.27   You should consider upgrading via the '/root/.cache/pypoetry/virtualenvs/beaver-OGYz3pCF-py3.10/bin/python -m pip install --upgrade pip' command.
#10 53.27
#10 53.27
#10 53.27   at /usr/local/lib/python3.10/site-packages/poetry/utils/env.py:1195 in _run
#10 53.36       1191│                 output = subprocess.check_output(
#10 53.36       1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
#10 53.36       1193│                 )
#10 53.36       1194│         except CalledProcessError as e:
#10 53.36     → 1195│             raise EnvCommandError(e, input=input_)
#10 53.36       1196│
#10 53.36       1197│         return decode(output)
#10 53.36       1198│
#10 53.36       1199│     def execute(self, bin, *args, **kwargs):
#10 53.36
------
executor failed running [/bin/sh -c poetry install]: exit code: 1
MaxHalford commented 2 years ago

You're having issues with scipy (CTRL+F the BLAS/LAPACK issue).

I'll add a recommended docker-compose.yaml file, which is on my todo list anyway :)

MaxHalford commented 2 years ago

I just pushed some instructions for usage with Docker.

dberardo-com commented 2 years ago

the container runs but when i navigate to localhost:3000 i see NOT FOUND

i was trying to follow the steps of of the taxis example and when running python upload i see this error on the server log:

_gdbm.error: [Errno 2] No such file or directory: '~/store'
INFO:     127.0.0.1:35872 - "GET /models HTTP/1.1" 307 Temporary Redirect
INFO:     127.0.0.1:35872 - "GET /models/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 261, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 61, in app
    response = await func(request)
  File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 227, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 160, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/./beaver/api/server.py", line 43, in get_models
    return settings.dam.model_store.list_names()
  File "/app/./beaver/model_store.py", line 53, in list_names
    with self.db() as db:
  File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/app/./beaver/model_store.py", line 42, in db
    db = shelve.open(str(self.path))
  File "/usr/local/lib/python3.9/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/local/lib/python3.9/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/local/lib/python3.9/dbm/__init__.py", line 95, in open
    return mod.open(file, flag, mode)
_gdbm.error: [Errno 2] No such file or directory: '~/store'
^[[A
INFO:     127.0.0.1:35874 - "GET /models HTTP/1.1" 307 Temporary Redirect
INFO:     127.0.0.1:35874 - "GET /models/ HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 261, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 61, in app
    response = await func(request)
  File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 227, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 160, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/./beaver/api/server.py", line 43, in get_models
    return settings.dam.model_store.list_names()
  File "/app/./beaver/model_store.py", line 53, in list_names
    with self.db() as db:
  File "/usr/local/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/app/./beaver/model_store.py", line 42, in db
    db = shelve.open(str(self.path))
  File "/usr/local/lib/python3.9/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/local/lib/python3.9/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/local/lib/python3.9/dbm/__init__.py", line 95, in open
    return mod.open(file, flag, mode)
_gdbm.error: [Errno 2] No such file or directory: '~/store'

i have tried also to manually create the dir, but no success

MaxHalford commented 2 years ago

Yep I didn't actually run the examples with the Docker setup. I will do it this weekend! :)

As for the NOT FOUND, it's because there's no index page. But if you go to localhost:3000/docs you should see something.

Sorry, Beaver is very rough around the edges!

dberardo-com commented 2 years ago

i confirm that the path to /docs works.

i can also report another error. If i stop and start the compose environment again, .sqlite file is loaded from the shared volume and i get this error:

app_1  | INFO:     Will watch for changes in these directories: ['/app']
app_1  | INFO:     Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit)
app_1  | INFO:     Started reloader process [1] using statreload
app_1  | Process SpawnProcess-1:
app_1  | Traceback (most recent call last):
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1808, in _execute_context
app_1  |     self.dialect.do_execute(
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
app_1  |     cursor.execute(statement, parameters)
app_1  | sqlite3.OperationalError: table ticks already exists
app_1  |
app_1  | The above exception was the direct cause of the following exception:
app_1  |
app_1  | Traceback (most recent call last):
app_1  |   File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
app_1  |     self.run()
app_1  |   File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
app_1  |     self._target(*self._args, **self._kwargs)
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/subprocess.py", line 76, in subprocess_started
app_1  |     target(sockets=sockets)
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
app_1  |     return asyncio.run(self.serve(sockets=sockets))
app_1  |   File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
app_1  |     return loop.run_until_complete(main)
app_1  |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
app_1  |     return future.result()
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 67, in serve
app_1  |     config.load()
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/config.py", line 458, in load
app_1  |     self.loaded_app = import_from_string(self.app)
app_1  |   File "/usr/local/lib/python3.9/site-packages/uvicorn/importer.py", line 21, in import_from_string
app_1  |     module = importlib.import_module(module_str)
app_1  |   File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
app_1  |     return _bootstrap._gcd_import(name[level:], package, level)
app_1  |   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
app_1  |   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
app_1  |   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
app_1  |   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
app_1  |   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
app_1  |   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
app_1  |   File "/app/./examples/wsgi.py", line 7, in <module>
app_1  |     dam.build()
app_1  |   File "/app/./beaver/dam.py", line 16, in build
app_1  |     self.data_store.build()
app_1  |   File "/app/./beaver/data_store.py", line 173, in build
app_1  |     self.engine.execute(sqla.text(sql))
app_1  |   File "<string>", line 2, in execute
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/deprecations.py", line 401, in warned
app_1  |     return fn(*args, **kwargs)
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3152, in execute
app_1  |     return connection.execute(statement, *multiparams, **params)
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1295, in execute
app_1  |     return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 325, in _execute_on_connection
app_1  |     return connection._execute_clauseelement(
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1487, in _execute_clauseelement
app_1  |     ret = self._execute_context(
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1851, in _execute_context
app_1  |     self._handle_dbapi_exception(
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2032, in _handle_dbapi_exception
app_1  |     util.raise_(
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
app_1  |     raise exception
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1808, in _execute_context
app_1  |     self.dialect.do_execute(
app_1  |   File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
app_1  |     cursor.execute(statement, parameters)
app_1  | sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table ticks already exists
app_1  | [SQL: CREATE VIEW ticks AS WITH RECURSIVE dates(tick) AS (
app_1  |     -- HACK: dates shouldn't hardcoded
app_1  |     VALUES(DATETIME('2022-04-25'))
app_1  |     UNION ALL
app_1  |     SELECT DATETIME(tick, '+1 minute')
app_1  |     FROM dates
app_1  |     WHERE tick < '2022-06-30'
app_1  | ),
app_1  | since AS (SELECT MIN(created_at) AS since FROM labels),
app_1  | until AS (SELECT DATETIME(MAX(created_at), '+1 minute') AS until FROM labels)
app_1  |
app_1  | SELECT tick, DATETIME(tick, '-1 minute') AS prev_tick
app_1  | FROM dates, since, until
app_1  | WHERE dates.tick >= since.since
app_1  | AND dates.tick <= until.until;
app_1  | ]
app_1  | (Background on this error at: https://sqlalche.me/e/14/e3q8)

Btw, would you advice me to perhaps start getting familiar with Chantilly before using Beaver? Or would that be a time waste since the 2 frameworks are quite different?

dberardo-com commented 2 years ago

should i open a new issue for the taxi example in the docker container?

and also, just as a quick reminder on my question:

Btw, would you advice me to perhaps start getting familiar with Chantilly before using Beaver? Or would that be a time waste since the 2 frameworks are quite different?

MaxHalford commented 2 years ago

should i open a new issue for the taxi example in the docker container?

No don't worry it's towards the top of my todo list.

Btw, would you advice me to perhaps start getting familiar with Chantilly before using Beaver? Or would that be a time waste since the 2 frameworks are quite different?

I wouldn't say they're very different. The main ideas are the same. They both expose API endpoints for instance. But Beaver is more generic and Chantilly will be deprecated.

dberardo-com commented 2 years ago

great, thanks for the answer.

do you believe that the currrent unstable release of beaver replicates at least all functionalities of chantilly? if any is missing, i could try to first give a try to chantilly for a small test case.

MaxHalford commented 2 years ago

do you believe that the currrent unstable release of beaver replicates at least all functionalities of chantilly? if any is missing, i could try to first give a try to chantilly for a small test case.

I think Chantilly supports classification whereas Beaver does not. We haven't implemented the notion of "task" into Beaver yet.

dberardo-com commented 2 years ago

alright, my first use case will be time series forecasting and anomalies detection so i guess that would still make sense for me to have a look at.

MaxHalford commented 2 years ago

Yep we definitely want to support those use cases :)

dberardo-com commented 2 years ago

oh i see, then this is not yet available in chantilly in understand, right?

MaxHalford commented 2 years ago

No, it isn't :/

dberardo-com commented 2 years ago

i see, then in this case i will probably wait for beaver to get released, instead of trying to find a workaround for chantilly. will see

MaxHalford commented 2 years ago

Yes I would recommend that!