Fixed TOKENIZES_PARALLELISM env setting
This commit is contained in:
@@ -39,7 +39,7 @@ def ucsinfer(ctx, verbose, no_model_cache, model, complete_ucs):
|
||||
"""
|
||||
Tools for applying UCS categories to sounds using large-language Models
|
||||
"""
|
||||
|
||||
|
||||
if verbose:
|
||||
stream_handler.setLevel(logging.DEBUG)
|
||||
logger.info("Verbose logging is enabled")
|
||||
@@ -51,6 +51,10 @@ def ucsinfer(ctx, verbose, no_model_cache, model, complete_ucs):
|
||||
|
||||
stream_handler.setLevel(logging.WARNING)
|
||||
|
||||
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
|
||||
logger.info("Setting TOKENIZERS_PARALLELISM environment variable to `false"
|
||||
" explicitly")
|
||||
|
||||
ctx.ensure_object(dict)
|
||||
ctx.obj['model_cache'] = not no_model_cache
|
||||
ctx.obj['model_name'] = model
|
||||
@@ -199,7 +203,7 @@ def finetune(ctx):
|
||||
@click.pass_context
|
||||
def evaluate(ctx, dataset, offset, limit):
|
||||
"""
|
||||
|
||||
Evaluate performance of a model
|
||||
"""
|
||||
logger.debug("EVALUATE mode")
|
||||
logger.warning("Model evaluation is not currently implemented")
|
||||
@@ -207,6 +211,4 @@ def evaluate(ctx, dataset, offset, limit):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
|
||||
|
||||
ucsinfer(obj={})
|
||||
|
||||
Reference in New Issue
Block a user