DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk8 min

From Ring to Repo: Predicting Developer Fatigue With Oura Data and a Random Forest

A DEV Community tutorial turns Oura ring data into a Random Forest score for developer fatigue. The pipeline is easy to copy, but nothing in it shows the score detects fatigue, and this guide explains why and how to build it carefully.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A DEV Community tutorial published September 16, 2026 builds a complete personal-data prototype. It pulls sleep and readiness data from the Oura Cloud API, reshapes it with Polars, fits a scikit-learn Random Forest regressor, and displays a predicted “Cognitive Load Score” in Grafana. The plumbing is worth copying. The idea that the output detects developer fatigue is not supported by anything the article reports: no participants, no dataset, no trained-model results, no accuracy figure, and no check that its outcome label measures anything real.

The sections below take the pipeline one stage at a time, then cover the choices that decide whether the output means anything, the access and consent requirements, and how to evaluate a model like this without flattering it.

As an Amazon Associate I earn from qualifying purchases.

What the pipeline does, stage by stage

The architecture has five parts. Each is simple to build, and each can quietly distort the result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Stage Tool in the tutorial Role in the prototype Where it goes wrong
Data access Oura Cloud API (API V2) Supplies daily summary and heart-rate records after OAuth2 authorization Missing account or membership, outdated API version, or broader scopes than the model needs
Transformation Polars Aligns records by date, computes sleep-stage proportions and a rolling readiness average Records filed under the wrong day; rolling windows that reach into nights that had not yet ended
Model scikit-learn RandomForestRegressor Fits a regressor from features to a label; the code uses a train/test split and a score call A shuffled split on time-ordered data can overstate performance
Label Self-labels or work signals such as GitHub pull-request velocity Defines what the model is trying to predict The label may not measure fatigue at all
Display Grafana Plots the predicted “Cognitive Load Score” over time A smooth line looks authoritative even when the model is weak

Which Oura signals are candidate inputs

The tutorial proposes two kinds of feature. Neither is a direct measurement of cognitive load, and the article does not present them as one. Treat them as candidates that need to earn their place.

#1 Best Overall
Oura Ring 5 Smart Ring - Silver - Size 10 - Fitness & Sleep Tracker
  • THE WORLD’S SMALLEST SMART RING - 40% smaller than the previous generation, Oura Ring 5 is thinner, lighter and smaller than ever. The updated all-titanium design is more scratch-resistant and comfortable than ever
  • SIZING IS ESSENTIAL - Oura Ring 5 uses unique sizing different from standard jewelry rings and other Oura Ring generations; use the Oura Ring 5 Sizing Kit to find your perfect fit before purchasing
  • EVERYDAY HEALTH SENSING - Oura tracks over 50 health metrics, including sleep, activity, stress, heart health, metabolic health and women’s health metrics. Oura seamlessly integrates with over 40 apps including Natural Cycles, Strava, & more
  • OURA MEMBERSHIP - First month of membership is included with purchase, for new members only. Subscription is 5.99/mo afterwards. Membership is tied to your account via the Oura App, not your physical ring
  • REBUILT FOR GREATER ACCURACY - Oura Ring 5 has been re-engineered and reconfigured, providing more precise personal health data. Larger, smarter sensors bring research-grade accuracy—all in Oura’s smallest form factor yet

Sleep-stage proportions

These are the shares of a night spent in each sleep stage, expressed as proportions of total sleep. The article poses the question “Is it lack of REM sleep or high resting heart rate?” That is the author’s framing for the experiment, not evidence that a REM deficit or a high resting heart rate causes developer fatigue. A model that finds a correlation with a chosen label has found a pattern in one dataset. It has not found a cause.

Rolling readiness average

Oura’s readiness score is a summary that combines several signals, so it is already one step removed from any single physiological measure. Averaging it over a window smooths day-to-day noise. The article does not state the window length, and a longer window leans more heavily on earlier days. Choose the window before you look at results, and write it down with the model.

Heart-rate signals

Oura’s documentation describes heart-rate data as a separate OAuth2 scope, so requesting it is a deliberate choice. Resting heart rate is half of the article’s question, but the article reports no relationship between it and any outcome. Add it only if you can state in advance what it should show and why.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
OURA Ring 5 Smart Ring - Gold - Size 8 - Fitness & Sleep Tracker
  • THE WORLD’S SMALLEST SMART RING - 40% smaller than the previous generation, Oura Ring 5 is thinner, lighter and smaller than ever. The updated all-titanium design is more scratch-resistant and comfortable than ever
  • SIZING IS ESSENTIAL - Oura Ring 5 uses unique sizing different from standard jewelry rings and other Oura Ring generations; use the Oura Ring 5 Sizing Kit to find your perfect fit before purchasing
  • EVERYDAY HEALTH SENSING - Oura tracks over 50 health metrics, including sleep, activity, stress, heart health, metabolic health and women’s health metrics. Oura seamlessly integrates with over 40 apps including Natural Cycles, Strava, & more
  • OURA MEMBERSHIP - First month of membership is included with purchase, for new members only. Subscription is 5.99/mo afterwards. Membership is tied to your account via the Oura App, not your physical ring
  • REBUILT FOR GREATER ACCURACY - Oura Ring 5 has been re-engineered and reconfigured, providing more precise personal health data. Larger, smarter sensors bring research-grade accuracy—all in Oura’s smallest form factor yet

The outcome label decides what the model learns

The article names two possible targets: a “Cognitive Load Score” that the model predicts, and a “Productivity Score” suggested as a label built from self-labels or work signals. A regressor learns whatever the label rewards. The label is therefore where a fatigue project succeeds or fails, and it deserves more scrutiny than the model.

Self-labels

A daily rating of energy or focus is the most direct proxy for how a person feels. Its weaknesses are rating drift, day-to-day mood, and the fact that people often rate their workload as well as their state. Use a fixed scale, ask the same question every day, and write a short definition of what each value means before collecting anything.

Pull-request velocity

PR counts and merge rates are easy to pull from GitHub, but they describe output, not fatigue or code quality. Task size, review delays, team practices, work hours and project context all move them. A developer working through a hard problem may open fewer, larger PRs, and a rested developer may split the same work into many small ones. The score can change for reasons that have nothing to do with how the person feels.

Rank #3
Oura Ring 5 Smart Ring - Gold - Size 6 - Fitness & Sleep Tracker
  • THE WORLD’S SMALLEST SMART RING - 40% smaller than the previous generation, Oura Ring 5 is thinner, lighter and smaller than ever. The updated all-titanium design is more scratch-resistant and comfortable than ever
  • SIZING IS ESSENTIAL - Oura Ring 5 uses unique sizing different from standard jewelry rings and other Oura Ring generations; use the Oura Ring 5 Sizing Kit to find your perfect fit before purchasing
  • EVERYDAY HEALTH SENSING - Oura tracks over 50 health metrics, including sleep, activity, stress, heart health, metabolic health and women’s health metrics. Oura seamlessly integrates with over 40 apps including Natural Cycles, Strava, & more
  • OURA MEMBERSHIP - First month of membership is included with purchase, for new members only. Subscription is 5.99/mo afterwards. Membership is tied to your account via the Oura App, not your physical ring
  • REBUILT FOR GREATER ACCURACY - Oura Ring 5 has been re-engineered and reconfigured, providing more precise personal health data. Larger, smarter sensors bring research-grade accuracy—all in Oura’s smallest form factor yet
Criterion Self-rated energy or focus PR velocity or merge counts
Construct validity (does it measure what its name claims?) Measures self-perceived state, not cognitive load Measures merged output, not fatigue or code quality
Repeatability Depends on the rating scale and the person’s day Easy to repeat from the platform, but shaped by team conventions
Work-context confounding High: workload shapes ratings High: task size, review delays and project context
Time granularity Can be recorded daily, matching nightly sleep data Must be cut into intervals that line up with each night’s sleep

Align dates before you model anything

Date alignment is a quiet source of false signal. Oura records each night against a time, while work activity happens in local-time intervals, and the two can be mismatched by up to a full day depending on how each record is filed.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Take a night that ends at 06:30 on Tuesday and a pull request merged at 23:00 on Monday. The merge happened before that sleep, so the sleep cannot have influenced the merge. A calendar-day join can still pair them, depending on which date the sleep record is filed under. The model then learns a relationship that cannot be used for prediction. Settle these rules before writing the join:

  1. Assign each sleep record to the work interval that follows it, using one fixed time zone.
  2. Build rolling features only from nights that ended before the prediction time.
  3. Apply the same time zone to Oura timestamps and to work logs.

Evaluate the model without flattering it

The article’s code includes a train/test split and a score call. The split proportion and the model’s hyperparameters are code settings, not results. The article reports no model score, no error figure and no validation of its label, so nothing in it shows that the model beats a simple guess.

Rank #4
OURA Ring 5 Sizing Kit - Size Before You Buy
  • SIZE BEFORE YOU BUY - It’s important to size yourself using our Oura Ring 5 Sizing Kit before purchasing an Oura Ring 5. Oura Ring 5 sizes are different from standard ring sizes and Oura Ring 4 sizes
  • AVAILABLE SIZES - Oura Ring 5 is available in sizes 6-13. There are no half sizes
  • CHOOSE A FINGER - Oura Ring 5 works on all fingers and can be worn on either hand. For optimal accuracy, we recommend wearing your Oura Ring 5 on your index, middle, or ring finger. Size the exact finger you plan to wear your Oura Ring on
  • CHOOSE A FINGER - Oura Ring 5 works on all fingers and can be worn on either hand. For optimal accuracy, we recommend wearing your Oura Ring 5 on your index, middle, or ring finger. Size the exact finger you plan to wear your Oura Ring on
  • COMFORT AND ACCURACY - A properly fitting Oura Ring 5 will result in the highest data accuracy, comfort, and overall experience

The main hazard is the random split. Adjacent days of sleep and work are similar, so a shuffled split lets the model train on Thursday and test on Wednesday. The score then measures recognition of a neighbouring day, not prediction. Use a time-ordered split: train on earlier weeks and test on later ones. Then check the following:

  • Leakage in features. Every rolling average must use only data that existed before the prediction time.
  • Leakage in labels. The label must not be computed from the features, or from data that only appears after the prediction time.
  • A naive baseline. Compare the model with predicting the average label, and with predicting yesterday’s label. A model that cannot beat yesterday’s label has learned little that is useful.
  • Scope. One person’s data describes that person. Claims about developers in general require results across several people, tested separately for each.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Getting Oura data: access requirements

Personal data requires the account, application, membership and authorization steps below. The sample-data route in the article does not require them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An Oura account and an API application

Oura’s support documentation says API use requires an Oura account and an API application. Set up both before writing the authorization code, because the OAuth2 flow depends on the application you register.

Best Value
Sale
Milavan Smart Health Ring Fitness Tracker for Men Women, Rose Gold 8
  • 【Size Before You Buy】Before purchasing the Milavan Smart Ring, we recommend referring to the size chart and carefully measuring your finger circumference. This helps ensure a comfortable fit and avoid unnecessary returns or exchanges
  • 【Wellness Tracking】The slim ring features advanced 4.0 sensors that automatically track your heart rate every 30 minutes while worn. Daily data is available in the app for reference only and is not intended for medical use
  • 【Intelligent Sleep Tracker】The fitness ring automatically tracks your sleep quality, including deep and light sleep, REM (eye movement), and awake periods. You can view all sleep data anytime in the app for daily reference
  • 【8 Sports Modes Tracking】Supports 8 sports modes, including Running, Cycling, Jump Rope, Walking, Hiking, Yoga, Dancing, and Golf. View workout duration, steps, heart rate, speed, calories burned, distance, and other activity data in the app
  • 【Stylish Fitness Companion】Featuring a slim 2mm profile and a specially polished inner surface, this smart ring is designed for comfortable all-day wear and most sports activities. View detailed workout data in the app after selecting a sport mode

An active membership for Gen3 rings

Oura’s current support guidance says Gen3 users without an active Oura Membership cannot access their data through the API. Check the support documentation for other ring generations rather than assuming the same rule applies or does not apply.

Use API V2

API V1 was removed on January 22, 2024, so any code that calls V1 endpoints will fail against current access. Build on V2. Oura’s support documentation also says a recent Oura app version may be needed for newer V2 data types. If a field is missing, update the app and check the data type before debugging your code.

OAuth2 and minimal scopes

Oura documents OAuth2 authentication with named scopes for categories such as daily summaries and heart-rate data, and recommends requesting only the scopes an integration needs. The article’s bearer-token snippet is a compact illustration. Pasting a token into a script can support a local experiment, but it is not a production authentication pattern. Follow Oura’s current OAuth2 setup instructions, keep tokens out of source code, and revoke and replace credentials if they are exposed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Consent, privacy and workplace use

Oura’s API agreement describes user data and user consent, and restricts certain uses or combinations of personal data made without consent. Joining health-related signals to work activity is exactly the combination that needs the most care. A build that takes this seriously meets the following requirements:

  • Every person whose data is used gives informed permission for this specific purpose, and can withdraw it.
  • Only the fields the model needs are collected. Raw sleep and heart-rate streams are not copied into work-tracking systems.
  • Tokens and personal data are stored behind access controls, and only the people who need the scores can see them.
  • The label source, such as Git activity, is collected under the same consent and for the same stated purpose.

A workplace deployment raises employment and privacy questions that depend on jurisdiction. Neither Oura’s agreement nor the article settles those obligations. Complete privacy and employment review before any colleague’s data enters the pipeline.

Choosing a starting point

There are two real ways into the tutorial: use an Oura Ring with your own authorized data, or start from sample data. They serve different goals.

Quick Recap

Bestseller No. 4
OURA Ring 5 Sizing Kit - Size Before You Buy
OURA Ring 5 Sizing Kit - Size Before You Buy
AVAILABLE SIZES - Oura Ring 5 is available in sizes 6-13. There are no half sizes
$10.00
Factor Sample data Your own Oura Ring data
Hardware cost None. The article says a ring is not needed merely to explore the code Requires an Oura Ring. The article gives no price, so check Oura’s current product listing
Representativeness Not your physiology or work pattern. Useful for checking code paths Reflects your own pattern, but is a sample of one person
API and account setup Not described in the article Oura account, API application, OAuth2 authorization, and an active membership if you use a Gen3 ring
Privacy exposure Low, because no personal health record is involved Personal health data on your machine and in any dashboard you build
Best use Learning the pipeline and debugging transformations Testing whether your own signals track a label you trust

Choose based on what you are trying to learn:

  • To understand the pipeline, start with sample data and stay there until the transformations and split behave as intended.
  • To run a personal experiment, use your own data only after the label is defined, the date alignment is fixed, and the evaluation is time-ordered.
  • To monitor other people, complete the consent and review steps above before collecting anything.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.