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

Functions that can't have their hybrid status determined are being marked as not being hybrid #285

Closed
khatchad opened this issue Nov 8, 2023 · 6 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@khatchad
Copy link
Member

khatchad commented Nov 8, 2023

Function main._distributed_train_step() experiences an exception when determining whether it is hybrid but is somehow marked as not being hybrid.

Actual Behavior

https://github.com/ponder-lab/mead-baseline/blob/4411029050d5549b34c75fe205451d6a1e80d335/mead/api_examples/pretrain_paired_tf.py#L290-L298

Here, tf.function refers to something in a file within the project and not necessarily TF:

https://github.com/ponder-lab/mead-baseline/blob/4411029050d5549b34c75fe205451d6a1e80d335/mead/api_examples/pretrain_paired_tf.py#L7

In the CSV, I am seeing:

subject function module relative path parameters tensor parameter hybrid side-effects refactoring passing precondition status
mead-baseline main._distributed_train_step pretrain_paired_tf mead/api_examples/pretrain_paired_tf.py 1 FALSE FALSE       3

From the "status" column, we see though that there is a failed precondition. In statuses.csv, I am seeing:

subject function module relative path refactoring severity code message
mead-baseline main._distributed_train_step pretrain_paired_tf mead/api_examples/pretrain_paired_tf.py   3 3 Can't infer side-effects, most likely due to a call graph issue caused by a decorator or a missing function call.

Expected Behavior

Column "hybrid" should be blank just like "side-effects" (Python side-effects are also indeterminable for this function; see #282). Instead, it is "FALSE."

We should also see a failure in (at least) statuses.csv about how we cannot determine the hybrid status.

Relevant Logs

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:27.322
!MESSAGE Checking function: main._distributed_train_step().

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:27.322
!MESSAGE Computing whether decorator: tf.function is hybrid.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:27.322
!MESSAGE Getting PySelection for exprType: Attribute[value=Name[id=tf, ctx=Load, reserved=false], attr=NameTok[id=function, ctx=Attrib], ctx=Load].

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:27.322
!MESSAGE Getting declaring module name for SimpleNode: Attribute[value=Name[id=tf, ctx=Load, reserved=false], attr=NameTok[id=function, ctx=Attrib], ctx=Load].

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:27.323
!MESSAGE Getting declaring module name for selection: function in line: @tf.function, module: pretrain_paired_tf, file: /home/rk1424/git/Python-Subjects/mead-baseline/mead/api_examples/pretrain_paired_tf.py, and project: P/mead-baseline.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.789
!MESSAGE Found 33 "pointer(s)."

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.790
!MESSAGE Found definition: Definition=function line=1293 col=5 module=tensorflow.python.eager.def_function.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.790
!MESSAGE Found module: tensorflow.python.eager.def_function (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.791
!MESSAGE Found module name: tensorflow.python.eager.def_function.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.791
!MESSAGE Found definition: Definition=function line=4084 col=5 module=tensorflow.python.keras.backend.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.791
!MESSAGE Found module: tensorflow.python.keras.backend (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.792
!MESSAGE Found module name: tensorflow.python.keras.backend.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.792
!MESSAGE Found definition: Definition=function line=15 col=5 module=test.inspect_stringized_annotations.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.793
!MESSAGE Found module: test.inspect_stringized_annotations (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.793
!MESSAGE Found module name: test.inspect_stringized_annotations.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.794
!MESSAGE Found definition: Definition=function line=13 col=5 module=test.inspect_stock_annotations.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.794
!MESSAGE Found module: test.inspect_stock_annotations (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.794
!MESSAGE Found module name: test.inspect_stock_annotations.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.795
!MESSAGE Found definition: Definition=LazyLoader line=64 col=1 module=~ensorflow.python.eager.backprop.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.795
!MESSAGE Found module: ~ensorflow.python.eager.backprop (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.796
!MESSAGE Found module name: ~ensorflow.python.eager.backprop.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.796
!MESSAGE Found definition: Definition=function line=4302 col=5 module=keras.backend.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.796
!MESSAGE Found module: keras.backend (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.809
!MESSAGE Found module name: keras.backend.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.810
!MESSAGE Found definition: Definition=function line=1293 col=5 module=~ensorflow.python.eager.def_function.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.810
!MESSAGE Found module: ~ensorflow.python.eager.def_function (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.811
!MESSAGE Found module name: ~ensorflow.python.eager.def_function.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.811
!MESSAGE Found definition: Definition=LazyLoader line=64 col=1 module=tensorflow.python.eager.backprop.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.812
!MESSAGE Found module: tensorflow.python.eager.backprop (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.812
!MESSAGE Found module name: tensorflow.python.eager.backprop.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.812
!MESSAGE Found definition: Definition=function line=933 col=13 module=unittest.test.testmock.testpatch.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.813
!MESSAGE Found module: unittest.test.testmock.testpatch (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.813
!MESSAGE Found module name: unittest.test.testmock.testpatch.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.814
!MESSAGE Found definition: Definition=function line=4084 col=5 module=~ensorflow.python.keras.backend.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.814
!MESSAGE Found module: ~ensorflow.python.keras.backend (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.814
!MESSAGE Found module name: ~ensorflow.python.keras.backend.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.814
!MESSAGE Found definition: Definition=function line=24 col=9 module=test.test_importlib.threaded_import_hangers.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.815
!MESSAGE Found module: test.test_importlib.threaded_import_hangers (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.815
!MESSAGE Found module name: test.test_importlib.threaded_import_hangers.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.816
!MESSAGE Found definition: Definition=function line=1186 col=9 module=_pytest.python.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.816
!MESSAGE Found module: _pytest.python (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.817
!MESSAGE Found module name: _pytest.python.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.817
!MESSAGE Found definition: Definition=function line=163 col=7 module=tensorflow.python.framework.convert_to_constants.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.818
!MESSAGE Found module: tensorflow.python.framework.convert_to_constants (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.818
!MESSAGE Found module name: tensorflow.python.framework.convert_to_constants.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.819
!MESSAGE Found definition: Definition=function line=307 col=9 module=pluggy._hooks.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.819
!MESSAGE Found module: pluggy._hooks (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.820
!MESSAGE Found module name: pluggy._hooks.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.820
!MESSAGE Found definition: Definition=function line=321 col=9 module=pluggy._hooks.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.820
!MESSAGE Found module: pluggy._hooks (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.821
!MESSAGE Found module name: pluggy._hooks.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.821
!MESSAGE Found definition: Definition=function line=41 col=5 module=~ensorflow.python.eager.function_saved_model_utils.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.821
!MESSAGE Found module: ~ensorflow.python.eager.function_saved_model_utils (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.821
!MESSAGE Found module name: ~ensorflow.python.eager.function_saved_model_utils.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.822
!MESSAGE Found definition: Definition=function line=854 col=5 module=tensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.822
!MESSAGE Found module: tensorflow.python.keras.layers.core (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.823
!MESSAGE Found module name: tensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.823
!MESSAGE Found definition: Definition=function line=1334 col=5 module=tensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.823
!MESSAGE Found module: tensorflow.python.keras.layers.core (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.824
!MESSAGE Found module name: tensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.824
!MESSAGE Found definition: Definition=function line=1346 col=9 module=threading.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found module: threading (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found module name: threading.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found definition: Definition=function line=163 col=7 module=~ensorflow.python.framework.convert_to_constants.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found module: ~ensorflow.python.framework.convert_to_constants (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found module name: ~ensorflow.python.framework.convert_to_constants.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found definition: Definition=function line=135 col=5 module=keras.layers.core.lambda_layer.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found module: keras.layers.core.lambda_layer (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found module name: keras.layers.core.lambda_layer.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found definition: Definition=function line=854 col=5 module=~ensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.825
!MESSAGE Found module: ~ensorflow.python.keras.layers.core (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module name: ~ensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found definition: Definition=function line=1334 col=5 module=~ensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module: ~ensorflow.python.keras.layers.core (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module name: ~ensorflow.python.keras.layers.core.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found definition: Definition=function line=129 col=5 module=~ensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module: ~ensorflow.python.framework.ops (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module name: ~ensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found definition: Definition=function line=156 col=7 module=~ensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module: ~ensorflow.python.framework.ops (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module name: ~ensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found definition: Definition=function line=314 col=7 module=tensorflow.python.data.ops.structured_function.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module: tensorflow.python.data.ops.structured_function (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found module name: tensorflow.python.data.ops.structured_function.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.826
!MESSAGE Found definition: Definition=function line=201 col=5 module=keras.layers.core.tf_op_layer.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module: keras.layers.core.tf_op_layer (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module name: keras.layers.core.tf_op_layer.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found definition: Definition=function line=458 col=9 module=_pytest.fixtures.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module: _pytest.fixtures (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module name: _pytest.fixtures.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found definition: Definition=function line=129 col=5 module=tensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module: tensorflow.python.framework.ops (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module name: tensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found definition: Definition=function line=156 col=7 module=tensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module: tensorflow.python.framework.ops (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module name: tensorflow.python.framework.ops.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found definition: Definition=function line=1741 col=9 module=_pytest.python.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module: _pytest.python (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module name: _pytest.python.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found definition: Definition=function line=41 col=5 module=tensorflow.python.eager.function_saved_model_utils.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module: tensorflow.python.eager.function_saved_model_utils (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.827
!MESSAGE Found module name: tensorflow.python.eager.function_saved_model_utils.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.828
!MESSAGE Found definition: Definition=function line=314 col=7 module=~ensorflow.python.data.ops.structured_function.

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.828
!MESSAGE Found module: ~ensorflow.python.data.ops.structured_function (SourceModule).

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.828
!MESSAGE Found module name: ~ensorflow.python.data.ops.structured_function.

!ENTRY edu.cuny.hunter.hybridize.core 2 0 2023-11-07 21:56:28.828
!MESSAGE Can't determine if decorator: tf.function in selection: function, module: pretrain_paired_tf, file: pretrain_paired_tf.py, and project; P/mead-baseline is hybrid.
!STACK 0
edu.cuny.hunter.hybridize.core.analysis.AmbiguousDeclaringModuleException: Ambigious definitions (27) found for selection: function in line: @tf.function, module: pretrain_paired_tf, file: pretrain_paired_tf.py, and project: P/mead-baseline.
	at edu.cuny.hunter.hybridize.core.analysis.Util.getDeclaringModuleName(Util.java:107)
	at edu.cuny.hunter.hybridize.core.analysis.Util.getFullyQualifiedName(Util.java:142)
	at edu.cuny.hunter.hybridize.core.analysis.Util.getFullyQualifiedName(Util.java:130)
	at edu.cuny.hunter.hybridize.core.analysis.Function.isHybrid(Function.java:856)
	at edu.cuny.hunter.hybridize.core.analysis.Function.computeHybridization(Function.java:787)
	at edu.cuny.hunter.hybridize.core.refactorings.HybridizeFunctionRefactoringProcessor.lambda$2(HybridizeFunctionRefactoringProcessor.java:216)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

!ENTRY edu.cuny.hunter.hybridize.core 1 0 2023-11-07 21:56:28.828
!MESSAGE main._distributed_train_step() is not hybrid.
@khatchad khatchad added the bug Something isn't working label Nov 8, 2023
@khatchad khatchad added this to the Prototype implementation milestone Nov 8, 2023
@khatchad khatchad self-assigned this Nov 8, 2023
@khatchad
Copy link
Member Author

khatchad commented Nov 9, 2023

Looks like a dupe of #120.

@khatchad khatchad added the duplicate This issue or pull request already exists label Nov 9, 2023
@khatchad khatchad closed this as completed Nov 9, 2023
@khatchad
Copy link
Member Author

khatchad commented Nov 9, 2023

@tatianacv Remember when we did all of that work to see if tf.function actually referred to the real tf.function in TF? Have a look at the beginning of this issue's description.

@tatianacv
Copy link
Member

Yes, I recall!

@khatchad
Copy link
Member Author

khatchad commented Nov 10, 2023

I'm seeing this now in functions.csv:

subject function module relative path parameters tensor parameter hybrid refactoring passing precondition status
mead-baseline main._distributed_train_step pretrain_paired_tf mead/api_examples/pretrain_paired_tf.py 1 FALSE       3

Column "hybrid" is now blank.

@khatchad
Copy link
Member Author

In statuses.csv:

subject function module relative path refactoring severity code message
mead-baseline main._distributed_train_step pretrain_paired_tf mead/api_examples/pretrain_paired_tf.py   3 8 Can't compute whether main._distributed_train_step() is hybrid.

We would see the other status if I had the always check side-effects on.

@khatchad
Copy link
Member Author

I guess the question now is whether we want to consider this a failure. We cannot understand which decorator we are looking at, but we can say for sure that it's not tf.function from TF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants