Repository navigation
Lesson 1: import Olist data and plant evaluation scenarios - #2
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lesson 1 gives the agent something real to investigate. The Olist dataset is loaded
into six tables (customers, products, orders, items, payments, shipments), with
generated names and emails since Olist has none.
Real orders alone can't test an agent, because nobody knows the right answer for
them. So a second task plants five orders with known outcomes (delayed shipment,
lost package, closed return window, final sale item, duplicate charge). These
become the eval cases in later lessons. The orders are picked by a fixed rule and
the task is safe to run twice.
The import first took about 70 minutes because it created one row at a time. It now
inserts in batches of 1,000 and takes about 3 minutes with identical totals
(99,441 orders, 112,650 items, 103,886 payments). It uses insert_all!, so a
duplicate raises an error instead of being skipped silently.
Every model has a spec, and the scenarios task has its own (20 examples, all passing).
A clean db:reset, import, scenarios and spec run from scratch passes too.