這篇“mlflow升級的方法是什么”文章的知識點大部分人都不太理解,所以小編給大家總結(jié)了以下內(nèi)容,內(nèi)容詳細,步驟清晰,具有一定的借鑒價值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來看看這篇“mlflow升級的方法是什么”文章吧。
10多年的龍?zhí)毒W(wǎng)站建設經(jīng)驗,針對設計、前端、開發(fā)、售后、文案、推廣等六對一服務,響應快,48小時及時工作處理。營銷型網(wǎng)站建設的優(yōu)勢是能夠根據(jù)用戶設備顯示端的尺寸不同,自動調(diào)整龍?zhí)督ㄕ镜娘@示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設計,從而大程度地提升瀏覽體驗。成都創(chuàng)新互聯(lián)公司從事“龍?zhí)毒W(wǎng)站設計”,“龍?zhí)毒W(wǎng)站推廣”以來,每個客戶項目都認真落實執(zhí)行。
參照之前mlflow的搭建使用 ,我們先建立mlflow 1.4.0 和mlflow 1.11.0的conda環(huán)境
假設你已經(jīng)建立好了對應的conda環(huán)境,且分別為mlflow-1.4.0 和mlflow-1.11.0 則執(zhí)行:
conda activate mlflow-1.11.0
參考mlflow db upgrade ,執(zhí)行
mlflow db upgrade MySQL://user:passwd@host:port/db 如:mlflow db upgrade mysql://root:root@localhost/mlflow
其中
名詞 | 解釋 |
---|---|
user | 數(shù)據(jù)庫的用戶名 |
passwd | 數(shù)據(jù)庫的密碼 |
host | 數(shù)據(jù)庫的主機地址 |
port | 數(shù)據(jù)庫的端口,如默認為3306則可以省略 |
db | 數(shù)據(jù)庫的database |
如果執(zhí)行成功則會看到如下輸出信息:
2020/11/02 10:24:50 INFO mlflow.store.db.utils: Updating database tables INFO [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 killed INFO [alembic.runtime.migration] Running upgrade cfd24bdc0731 -> 0a8213491aaa, drop_duplicate_killed_constraint WARNI [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 table INFO [alembic.runtime.migration] Running upgrade 728d730b5ebd -> 27a6a02d2cf1, add model version tags table INFO [alembic.runtime.migration] Running upgrade 27a6a02d2cf1 -> 84291f40a231, add run_link to model_version
如果此時再在mlflow 1.4.0的環(huán)境下 再執(zhí)行:
mlflow server \ --backend-store-uri mysql://root:root@localhost/mlflow \ --host 0.0.0.0 -p 5002 \ --default-artifact-root s3://mlflow
就會報錯:
2020/11/02 10:25:41 ERROR mlflow.cli: Error initializing backend store 2020/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 <database_uri>' 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 <database_uri>' 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.
這說明升級成功
此時再在mlflow 1.11.0的conda環(huán)境下執(zhí)行:
mlflow server \ --backend-store-uri mysql://root:root@localhost/mlflow \ --host 0.0.0.0 -p 5003 \ --default-artifact-root s3://mlflow
就能正常的看到頁面,這樣mlflow 從1.4.0到1.11.0的升級就完成了
如果是線上操作,則先備份數(shù)據(jù)庫,因為該升級不一定能保證升級成功,如升級失敗,直接從備份數(shù)據(jù)庫恢復或者參照失敗處理進行處理
以上就是關于“mlflow升級的方法是什么”這篇文章的內(nèi)容,相信大家都有了一定的了解,希望小編分享的內(nèi)容對大家有幫助,若想了解更多相關的知識內(nèi)容,請關注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
當前文章:mlflow升級的方法是什么
分享URL:http://sd-ha.com/article10/pepjdo.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、軟件開發(fā)、域名注冊、網(wǎng)頁設計公司、全網(wǎng)營銷推廣、微信公眾號
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)