question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Alembic migration for metrics table uses incorrect server default

See original GitHub issue

MLflow Roadmap Item

This is an MLflow Roadmap item that has been prioritized by the MLflow maintainers. We’re seeking help with the implementation of roadmap items tagged with the help wanted label.

For requirements clarifications and implementation questions, or to request a PR review, please tag @harupy in your communications related to this issue.

System information

  • Have I written custom code (as opposed to using a stock example script provided in MLflow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): miniconda container - debian buster
  • MLflow installed from (source or binary): mflow from pypi
  • MLflow version (run mlflow --version): mlflow 1.14.1 trying to upgrade to 1.16 or 1.17
  • Python version: Python 3.9.2
  • npm version, if running the dev UI: NA
  • Exact command to reproduce: mlflow db upgrade <MSSQL connection string >
  • Tracking server DB: Azure Microsoft SQL DB

Describe the problem

When I upgrade the database from 1.14.1 to a higher version I get an error. Currently use an Azure MSFT DB. Would like to upgrade to 1.16 or 1.17

Code to reproduce issue

mlflow db upgrade “mssql+pyodbc://_rest_of_conn_string”

Other info / logs

sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) (‘42000’, ‘[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Column already has a DEFAULT bound to it. (1781) (SQLExecDirectW)’) [SQL: ALTER TABLE metrics ADD DEFAULT ‘0’ FOR is_nan] (Background on this error at: http://sqlalche.me/e/14/f405)

What component(s), interfaces, languages, and integrations does this bug affect?

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/projects: MLproject format, project running backends
  • area/scoring: Local serving, model deployment tools, spark UDFs
  • area/server-infra: MLflow server, JavaScript dev server
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, JavaScript, plotting
  • area/docker: Docker use across MLflow’s components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GlamTamcommented, Oct 12, 2021

@marijncv , @harupy. Works like a charm for me! Also kudos for the included SQL tests

1reaction
VirajVaitha123commented, Aug 13, 2021

Facing this issue as I try connect to SQL DB as backend-component too. Any updates on this please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alembic: IntegrityError: "column contains null values" when ...
I'm adding a column to an existing table. This new column is nullable=False .
Read more >
Migrate CockroachDB Schemas with Alembic
Learn how to use Alembic with a CockroachDB cluster. ... Running this migration creates the accounts table, with an id column and a...
Read more >
Changelog — Alembic 1.9.0 documentation
This performs the widely requested feature of running an “autogenerate” comparison between the current database and the MetaData that's currently set up for ......
Read more >
Runtime Objects — Alembic 1.8.1 documentation
Indicates server default comparison behavior during an autogenerate operation. Defaults to False which disables server default comparison.
Read more >
Troubleshooting for Amazon RDS - AWS Documentation
The problem is most likely the inbound rules in your security group. By default, DB instances don't allow access. Access is granted through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found