Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of upgrading mlflow

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "what is the method of mlflow upgrade?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what is the method of mlflow upgrade" article.

Upgrade and preparation

With reference to the previous construction and use of mlflow, we first set up a conda environment for mlflow 1.4.0 and mlflow 1.11.0.

Suppose you have established the corresponding conda environment, and execute it if you are mlflow-1.4.0 and mlflow-1.11.0 respectively:

Conda activate mlflow-1.11.0

Refer to mlflow db upgrade, execute

Mlflow db upgrade mysql://user:passwd@host:port/db such as: mlflow db upgrade mysql://root:root@localhost/mlflow

Among them

Nouns explain the user name of the user database, the password of the passwd database, the host address of the host database, the port of the port database. If the default is 3306, the database of the db database can be omitted.

If the execution is successful, you will see the following output:

10:24:50 on 2020-11-02 INFO mlflow.store.db.utils: Updating database tablesINFO [alembic.runtime.migration] Context impl MySQLImpl.INFO [alembic.runtime.migration] Will assume non-transactional DDL.INFO [alembic.runtime.migration] Running upgrade 2b4d017a5e9b-> cfd24bdc0731, Update run status constraint with killedINFO [alembic.runtime.migration] Running upgrade cfd24bdc0731-> 0a8213491aaa, drop_duplicate_killed_constraintWARNI [0a8213491aaa_drop_duplicate_killed_constraint_py] Failed to drop check constraint. Dropping check constraints may not be supported by your SQL database. Exception content: (MySQLdb._exceptions.ProgrammingError) (1064, "You have an error in your SQL syntax" Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK status' at line 1 ") [SQL: ALTER TABLE runs DROP CHECK status] (Background on this error at: http://sqlalche.me/e/f405)INFO [alembic.runtime.migration] Running upgrade 0a8213491aaa-> 728d730b5ebd, add registered model tags tableINFO [alembic.runtime.migration] Running upgrade 728d730b5ebd-> 27a6a02d2cf1, add model version tags tableINFO [alembic.runtime.migration] Running upgrade 27a6a02d2cf1-> 84291f40a231, add run_link to model_version

If you execute it again in the context of mlflow 1.4.0 at this time:

Mlflow server\-- backend-store-uri mysql://root:root@localhost/mlflow\-- host 0.0.0.0-p 5002\-- default-artifact-root s3://mlflow

You will report an error:

10:25:41 on 2020-11-02 ERROR mlflow.cli: Error initializing backend store2020/11/02 10:25:41 ERROR mlflow.cli: Detected out-of-date database schema (found version 84291f40a231, but expected 2b4d017a5e9b). Take a backup of your database, then run 'mlflow db upgrade' to migrate your database to the latest schema. NOTE: schema migration may result in database downtime-please consult your database's documentation for more detail.Traceback (most recent call last): File "/ Users/ljh/opt/miniconda3/envs/mlflow-1.4.0-dev/lib/python3.6/site-packages/mlflow/cli.py", line 263, in server initialize_backend_stores (backend_store_uri Default_artifact_root) File "/ Users/ljh/opt/miniconda3/envs/mlflow-1.4.0-dev/lib/python3.6/site-packages/mlflow/server/handlers.py", line 97, in initialize_backend_stores _ get_tracking_store (backend_store_uri, default_artifact_root) File "/ Users/ljh/opt/miniconda3/envs/mlflow-1.4.0-dev/lib/python3.6/site-packages/mlflow/server/handlers.py", line 83 In _ get_tracking_store _ tracking_store = _ tracking_store_registry.get_store (store_uri, artifact_root) File "/ Users/ljh/opt/miniconda3/envs/mlflow-1.4.0-dev/lib/python3.6/site-packages/mlflow/tracking/_tracking_service/registry.py", line 37, in get_store return builder (store_uri=store_uri Artifact_uri=artifact_uri) File "/ Users/ljh/opt/miniconda3/envs/mlflow-1.4.0-dev/lib/python3.6/site-packages/mlflow/server/handlers.py", line 54, in _ get_sqlalchemy_store return SqlAlchemyStore (store_uri, artifact_uri) File "/ Users/ljh/opt/miniconda3/envs/mlflow-1.4.0-dev/lib/python3.6/site-packages/mlflow/store/tracking/sqlalchemy_store.py", line 99 In _ init__ mlflow.store.db.utils._verify_schema (self.engine) File "/ Users/ljh/opt/miniconda3/envs/mlflow-1.4.0-dev/lib/python3.6/site-packages/mlflow/store/db/utils.py", line 52, in _ verify_schema "more detail."% (current_rev, head_revision) mlflow.exceptions.MlflowException: Detected out-of-date database schema (found version 84291f40a231, but expected 2b4d017a5e9b). Take a backup of your database, then run 'mlflow db upgrade' to migrate your database to the latest schema. NOTE: schema migration may result in database downtime-please consult your database's documentation for more detail.

This indicates that the upgrade was successful.

Execute it again in the conda environment of mlflow 1.11.0:

Mlflow server\-- backend-store-uri mysql://root:root@localhost/mlflow\-- host 0.0.0.0-p 5003\-- default-artifact-root s3://mlflow

You can see the page normally, so that the upgrade of mlflow from 1.4.0 to 1.11.0 is complete.

Matters needing attention

If it is an online operation, back up the database first, because the upgrade does not necessarily guarantee the success of the upgrade. If the upgrade fails, recover directly from the backup database or refer to the failure process for processing.

The above is the content of this article on "what is the method of mlflow upgrade". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report