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

Error in transmogrifai gen when field has an underscore #205

Closed
wdearden opened this issue Jan 10, 2019 · 3 comments
Closed

Error in transmogrifai gen when field has an underscore #205

wdearden opened this issue Jan 10, 2019 · 3 comments
Labels

Comments

@wdearden
Copy link

Describe the bug
I discovered this bug while using the Bootstrap Your First Project docs (https://docs.transmogrif.ai/en/stable/examples/Bootstrap-Your-First-Project.html) on a csv that I have. transmogrifai gen errors out when a field name has an underscore in it.

To Reproduce
Replace Pclass with P_class in test-data/PassengerDataAll.avsc and Pclass with P_class in cli/passengers.answers.
Run from the main TransmogrifAI directory:

./gradlew cli:shadowJar
alias transmogrifai="java -cp `pwd`/cli/build/libs/\* com.salesforce.op.cli.CLI"
transmogrifai gen --input `pwd`/test-data/PassengerDataAll.csv \
  --id passengerId --response survived \
  --schema `pwd`/test-data/PassengerDataAll.avsc \
  --answers cli/passengers.answers Titanic --overwrite

cd titanic
./gradlew compileTestScala installDist

Expected behavior
I expect the last line to compile without error.

Logs or screenshots

ch-nb-3908:titanic wdearden$ ./gradlew compileTestScala installDist

> Task :compileScala
Pruning sources from previous analysis, due to incompatible CompileSetup.
/Users/wdearden/repos/oss/TransmogrifAI/titanic/src/main/scala/com/salesforce/app/Features.scala:17: value getP_class is not a member of com.salesforce.app.schema.Passenger
    .extract(asPickList(_.getP_class))
                          ^
one error found

> Task :compileScala FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileScala'.
> Compilation failed

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
3 actionable tasks: 3 executed
ch-nb-3908:titanic wdearden$ ./gradlew compileTestScala installDist

> Task :compileScala
Pruning sources from previous analysis, due to incompatible CompileSetup.
/Users/wdearden/repos/oss/TransmogrifAI/titanic/src/main/scala/com/salesforce/app/Features.scala:17: value getP_class is not a member of com.salesforce.app.schema.Passenger
    .extract(asPickList(_.getP_class))
                          ^
one error found

> Task :compileScala FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileScala'.
> Compilation failed

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
3 actionable tasks: 2 executed, 1 up-to-date

Additional context
This also fails when reading from csv and using the --auto workflow.

@tovbinm tovbinm added the bug label Jan 10, 2019
@vpatryshev
Copy link
Contributor

vpatryshev commented Jan 11, 2019 via email

@vpatryshev
Copy link
Contributor

This PR fixes the issue.

@wdearden
Copy link
Author

Awesome. Thanks!

@tovbinm tovbinm closed this as completed Jan 15, 2019
@tovbinm tovbinm mentioned this issue Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants