Should be able to turn off logging
See original GitHub issueπ Feature request
When doing a simple pipeline, I want to supress:
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 230/230 [00:00<00:00, 136kB/s]
convert squad examples to features: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1/1 [00:00<00:00, 241.08it/s]
add example index and unique id: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1/1 [00:00<00:00, 7037.42it/s]
Motivation
Your contribution
My code is pretty straightforward:
args = parse_args()
f = open(args.text_path, "r")
context = f.read()
# print(context)
tokenizer = AutoTokenizer.from_pretrained(args.model)
model = AutoModelForQuestionAnswering.from_pretrained(args.model)
qa = pipeline('question-answering',
model='distilbert-base-uncased-distilled-squad', tokenizer='bert-base-cased')
response = qa(context=context,
question=args.question)
print(response['answer'])
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:11 (7 by maintainers)
Top Results From Across the Web
java - Spring boot - Cannot turn off logging - Stack Overflow
One approach to completely disable logging would be to create a special logback.xml file that disables logging completely.
Read more >Turning off logging - IBM
If you do not log, then your ability to have concurrency and recovery is compromised. Logging allows the ACID properties of a database...
Read more >How to Disable Console Logging in Spring Boot - Baeldung
Furthermore, we can disable all logging activity by setting the value of the root logger level to OFF: logging.level.root=OFF
Read more >Is there a way to stop logging to Report / Log file?
You can do this by setting the log level to NONE. Now how to remove any information logged by a certain keyword and...
Read more >Disabling Cloud Logging | Resource Manager Documentation
To disable Cloud Logging, you must have the Organization Administrator ... page displays a list of organization policy constraints that are available.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here you go:
Usage:
add/remove modules as needed.
To disable logging globally - place at the beginning of the script
If desired,
set_global_logging_level
could be expanded to be a scope manager too.Wish this would stay open.