pzivich / pzivich/publications-code

Bug in networkTMLE/example_usage.py

Open
#4 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
20
Forks
7
PR merge metrics
No merged PRs in 30d

Description

There seems to be a bug in the follow example script:
networkTMLE/example_usage.py

I get the following error when running the script:

Traceback (most recent call last):
  File "./networkTMLE/example_usage.py", line 79, in <module>
    tmle.define_threshold(variable='diet', threshold=3,
TypeError: define_threshold() got an unexpected keyword argument 'definition'

The error message indicates the issue is with line 79. It indicates the argument 'definition' is not defined for define_threshold function.

https://github.com/pzivich/publications-code/blob/4ef67e7fec25a0773f1db2b5bace1a691792dc03/networkTMLE/example_usage.py#L79-L80

The define_threshold function seems to be part of the mossspider package and I found the code block linked below associated with that function and it is indeed missing the "definition" argument.

https://github.com/pzivich/MossSpider/blob/62e6bd20364c7ef01b6964fd79f21be84e5ac579/mossspider/estimators/tmle.py#L753-L762

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with networkTMLE/example_usage.py at line 79 and compare the define_threshold call with the function signature in mossspider/estimators/tmle.py around lines 753-762. Run the example script to reproduce the TypeError, then verify the corrected call completes without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.