tensorflow / tfx

TFX is an end-to-end platform for deploying production ML pipelines
https://tensorflow.github.io/tfx/
Apache License 2.0
2.12k stars 711 forks source link

Code inistantiates abstract base classes #6942

Open smokestacklightnin opened 1 month ago

smokestacklightnin commented 1 month ago

If the bug is related to a specific library below, please raise an issue in the respective repo directly: TFX

System information

Describe the current behavior

Several tests (listed below) instantiate abstract base classes, which shouldn't happen.

I tried fixing fixing Ruff rules B024 and B027 (see #6943), but because there are instantiated ABCs, fixing those rules caused errors.

Describe the expected behavior

Only concrete classes should be instantiated.

More info

The tests and/or modules that call code that instantiate ABCs are:

tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testBeamComponentBeamExecutionSuccess
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testBeamExecutionBeamComponentWithInputArtifactAndParameters
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testBeamExecutionNonNullableReturnError
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testBeamExecutionSuccess
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testComponentAnnotation
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testJsonCompatParameter
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testJsonCompatible
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testListOfArtifacts
tfx/dsl/component/experimental/decorators_test.py::ComponentDecoratorTest::testOptionalInputsAndParameters
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testBeamComponentBeamExecutionSuccess
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testBeamExecutionBeamComponentWithInputArtifactAndParameters
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testBeamExecutionNonNullableReturnError
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testBeamExecutionSuccess
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testComponentAnnotation
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testJsonCompatParameter
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testJsonCompatible
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testListOfArtifacts
tfx/dsl/component/experimental/decorators_typeddict_test.py::ComponentDecoratorTest::testOptionalInputsAndParameters
tfx/examples/chicago_taxi_pipeline/taxi_pipeline_local_e2e_test.py::TaxiPipelineLocalEndToEndTest::testTaxiPipelineBeam
tfx/orchestration/local/local_pipeline_beam_test.py::LocalDagRunnerTest::testBeamComponentWithPlaceHolderArgs
tfx/orchestration/portable/beam_executor_operator_test.py::BeamExecutorOperatorTest::testRunExecutorWithBeamPipelineArgs
tfx/orchestration/portable/docker_executor_operator_test.py::DockerComponentLauncherTest::testLaunchSucceeds
tfx/orchestration/portable/docker_executor_operator_test.py::DockerComponentLauncherTest::testLaunchWithErrorCode
tfx/orchestration/portable/kubernetes_executor_operator_test.py::KubernetesComponentLauncherTest::testLaunch_loadInClusterSucceed
tfx/orchestration/portable/kubernetes_executor_operator_test.py::KubernetesComponentLauncherTest::testLaunch_loadKubeConfigSucceed
tfx/orchestration/portable/launcher_test.py::LauncherTest::testLauncher_DynamicExecPropertiesExecution_Fail
tfx/orchestration/portable/launcher_test.py::LauncherTest::testLauncher_DynamicExecPropertiesExecution_Success
tfx/orchestration/portable/launcher_test.py::LauncherTest::testLauncher_EmptyOptionalInputTriggersExecution
tfx/orchestration/portable/launcher_test.py::LauncherTest::testLauncher_InputNotReady
tfx/orchestration/portable/launcher_test.py::LauncherTest::testLauncher_InputPartiallyReady
tfx/orchestration/portable/python_executor_operator_test.py::PythonExecutorOperatorTest::testRunExecutor_with_InplaceUpdateExecutor
tfx/orchestration/portable/python_executor_operator_test.py::PythonExecutorOperatorTest::testRunExecutor_with_InprocessExecutor
tfx/orchestration/portable/python_executor_operator_test.py::PythonExecutorOperatorTest::testRunExecutor_with_NotInprocessExecutor
tfx/tools/cli/handler/airflow_dag_runner_patcher_test.py::AirflowDagRunnerPatcherTest::testPatcher
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testCompilePipeline
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testCompilePipelineNoPipelineArgs
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testCreatePipeline
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testCreatePipelineExistentPipeline
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testDeletePipeline
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testPipelineSchemaNoPipelineRoot
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testPipelineSchemaNoSchemaGenOutput
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testPipelineSchemaSuccessfulRun
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testUpdatePipeline
tfx/tools/cli/handler/airflow_handler_test.py::AirflowHandlerTest::testUpdatePipelineNoPipeline
tfx/tools/cli/handler/beam_dag_runner_patcher_test.py::BeamDagRunnerPatcherTest::testPatcher
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testCompilePipeline
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testCompilePipelineNoPipelineArgs
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testCreatePipeline
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testCreatePipelineExistentPipeline
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testDeletePipeline
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testPipelineSchemaNoPipelineRoot
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testPipelineSchemaNoSchemaGenOutput
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testPipelineSchemaSuccessfulRun
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testUpdatePipeline
tfx/tools/cli/handler/beam_handler_test.py::BeamHandlerTest::testUpdatePipelineNoPipeline
tfx/tools/cli/handler/kubeflow_v2_dag_runner_patcher_test.py::KubeflowV2DagRunnerPatcherTest::testPatcherBuildImageFn
tfx/tools/cli/handler/kubeflow_v2_dag_runner_patcher_test.py::KubeflowV2DagRunnerPatcherTest::testPatcherSavePipelineFn
tfx/tools/cli/handler/local_dag_runner_patcher_test.py::LocalDagRunnerPatcherTest::testPatcher
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testCompilePipeline
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testCompilePipelineNoPipelineArgs
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testCreatePipeline
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testCreatePipelineExistentPipeline
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testCreatePipelineWithFlags
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testDeletePipeline
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testPipelineSchemaNoPipelineRoot
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testPipelineSchemaNoSchemaGenOutput
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testPipelineSchemaSuccessfulRun
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testUpdatePipeline
tfx/tools/cli/handler/local_handler_test.py::LocalHandlerTest::testUpdatePipelineNoPipeline
tfx/tools/cli/handler/vertex_handler_test.py::VertexHandlerTest::testCompilePipeline
tfx/tools/cli/handler/vertex_handler_test.py::VertexHandlerTest::testCreatePipeline
tfx/tools/cli/handler/vertex_handler_test.py::VertexHandlerTest::testCreatePipelineExistentPipeline
tfx/tools/cli/handler/vertex_handler_test.py::VertexHandlerTest::testDeletePipeline
tfx/tools/cli/handler/vertex_handler_test.py::VertexHandlerTest::testUpdatePipeline
tfx/tools/cli/handler/vertex_handler_test.py::VertexHandlerTest::testUpdatePipelineNoPipeline
janasangeetha commented 3 weeks ago

Hi @smokestacklightnin, Thank you for reporting. I'll take a look and provide an update here.

janasangeetha commented 1 week ago

Hi @smokestacklightnin

6950 is merged. Please feel free to validate and close the issue.

github-actions[bot] commented 2 hours ago

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.