Skip to content
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

Update error message to show aliro user guide #577

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified data/.DS_Store
Binary file not shown.
10 changes: 6 additions & 4 deletions lab/pyutils/validateDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def check_dataframe(df, target_column):
str(str_cols)+" "

if error_message != "":
# https://epistasislab.github.io/Aliro/userguide.html#adding-datasets
error_message += "* Please refer to https://epistasislab.github.io/Aliro/userguide.html#adding-datasets for more information."
raise ValueError(error_message)

return True
Expand Down Expand Up @@ -197,10 +199,10 @@ def validate_data_origin(df, prediction_type="classification", target_column=Non
# check that cat columns can be encoded
if categories or ordinals:
try:
encode_data(df, target_column, categories,
ordinals, "OneHotEncoder")
encode_data(df, target_column, categories,
ordinals, "OrdinalEncoder")
df = encode_data(df, target_column, categories,
ordinals, "OneHotEncoder")
df = encode_data(df, target_column, categories,
ordinals, "OrdinalEncoder")
except Exception as e:
logger.warn("encode_data() failed, " + str(e))
return False, "encode_data() failed, " + str(e)
Expand Down
6 changes: 6 additions & 0 deletions lab/webapp/src/components/FileUpload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2439,7 +2439,10 @@ handleCatFeaturesUserTextCancel() {
// of the pseudo-modal windows just below.

if(this.state.showErrorModal){

var errorModalContent = this.state.errorModalContent.split("*");
// length of errorModalContent
var errorModalContentLength = errorModalContent.length;

return(
<Modal style={{ marginTop:'0' }} open={this.state.showErrorModal} onClose={this.handleErrorModalClose} closeIcon id="error_modal_dialog">
Expand All @@ -2453,6 +2456,9 @@ handleCatFeaturesUserTextCancel() {
{
return <p key={index}>{item}</p>;
}
else if(index==errorModalContentLength-1){
return <p key={index}>{item}</p>;
}
else{
return <p key={index}>{index}: {item}</p>;
}
Expand Down