Skip to content

Commit

Permalink
shorten and simplify implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Potts committed Oct 23, 2023
1 parent 22ba73f commit 6dbbd04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions metaflow/plugins/kubernetes/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import math
import os
import re
import secrets
import shlex
import time
from typing import Dict, List, Optional
import uuid


from metaflow import current, util
from metaflow.exception import MetaflowException
Expand Down Expand Up @@ -179,7 +180,7 @@ def create_job(
job = (
KubernetesClient()
.job(
generate_name="t-{uid}".format(uid=str(uuid.uuid4())),
generate_name="t-{entropy}".format(entropy=secrets.token_hex(2)),
namespace=namespace,
service_account=service_account,
secrets=secrets,
Expand Down

0 comments on commit 6dbbd04

Please sign in to comment.