Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

[discussion] Refactor pytorch operator APIs #84

@richardsliu

Description

@richardsliu

Most of the types defined in https://github.com/kubeflow/pytorch-operator/blob/master/pkg/apis/pytorch/v1alpha2/types.go overlaps with TFJob. The structures of the APIs in tf-operator and pytorch-operator are similar enough such that they should just extend from a single API.

I propose something like:

Common:

  • JobStatus
  • ReplicaStatus
  • JobCondition
  • JobConditionType
  • CleanPodPolicy
  • RestartPolicy

TFJob:

  • TFJobSpec
  • TFJobReplicaSpec
  • TFJobReplicaType

Pytorch:

  • PyTorchJobSpec
  • PyTorchReplicaSpec
  • PyTorchReplicaType

The common types can reside in the tf-operator repository for now. This will allow us to:

  1. Keep API semantics and vocabulary consistent across all training components;
  2. Reduce code duplication when possible;
  3. Ensure feature parity across components.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions