mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 16:25:30 +00:00
Printing warning to stderr. (#1222)
This commit is contained in:
@ -29,12 +29,12 @@ static mut REGISTERED_FORK_CALLBACK: bool = false;
|
||||
extern "C" fn child_after_fork() {
|
||||
use tk::parallelism::*;
|
||||
if has_parallelism_been_used() && !is_parallelism_configured() {
|
||||
println!(
|
||||
eprintln!(
|
||||
"huggingface/tokenizers: The current process just got forked, after parallelism has \
|
||||
already been used. Disabling parallelism to avoid deadlocks..."
|
||||
);
|
||||
println!("To disable this warning, you can either:");
|
||||
println!(
|
||||
eprintln!("To disable this warning, you can either:");
|
||||
eprintln!(
|
||||
"\t- Avoid using `tokenizers` before the fork if possible\n\
|
||||
\t- Explicitly set the environment variable {}=(true | false)",
|
||||
ENV_VARIABLE
|
||||
|
Reference in New Issue
Block a user