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

Add gaussian random vector generation #595

Merged
merged 2 commits into from
Jul 31, 2020

Conversation

kmrmt
Copy link
Contributor

@kmrmt kmrmt commented Jul 28, 2020

Description:

This PR implements generating random vector from gaussian distribution.
And this PR includes a little refactor of logging.

Related Issue:

Nothing

How Has This Been Tested?:

Nothing

Environment:

  • Go Version: 1.14.4
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.0

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@pull-assistant
Copy link

pull-assistant bot commented Jul 28, 2020

Score: 0.76

Best reviewed: commit by commit


Optimal code review plan

     add gaussian random vector generation

     🤖 Update license headers / Format go codes and yaml files

Powered by Pull Assistant. Last update 938d847 ... 74fa9d3. Read the comment docs.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

@kmrmt kmrmt added the team/set SET team label Jul 28, 2020
@kmrmt kmrmt requested review from a team, kevindiu and hlts2 and removed request for a team July 28, 2020 06:07
@codecov
Copy link

codecov bot commented Jul 28, 2020

Codecov Report

Merging #595 into master will decrease coverage by 0.43%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
- Coverage   12.21%   11.78%   -0.44%     
==========================================
  Files         407      407              
  Lines       21236    21254      +18     
==========================================
- Hits         2594     2504      -90     
- Misses      18360    18473     +113     
+ Partials      282      277       -5     
Impacted Files Coverage Δ
pkg/tools/cli/loadtest/assets/dataset.go 0.00% <0.00%> (ø)
internal/db/kvs/redis/redis.go 0.00% <0.00%> (-97.44%) ⬇️
internal/db/kvs/redis/option.go 1.14% <0.00%> (-7.43%) ⬇️
internal/errgroup/group.go 93.42% <0.00%> (-1.32%) ⬇️
internal/net/http/transport/option.go 100.00% <0.00%> (ø)
pkg/agent/sidecar/service/observer/observer.go 0.00% <0.00%> (ø)
pkg/agent/core/ngt/service/option.go 13.04% <0.00%> (+0.27%) ⬆️

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 f793475...74fa9d3. Read the comment docs.

vankichi
vankichi previously approved these changes Jul 28, 2020
Copy link
Contributor

@vankichi vankichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

kevindiu
kevindiu previously approved these changes Jul 29, 2020
Copy link
Contributor

@kevindiu kevindiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vankichi
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: feature/benchmark/generate_gaussian_random_vector

Signed-off-by: Kosuke Morimoto <kou.morimoto@gmail.com>
@vdaas-ci vdaas-ci dismissed stale reviews from kevindiu and vankichi via 938d847 July 31, 2020 08:59
@vdaas-ci vdaas-ci force-pushed the feature/benchmark/generate_gaussian_random_vector branch from 90823bd to 938d847 Compare July 31, 2020 08:59
@vdaas-ci
Copy link
Collaborator

[FORMAT] Updating license headers and formatting go codes triggered by vankichi.

Copy link
Collaborator

@vdaas-ci vdaas-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[APPROVED] This PR is approved by vankichi.

@vankichi vankichi merged commit 60f4058 into master Jul 31, 2020
@vankichi vankichi deleted the feature/benchmark/generate_gaussian_random_vector branch July 31, 2020 09:04
train[i] = make([]float32, dim)
query[i] = make([]float32, dim)
for j := range train[i] {
train[i][j] = float32(rand.NormFloat64() * stdDev + mean)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci] reported by reviewdog 🐶
File is not goimports-ed (goimports)

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

Successfully merging this pull request may close these issues.

4 participants