Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Exceptions API – MLOps #52925
    Juliano Muniz
    Participant

      Inclusive se passar o model-id direto vai.
      self.model = mlflow.keras.load_model(“models:/m-abcdef…”)

      Não sei se deixei de fazer algo ou pulei algum passo.

       

      in reply to: Exceptions API – MLOps #52924
      Juliano Muniz
      Participant

        Bom dia,

        Como falei, foi um teste com as versões de lib. Mas já voltei a configuração inicial.

        O modelo rodou e foi treinado… os artefatos estão no local e remoto. Inclusive o modelo está na versão 3 já no Dagshub.

        Eu fiz alguns testes localmente… e aparentemente ele não reconhece a uri do seguinte código:
        self.model = mlflow.keras.load_model(“models:/model/latest”)

        Se eu uso algo como: mlflow-artifacts:/xyz/abc , funciona.

        Eu tentei inclusive baixar a versao do git relacionada ao Airflow e mesmo rodando ela, dá o problema tanto local como via docker.

        in reply to: Exceptions API – MLOps #52917
        Juliano Muniz
        Participant

          Colocando todo o log após o comando: docker run -p 5001:5001 ml-classifier

          [2026-01-21 15:37:08 +0000] [1] [INFO] Starting gunicorn 23.0.0
          [2026-01-21 15:37:08 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
          [2026-01-21 15:37:08 +0000] [1] [INFO] Using worker: sync
          [2026-01-21 15:37:08 +0000] [7] [INFO] Booting worker with pid: 7
          2026-01-21 15:37:12 – app.main – INFO – Loading registered model from MLflow Model Registry
          2026-01-21 15:37:12.693637: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
          2026-01-21 15:37:12.700567: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
          2026-01-21 15:37:12.713154: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
          WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
          E0000 00:00:1769009832.741336 7 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
          E0000 00:00:1769009832.749437 7 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
          W0000 00:00:1769009832.768747 7 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
          W0000 00:00:1769009832.768984 7 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
          W0000 00:00:1769009832.769292 7 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
          W0000 00:00:1769009832.769500 7 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
          2026-01-21 15:37:12.774571: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
          To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
          2026-01-21 15:37:15 – matplotlib.font_manager – INFO – generated new fontManager
          [2026-01-21 15:37:16 +0000] [7] [ERROR] Exception in worker process
          Traceback (most recent call last):
          File “/usr/local/lib/python3.12/site-packages/gunicorn/arbiter.py”, line 608, in spawn_worker
          worker.init_process()
          File “/usr/local/lib/python3.12/site-packages/gunicorn/workers/base.py”, line 135, in init_process
          self.load_wsgi()
          File “/usr/local/lib/python3.12/site-packages/gunicorn/workers/base.py”, line 147, in load_wsgi
          self.wsgi = self.app.wsgi()
          ^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/gunicorn/app/base.py”, line 66, in wsgi
          self.callable = self.load()
          ^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py”, line 57, in load
          return self.load_wsgiapp()
          ^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py”, line 47, in load_wsgiapp
          return util.import_app(self.app_uri)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/gunicorn/util.py”, line 370, in import_app
          mod = importlib.import_module(module)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/importlib/__init__.py”, line 90, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “<frozen importlib._bootstrap>”, line 1387, in _gcd_import
          File “<frozen importlib._bootstrap>”, line 1360, in _find_and_load
          File “<frozen importlib._bootstrap>”, line 1331, in _find_and_load_unlocked
          File “<frozen importlib._bootstrap>”, line 935, in _load_unlocked
          File “<frozen importlib._bootstrap_external>”, line 999, in exec_module
          File “<frozen importlib._bootstrap>”, line 488, in _call_with_frames_removed
          File “/mlops_pipe/app/main.py”, line 117, in <module>
          app.model_service = ModelService()
          ^^^^^^^^^^^^^^
          File “/mlops_pipe/app/main.py”, line 17, in __init__
          self._load_artifacts()
          File “/mlops_pipe/app/main.py”, line 24, in _load_artifacts
          self.model = mlflow.keras.load_model(“models:/model/latest”)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/keras/load.py”, line 130, in load_model
          local_model_path = _download_artifact_from_uri(artifact_uri=model_uri, output_path=dst_path)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/tracking/artifact_utils.py”, line 108, in _download_artifact_from_uri
          repo = get_artifact_repository(artifact_uri=root_uri)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/artifact/artifact_repository_registry.py”, line 133, in get_artifact_repository
          return _artifact_repository_registry.get_artifact_repository(artifact_uri)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/artifact/artifact_repository_registry.py”, line 77, in get_artifact_repository
          return repository(artifact_uri)
          ^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/artifact/models_artifact_repo.py”, line 69, in __init__
          ) = ModelsArtifactRepository._get_model_uri_infos(artifact_uri)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/artifact/models_artifact_repo.py”, line 112, in _get_model_uri_infos
          name, version = get_model_name_and_version(client, uri)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/artifact/utils/models.py”, line 99, in get_model_name_and_version
          return model_name, str(_get_latest_model_version(client, model_name, model_stage))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/artifact/utils/models.py”, line 31, in _get_latest_model_version
          latest = client.get_latest_versions(name, None if stage is None else [stage])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/tracking/_model_registry/client.py”, line 161, in get_latest_versions
          return self.store.get_latest_versions(name, stages)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/model_registry/rest_store.py”, line 193, in get_latest_versions
          response_proto = self._call_endpoint(GetLatestVersions, req_body, call_all_endpoints=True)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/store/model_registry/base_rest_store.py”, line 39, in _call_endpoint
          return call_endpoints(
          ^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/utils/rest_utils.py”, line 415, in call_endpoints
          return call_endpoint(
          ^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/utils/rest_utils.py”, line 402, in call_endpoint
          response = verify_rest_response(response, endpoint)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File “/usr/local/lib/python3.12/site-packages/mlflow/utils/rest_utils.py”, line 265, in verify_rest_response
          raise MlflowException(
          mlflow.exceptions.MlflowException: API request to endpoint /api/2.0/mlflow/registered-models/get-latest-versions failed with error code 404 != 200. Response body: ”
          [2026-01-21 15:37:16 +0000] [7] [INFO] Worker exiting (pid: 7)
          [2026-01-21 15:37:17 +0000] [1] [ERROR] Worker (pid:7) exited with code 3
          [2026-01-21 15:37:17 +0000] [1] [ERROR] Shutting down: Master
          [2026-01-21 15:37:17 +0000] [1] [ERROR] Reason: Worker failed to boot.

        Viewing 3 posts - 1 through 3 (of 3 total)