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

updating notebook + bumping version #199

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

dhrubo-os
Copy link
Collaborator

Description

[updating notebook + bumping version]

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #199 (8f035c6) into main (0a0fa63) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #199   +/-   ##
=======================================
  Coverage   91.15%   91.15%           
=======================================
  Files          37       37           
  Lines        4091     4091           
=======================================
  Hits         3729     3729           
  Misses        362      362           
Files Changed Coverage Δ
opensearch_py_ml/_version.py 100.00% <100.00%> (ø)

@greaa-aws
Copy link
Collaborator

greaa-aws commented Jul 25, 2023

For the first plot, let's change the colors and update the figure shape:

M, T = df_pd.shape

plt.figure(figsize=(12,4))
cm = plt.get_cmap('Dark2')
vals = np.arange(M)[::-1]

for i in range(M):
    plt.plot(smd_data[i,:], color = cm(vals[i]))

plt.title('Example metrics from the Server Machine Dataset')
plt.ylabel('Normalized metrics value')
plt.xlabel('Timestamp')
plt.show()

@greaa-aws
Copy link
Collaborator

For the second-to-last plot zooming in on the other suspected metrics in the first event, let's make it a little more clear where these metrics come from, keep their colors consistent with the first plot, and add event window highlighting:

ixs = [x for x in smd_res[0]['suspected_metrics'] if x!=6]
event_start, event_end = smd_res[0]['event_window']

plt.figure(figsize=(12, 4))
for i in ixs:
    plt.plot(smd_data[i,:], alpha=0.8, color = cm(vals[i]))

plt.fill_between(smd_res[0]['event_window'], 0, 0.1, color='skyblue', alpha=0.6)
plt.show()

@greaa-aws
Copy link
Collaborator

Lastly, maybe add a short text block between the zoomed-in plot and the plot for the second event? Could be as simple as a line that says "Next we'll plot the second event."

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
@dhrubo-os dhrubo-os merged commit 1237aa6 into opensearch-project:main Jul 27, 2023
13 checks passed
@opensearch-trigger-bot
Copy link

The backport to 1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-199-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1237aa61bb40cf6cef06002cffa02093ef4b2023
# Push it to GitHub
git push --set-upstream origin backport/backport-199-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x

Then, create a pull request where the base branch is 1.x and the compare/head branch is backport/backport-199-to-1.x.

thanawan-atc referenced this pull request in thanawan-atc/opensearch-py-ml Aug 10, 2023
* updating notebook + bumping version

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit 1237aa6)
thanawan-atc referenced this pull request in thanawan-atc/opensearch-py-ml Aug 10, 2023
* updating notebook + bumping version

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit 1237aa6)
dhrubo-os added a commit that referenced this pull request Aug 10, 2023
* updating notebook + bumping version

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit 1237aa6)

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
Co-authored-by: Dhrubo Saha <dhrubo@amazon.com>
dhrubo-os added a commit that referenced this pull request Aug 10, 2023
* updating notebook + bumping version (#199)

* updating notebook + bumping version

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit 1237aa6)

* Add description field with make_model_config_json function (#203)

* Add description field

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Restore notebook

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug test

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Resolve linting issues

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug test_sentencetransformermodel_pytest.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve test coverage

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Edit test name

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Change CHANGELOG.md & Add comment to sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve add description

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Loosen restriction

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Change function name + Add comment + Add default description

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
(cherry picked from commit 20435b1)

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
Co-authored-by: Dhrubo Saha <dhrubo@amazon.com>
dhrubo-os added a commit that referenced this pull request Aug 22, 2023
* updating notebook + bumping version (#199)

* updating notebook + bumping version

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit 1237aa6)

* Add description field with make_model_config_json function (#203)

* Add description field

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Restore notebook

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug test

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Resolve linting issues

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug test_sentencetransformermodel_pytest.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve test coverage

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Edit test name

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Change CHANGELOG.md & Add comment to sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve add description

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Loosen restriction

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Change function name + Add comment + Add default description

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
(cherry picked from commit 20435b1)

* Backport

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Fix linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update test_sentencetransformermodel_pytest.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
Co-authored-by: Dhrubo Saha <dhrubo@amazon.com>
dhrubo-os added a commit that referenced this pull request Aug 23, 2023
* updating notebook + bumping version (#199)

* updating notebook + bumping version

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* addressing comments

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
(cherry picked from commit 1237aa6)

* Add description field with make_model_config_json function (#203)

* Add description field

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Restore notebook

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug test

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Resolve linting issues

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug test_sentencetransformermodel_pytest.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve test coverage

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Edit test name

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Change CHANGELOG.md & Add comment to sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve add description

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Loosen restriction

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update sentencetransformermodel.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Change function name + Add comment + Add default description

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
(cherry picked from commit 20435b1)

* Resolve merged conflict

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
Co-authored-by: Dhrubo Saha <dhrubo@amazon.com>
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.

3 participants