Skip to content

Commit

Permalink
Merge pull request #577 from HyunjunA/master
Browse files Browse the repository at this point in the history
Update error message to show aliro user guide
  • Loading branch information
HyunjunA authored Feb 3, 2023
2 parents f3a1565 + e4ce916 commit e645d16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
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

0 comments on commit e645d16

Please sign in to comment.