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

Enable data to be logged to WhyLabs anonymous sessions #195

Merged
merged 13 commits into from
Apr 8, 2021

Conversation

naddeoa
Copy link
Contributor

@naddeoa naddeoa commented Apr 7, 2021

This change adds a feature to whylogs that allows it to log data to
WhyLabs anonymous sessions. Anonymous sessions allow people to jump into
whylogs with a dataset, log it to dataset profiles, and send it to
WhyLabs for visualization and alerts without requiring a login.

This change updates whylogs to have a Session concept that is
essentially a wrapper around a bunch of loggers. Sessions manage
loggers and logger life cycles, as well as call WhyLabs to create and
sessions and upload the dataset profiles that loggers create.

This also adds an example for anonymous sessions with dates

This adds a snapshot of a dataset from kaggle
(https://www.kaggle.com/yugagrawal95/sample-media-spends-data) and an
example that shows how properly log that data to whylogs for an
anonymous session on WhyLabs. This dataset actually has a day date
column so its much clearer how the logger is supposed to work in regards
to dates.

@andyndang
Copy link
Contributor

flake8 is failing FYI

@lalmei lalmei self-requested a review April 8, 2021 00:38
Copy link
Contributor

@lalmei lalmei left a comment

Choose a reason for hiding this comment

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

LGTM

Alex and others added 13 commits April 8, 2021 07:59
… an example script for logging data via whylabs
…ned flow | fix some edge cases with whylabs client wrapper
Loggers now are stored with the key of the arguments that defined them.
This means there will be new loggers created for every new timestamp,
dataset name, tags, etc.

Not 100% sure if this is what we want for this API so I'll have to check
with everyone else. It is definitely better then what's there but it may
not be right.
This adds a snapshot of a dataset from kaggle
(https://www.kaggle.com/yugagrawal95/sample-media-spends-data) and an
example that shows how properly log that data to whylogs for an
anonymous session on WhyLabs. This dataset actually has a day date
column so its much clearer how the logger is supposed to work in regards
to dates.
@coveralls
Copy link

coveralls commented Apr 8, 2021

Pull Request Test Coverage Report for Build 729964070

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 35 of 105 (33.33%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-1.4%) to 82.644%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/whylogs/whylabs_client/init.py 0 2 0.0%
src/whylogs/app/writers.py 4 12 33.33%
src/whylogs/app/session.py 27 38 71.05%
src/whylogs/whylabs_client/wrapper.py 0 49 0.0%
Files with Coverage Reduction New Missed Lines %
src/whylogs/app/session.py 1 80.93%
Totals Coverage Status
Change from base Build 728196621: -1.4%
Covered Lines: 3185
Relevant Lines: 3706

💛 - Coveralls

@naddeoa naddeoa marked this pull request as ready for review April 8, 2021 15:28
@lalmei lalmei merged commit dcdf98e into mainline Apr 8, 2021
@lalmei lalmei added the feature label Apr 10, 2021
@lalmei lalmei deleted the anonymous-sessions-rc1 branch July 20, 2021 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants