Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triton gpt uids #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Triton gpt uids #8

wants to merge 3 commits into from

Conversation

RockfordMankiniUCSD
Copy link
Contributor

No description provided.

### run special tritongpt validator that gets permitted UIDs from namespace instead of sicad

try:
namespace = self.kube.get_namespace(request.namespace)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to streamline logic - how about something like this?
` #

def validate_pod(self, request: Request):

    ### if tgpt-validator == enabled
    ### run special tritongpt validator that gets permitted UIDs from namespace instead of sicad

    try:
        namespace = self.kube.get_namespace(request.namespace)
        tgpt_label = self.kube.get_tgpt_label(namespace)
        
        if(tgpt_label == "enabled"):
            self.logger.info("Triton GPT Mode Activated. Only running TritonGPT Validator.")
            TritonGPTValidator(self.kube, self.logger).validate_pod(request)
            return

    except KeyError: as err:
        self.logger.debug("Failed to evaluate TGPT label logic. Falling back on regular validator components. Error: " + str(err)
        pass
        
    for component_validator in self.component_validators:
        component_validator.validate_pod(request)

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants