question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

captured functions have original seed injected

See original GitHub issue

the following snippet:

from sacred import Experiment

ex = Experiment()

@ex.capture
def test(seed):
    print(seed)

@ex.automain
def main(_seed):
    test(_seed)
    test()

when run, generates:

$ python main.py with seed=42
WARNING - main - No observers have been added to this run
INFO - main - Running command 'main'
INFO - main - Started
767258318
42
INFO - main - Completed after 0:00:00

Is this intended behavior? I think it should at least give a warning about injecting the original seed instead of injecting _seed, it took me a while to understand why it was not reproducing due to both the missing parameter and the missing _ on the variable name.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
uatachcommented, Jul 3, 2018

Oh, actually, I think it’s a great feature… my main problem was that seed was being injected when I wasn’t expecting it… is there a way to avoid some arguments from being injected?

@ex.capture(ignore=['seed'])
def func(seed):
  pass

func()
# TypeError: func() missing 1 required positional argument: 'seed'
0reactions
stale[bot]commented, May 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can anybody explain the whole seed thing? : r/Shinyraids
Step 1: Go to Serebii and look for what pokemon has each den. Every den has a normal raid and a rare raid,...
Read more >
Data Seeding - EF Core - Microsoft Learn
Data seeding is the process of populating a database with an initial set of data. There are several ways this can be accomplished...
Read more >
Configure and Capture Embedded Packet on Software - Cisco
This document describes the Embedded Packet Capture (EPC) feature in Cisco IOS ® software. Prerequisites. Requirements. There are no specific ...
Read more >
Mnemonic Seed - A simple explanation of BIP39.
To create a mnemonic you first of all need to generate entropy, which is our source of randomness. You can think of entropy...
Read more >
Seed Standard Definition
Seed is a general standard to aid in the discovery and consumption of a discrete unit of work contained within a Docker image....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found