-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add FAQ for case sensitivity problem with MySQL #6127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add FAQ for case sensitivity problem with MySQL #6127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, I left some comments:)
@@ -775,3 +775,32 @@ However, if it is necessary to remove artifacts from a Python script, users can | |||
for artifact_meta in get_all_artifact_meta(study): | |||
# Remove the artifacts uploaded to ``base_path``. | |||
artifact_store.remove(artifact_meta.artifact_id) | |||
|
|||
How can I resolve case sensitivity issues with MySQL? | |||
------------------------------------------------------ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
------------------------------------------------------ | |
----------------------------------------------------- |
However, Optuna treats string parameters in a case-sensitive manner. | ||
This can lead to conflicts when parameter names differ only by case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, Optuna treats string parameters in a case-sensitive manner. | |
This can lead to conflicts when parameter names differ only by case. | |
However, Optuna treats string parameters in a case-sensitive manner, leading to conflicts in MySQL if parameter names differ only by case. |
A = trial.suggest_int("A", 0, 10) | ||
return a + A | ||
|
||
In this case, "a" and "A" are treated as distinct by Optuna, but MySQL considers them the same due to its default collation settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, "a" and "A" are treated as distinct by Optuna, but MySQL considers them the same due to its default collation settings. | |
In this case, Optuna treats `a` and `A` distinctively while MySQL does not due to its default collation settings. |
return a + A | ||
|
||
In this case, "a" and "A" are treated as distinct by Optuna, but MySQL considers them the same due to its default collation settings. | ||
As a result, an error may occur when trying to register these parameters in the database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a result, an error may occur when trying to register these parameters in the database. | |
As a result, only one of the parameters will be registered in MySQL. |
In this case, "a" and "A" are treated as distinct by Optuna, but MySQL considers them the same due to its default collation settings. | ||
As a result, an error may occur when trying to register these parameters in the database. | ||
|
||
To address this issue, there are some workarounds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To address this issue, there are some workarounds. | |
The following workarounds should be considered: |
1. Use a different storage backend. | ||
Please consider using PostgreSQL or SQLite, which supports case-sensitive handling. | ||
2. Rename the parameters to avoid case conflicts. | ||
For example, use "a" and "b" instead of "a" and "A". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, use "a" and "b" instead of "a" and "A". | |
For example, use `a` and `b` instead of `a` and `A`. |
For example, use "a" and "b" instead of "a" and "A". | ||
3. Change MySQL’s collation settings to be case-sensitive. | ||
You can configure case sensitivity at the database, table, or column level. | ||
For more details, refer to `the MySQL documentation <https://dev.mysql.com/doc/refman/9.3/en/charset-syntax.html>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more details, refer to `the MySQL documentation <https://dev.mysql.com/doc/refman/9.3/en/charset-syntax.html>`__. | |
We defer to `the MySQL documentation <https://dev.mysql.com/doc/refman/9.3/en/charset-syntax.html>`__ for more details. |
Motivation
An error with MySQL was report in #6032.
Following an internal discussion, we decided to add a description of the issue and its possible workarounds to the FAQ.
Description of the changes
The output is like:
