-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: train udsink request deduplication (#39)
Signed-off-by: Avik Basu <[email protected]> Co-authored-by: Nandita Koppisetty <[email protected]>
- Loading branch information
1 parent
d27bf45
commit 4789b19
Showing
8 changed files
with
158 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ LICENSE | |
.codecov.yml | ||
.coveragerc | ||
.flake8 | ||
.hack/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env sh | ||
set -eu | ||
|
||
echo '# Changelog' | ||
echo | ||
|
||
tag= | ||
git tag -l 'v*' | sed 's/-rc/~/' | sort -rV | sed 's/~/-rc/' | while read last; do | ||
if [ "$tag" != "" ]; then | ||
echo "## $(git for-each-ref --format='%(refname:strip=2) (%(creatordate:short))' refs/tags/${tag})" | ||
echo | ||
git_log='git --no-pager log --no-merges --invert-grep --grep=^\(build\|chore\|ci\|docs\|test\):' | ||
$git_log --format=' * [%h](https://github.com/numaproj/numalogic-prometheus/commit/%H) %s' $last..$tag | ||
echo | ||
echo "### Contributors" | ||
echo | ||
$git_log --format=' * %an' $last..$tag | sort -u | ||
echo | ||
fi | ||
tag=$last | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
import logging | ||
from unittest.mock import patch | ||
|
||
import fakeredis | ||
|
||
server = fakeredis.FakeServer() | ||
redis_client = fakeredis.FakeStrictRedis(server=server, decode_responses=True) | ||
|
||
LOGGER = logging.getLogger(__name__) | ||
LOGGER.setLevel(logging.DEBUG) | ||
|
||
stream_handler = logging.StreamHandler() | ||
stream_handler.setLevel(logging.DEBUG) | ||
|
||
|
||
formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s") | ||
stream_handler.setFormatter(formatter) | ||
|
||
LOGGER.addHandler(stream_handler) | ||
|
||
|
||
with patch("numaprom.redis.get_redis_client") as mock_get_redis_client: | ||
mock_get_redis_client.return_value = redis_client | ||
from numaprom.udf import window | ||
from numaprom.udsink import train | ||
|
||
|
||
__all__ = ["redis_client", "window"] | ||
__all__ = ["redis_client", "window", "train"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters