You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve usability of AutoML column not found error #5574
- $"Provided {columnPurpose} column '{columnName}' not found in training data."+ $"Provided {columnPurpose} column '{columnName}' not found in training data. Did you mean '{closestNamed}'."
For my current example, this would print: Provided ignored column 'tagMaxTotalItem' not found in training data. Did you mean 'tagMaxTotalItems'.
I'd recommend using Levenshtein distance to find the closest named column (code).
thrownewArgumentException($"Provided {columnPurpose} column '{columnName}' not found in training data.");
}
Background:
It took me ~20min to debug why this error was occurring (obvious in retrospect). My column existed in the dataset, it existed in my loader function, it existed in my IDataView, ...; simply was just misspelt ("tagMaxTotalItem" instead of "tagMaxTotalItems").
Improving the usability of this error message will save future users' time.
I was going to try working on this as my first contribution to open source, but it looks already fixed to me in the code. I don't see a test for it though. I could add a test to confirm it. I haven't seen any guidelines on writing tests. Are there any?
I dont think we have any official guidelines. I would just look at the other tests we have for AutoML and base it off of that. If you can throw the test in to an existing class that would probably be better, but if it doesn't fit anywhere than feel free to make a new test class too.
We can use sequence matcher ,it compare the column typed by us with the existing columns like this-
from difflib import SequenceMatcher
s = SequenceMatcher(None, a, b)
s.ratio()
if we find s.ratio() >50 than we will print
throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' not found in training data. And their may be spelling mistake typed by you");
so it will help us in identifying such type of bugs.
Activity
Offer suggestions for possibly mistyped label column names in AutoML (#…
Merge from main repository (#1)
Actually merge from main (#2)
behroozbc commentedon Jul 24, 2021
hi
Is this issue solved ??
woodya-coder commentedon Aug 2, 2021
I was going to try working on this as my first contribution to open source, but it looks already fixed to me in the code. I don't see a test for it though. I could add a test to confirm it. I haven't seen any guidelines on writing tests. Are there any?
michaelgsharp commentedon Aug 4, 2021
I dont think we have any official guidelines. I would just look at the other tests we have for AutoML and base it off of that. If you can throw the test in to an existing class that would probably be better, but if it doesn't fit anywhere than feel free to make a new test class too.
abhinavjainn412 commentedon Aug 21, 2021
We can use sequence matcher ,it compare the column typed by us with the existing columns like this-
from difflib import SequenceMatcher
s = SequenceMatcher(None, a, b)
s.ratio()
if we find s.ratio() >50 than we will print
throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' not found in training data. And their may be spelling mistake typed by you");
so it will help us in identifying such type of bugs.
Update editor config and format samples (#5893)
bhargavsonagara commentedon Aug 25, 2021
Actually what we have to do now? I am new to it plz help me and I really want to contribute on any issue .
the-programmer commentedon May 22, 2022
Hi, I wanted to try and fix this issue but it seems this issue is already fixed:
machinelearning/src/Microsoft.ML.AutoML/Utils/UserInputValidationUtil.cs
Lines 254 to 258 in 4bcb892
Can someone close this?
michaelgsharp commentedon Jun 13, 2022
Thanks for pointing this out @the-programmer! Closing the issue.