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

ND4J tests + Intellij IDEA #5098

Closed
raver119 opened this issue May 9, 2018 · 12 comments
Closed

ND4J tests + Intellij IDEA #5098

raver119 opened this issue May 9, 2018 · 12 comments
Labels
DevOps Issues related to CI/CD and pipelines

Comments

@raver119
Copy link
Contributor

raver119 commented May 9, 2018

Intellij IDEA 2018.x has issues with ND4J tests, and it looks like it's not a bug.

https://github.com/deeplearning4j/nd4j/blob/12d63943d76c5152192d979beed03e39d9b1ab82/nd4j-backends/nd4j-backend-impls/pom.xml#L45
https://github.com/deeplearning4j/nd4j/blob/34fec21757695246b8a18a32812054f95b290cb0/nd4j-backends/nd4j-backend-impls/nd4j-native/pom.xml#L114
https://github.com/deeplearning4j/nd4j/blob/2138328469fc07bad0d5eed95112d73d9c445b72/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml#L23

These maven properties are parsed, and imported into Intellij IDEA modules properties, causing problems with IDE.

@saudet Can we reconsider that somehow?

@raver119 raver119 added DevOps Issues related to CI/CD and pipelines Java labels May 9, 2018
@saudet
Copy link
Contributor

saudet commented May 9, 2018

Which Maven properties?

@raver119
Copy link
Contributor Author

raver119 commented May 9, 2018 via email

@saudet
Copy link
Contributor

saudet commented May 9, 2018

testSourceDirectory? We can't do anything about that unless we don't share the tests..

@raver119
Copy link
Contributor Author

raver119 commented May 9, 2018 via email

@AlexDBlack
Copy link
Contributor

@raver119 what does this look like for you when it fails?
It seems like I'm unable to run nd4j tests in intellij anymore, not sure if it's the same issue or not.
Previously we set "use classpath of module" to nd4j-native.
Now I do that and simply get Class not found: "org.nd4j.linalg.Nd4jTestsC"Empty test suite.

@AlexDBlack
Copy link
Contributor

AlexDBlack commented May 28, 2018

OK, seems like this is still super-flaky... but I can now run tests with the following is a workaround:
(a) install Nd4J
(b) import nd4j-tests ONLY into intellij (separate project -> forces ND4J to use maven dependencies)
(c) Select and run clean/validate/compile under Maven Projects -> Lifecycle

Running them directly (i.e., opening more than 1 project) means I get errors related to ND4J initialization (missing native libraries).
Without the clean/validate/compile I get a ton of failed imports.

@raver119
Copy link
Contributor Author

It's getting worse guys, now on top of original issue i can't use test resources in Intellij, if nd4j is open as separate project.

We need to get these issues fixed somehow, because it seriously slows down work flow.

@raver119
Copy link
Contributor Author

deeplearning4j/pom.xml

Lines 538 to 551 in 0e66ef0

<profile>
<id>testresources</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>dl4j-test-resources</artifactId>
<version>${dl4j-test-resources.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

I think since this is declared in top-level pom.xml, Intellij just can't see it if you open nd4j as separate project.

@saudet
Copy link
Contributor

saudet commented Jul 30, 2018

@rajeev3983 That'd be a bug in IntelliJ, but we can do some copy/paste there, and if it works, we can leave it like that. It wouldn't hurt other tools.

@raver119
Copy link
Contributor Author

Ye, there's definitely something goes on in Intellij, they do some refinements... But since we have no other viable IDEs - we should adopt somehow 😄

raver119 added a commit that referenced this issue Jul 30, 2018
@raver119
Copy link
Contributor Author

deeplearning4j/nd4j/pom.xml

Lines 403 to 416 in e97090b

<profile>
<id>nd4j-testresources</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>dl4j-test-resources</artifactId>
<version>${dl4j-test-resources.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

This copypasta seems to work fine, nd4j-tests work again in latest Intellij. Is it acceptable workaround for CI/CD compatibility? @saudet @sshepel

raver119 added a commit that referenced this issue Jul 31, 2018
* huh

* - fix for #5996
- few tests added

* - workaround for #5098

* - impl for #5980: SPILL_EVERYTHING debug mode

* first test

* ignore learning if SPILL_EVERYTHING is enabled

* workspace bypass mode

* meh

* few more tweaks
@raver119
Copy link
Contributor Author

We've switched to profiles to address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Issues related to CI/CD and pipelines
Projects
None yet
Development

No branches or pull requests

3 participants