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

Code inistantiates abstract base classes #6942

Open
smokestacklightnin opened this issue Oct 27, 2024 · 2 comments
Open

Code inistantiates abstract base classes #6942

smokestacklightnin opened this issue Oct 27, 2024 · 2 comments

Comments

@smokestacklightnin
Copy link
Contributor

smokestacklightnin commented Oct 27, 2024

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

System information

  • Have I specified the code to reproduce the issue (Yes, No): Yes
  • Environment in which the code is executed (e.g., Local(Linux/MacOS/Windows),
    Interactive Notebook, Google Cloud, etc): All
  • TensorFlow version: All
  • TFX Version: 1.15.1
  • Python version: All
  • Python dependencies (from pip freeze output): Any

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
Copy link
Contributor

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

@janasangeetha
Copy link
Contributor

Hi @smokestacklightnin
#6950 is merged. Please feel free to validate and close the issue.

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

No branches or pull requests

2 participants