guard on deleting secrets from env (#2653) [skip ci]
This commit is contained in:
@@ -57,8 +57,10 @@ async def handler(job):
|
|||||||
logger.info("Training Complete.")
|
logger.info("Training Complete.")
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
del os.environ["WANDB_API_KEY"]
|
if "WANDB_API_KEY" in os.environ:
|
||||||
del os.environ["HF_TOKEN"]
|
del os.environ["WANDB_API_KEY"]
|
||||||
|
if "HF_TOKEN" in os.environ:
|
||||||
|
del os.environ["HF_TOKEN"]
|
||||||
|
|
||||||
|
|
||||||
runpod.serverless.start({"handler": handler, "return_aggregate_stream": True})
|
runpod.serverless.start({"handler": handler, "return_aggregate_stream": True})
|
||||||
|
|||||||
Reference in New Issue
Block a user