Skip to content

Commit

Permalink
better action debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Morris committed Dec 14, 2024
1 parent 013ba85 commit 41ebe84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions poems/curator.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def get_poem(

author_summary = pd.DataFrame(author_summary_entries).T.sort_values(["probability"], ascending=[False])

logger.info(f"choosing from {len(self.catalog.df)} poems; the most likely are:\n{catalog_summary.iloc[:30].to_string()}")
logger.info(f"choosing from {len(author_summary)} authors; the most likely are:\n{author_summary.iloc[:30].to_string()}")
logger.info(f"choosing from {(self.catalog.df.probability.values > 1e-6).sum()} poems; the most likely are:\n{catalog_summary.iloc[:30].to_string()}")
logger.info(f"choosing from {(author_summary.probability.values > 1e-6).sum()} authors; the most likely are:\n{author_summary.iloc[:30].to_string()}")

chosen_loc = np.random.choice(self.catalog.df.index, p=self.catalog.df.probability)
chosen_author, chosen_title = self.catalog.df.loc[chosen_loc, ["author", "title"]]
Expand Down
5 changes: 2 additions & 3 deletions poems/data/poems.json
Original file line number Diff line number Diff line change
Expand Up @@ -38347,7 +38347,7 @@
},
"things-have-changed": {
"title": "“Things Have Changed”",
"body": "A worried man with a worried mind\nNo one in front of me and nothing behind\nThere’s a woman on my lap and she’s drinking champagne\nGot white skin, blood in my eyes\nI’m looking up into the sapphire-tinted skies\nI’m well dressed, waiting on the last train\nStanding on the gallows with my head in a noose\nAny minute now I’m expecting all hell to break loose\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed\n\nThis place ain’t doing me any good\nI’m in the wrong town, I should be in Hollywood\nJust for a second there I thought I saw something move\nGonna take dancing lessons, do the jitterbug rag\nAin’t no shortcuts, gonna dress in drag\nOnly a fool in here would think he’s got anything to prove\nLot of water under the bridge, lot of other stuff too\nDon’t get up gentlemen, I’m only passing through\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed\n\nI’ve been walking forty miles of bad road\nIf the Bible is right, the world will explode\nI’ve been trying to get as far away from myself as I can\nSome things are too hot to touch\nThe human mind can only stand so much\nYou can’t win with a losing hand\nFeel like falling in love with the first woman I meet\nPutting her in a wheelbarrow and wheeling her down the street\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed\n\nI hurt easy, I just don’t show it\nYou can hurt someone and not even know it\nThe next sixty seconds could be like an eternity\nGonna get low down, gonna fly high\nAll the truth in the world adds up to one big lie\nI’m in love with a woman who don’t even appeal to me\nMr. Jinx and Miss Lucy, they jumped in the lake\nI’m not that eager to make a mistake\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed\t\t\t\t\t\t\t\t\t\t",
"body": "A worried man with a worried mind\nNo one in front of me and nothing behind\nThere’s a woman on my lap and she’s drinking champagne\nGot white skin, blood in my eyes\nI’m looking up into the sapphire-tinted skies\nI’m well dressed, waiting on the last train\nStanding on the gallows with my head in a noose\nAny minute now I’m expecting all hell to break loose\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed\n\nThis place ain’t doing me any good\nI’m in the wrong town, I should be in Hollywood\nJust for a second there I thought I saw something move\nGonna take dancing lessons, do the jitterbug rag\nAin’t no shortcuts, gonna dress in drag\nOnly a fool in here would think he’s got anything to prove\nLot of water under the bridge, lot of other stuff too\nDon’t get up gentlemen, I’m only passing through\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed\n\nI’ve been walking forty miles of bad road\nIf the Bible is right, the world will explode\nI’ve been trying to get as far away from myself as I can\nSome things are too hot to touch\nThe human mind can only stand so much\nYou can’t win with a losing hand\nFeel like falling in love with the first woman I meet\nPutting her in a wheelbarrow and wheeling her down the street\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed\n\nI hurt easy, I just don’t show it\nYou can hurt someone and not even know it\nThe next sixty seconds could be like an eternity\nGonna get low down, gonna fly high\nAll the truth in the world adds up to one big lie\nI’m in love with a woman who don’t even appeal to me\nMr. Jinx and Miss Lucy, they jumped in the lake\nI’m not that eager to make a mistake\n\nPeople are crazy and times are strange\nI’m locked in tight, I’m out of range\nI used to care, but things have changed",
"metadata": {
"language": "English",
"tags": [
Expand Down Expand Up @@ -88108,8 +88108,7 @@
"day": 28
},
"place": {
"first": "Dublin",
"second": null,
"second": "Dublin",
"country": "Ireland"
}
},
Expand Down

0 comments on commit 41ebe84

Please sign in to comment.