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

code polish #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

code polish #27

wants to merge 4 commits into from

Conversation

dengliming
Copy link
Contributor

  • Use DataType.valueOf instead of DataType.getDataTypefromString
  • Fix model test in windows
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/X/dlm_github/JRedisAI/target/test-classes/test_data/mnist_model_quant.tflite

	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
	at java.base/java.nio.file.Paths.get(Paths.java:84)
	at com.redislabs.redisai.RedisAITest.testSetModelFromModelTFLite(RedisAITest.java:199)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)

@codecov
Copy link

codecov bot commented Apr 17, 2021

Codecov Report

Merging #27 (6b6991d) into master (e7cab06) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
+ Coverage   87.62%   87.73%   +0.10%     
==========================================
  Files          12       12              
  Lines         598      587      -11     
  Branches       83       78       -5     
==========================================
- Hits          524      515       -9     
+ Misses         34       33       -1     
+ Partials       40       39       -1     
Impacted Files Coverage Δ
src/main/java/com/redislabs/redisai/DataType.java 80.55% <ø> (-2.38%) ⬇️
src/main/java/com/redislabs/redisai/Tensor.java 92.45% <100.00%> (+3.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7cab06...6b6991d. Read the comment docs.

DvirDukhan
DvirDukhan previously approved these changes Apr 18, 2021
@DvirDukhan
Copy link
Contributor

hi @dengliming
Thanks for the PRs you submitted!
Any Idea why DeepSource failing on this PR?

@dengliming
Copy link
Contributor Author

@DvirDukhan yes. but I think these are low priority issues. We can ignore it for now.

@gkorland gkorland requested a review from sazzad16 May 17, 2021 06:35
@sazzad16
Copy link
Collaborator

@gkorland Did you notice that thoretically it's a breaking change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants