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

[Converter] Script for building the map #7732

Merged
merged 13 commits into from
Jun 20, 2023

Conversation

fengwuyao
Copy link
Collaborator

@fengwuyao fengwuyao commented Jun 1, 2023

Draft a script for build map of TFJS class and TF module path.
Mapping examples:
'GaussianDropout': 'keras.layers',
'AlphaDropout': 'keras.layers',
'Dropout': 'keras.layers',
'SpatialDropout1D': 'keras.layers',
'Dense': 'keras.layers'

By using this script, we can find the corresponding module path in TF. This is part of changes needed for supporting keras V3 format.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.

Draft a script for build map of TFJS class and TF module path.
@fengwuyao fengwuyao requested review from pyu10055 and removed request for pyu10055 and mattsoulanille June 1, 2023 17:23
@fengwuyao fengwuyao marked this pull request as ready for review June 6, 2023 20:58
@fengwuyao fengwuyao changed the title Script for building the map [Converter] Script for building the map Jun 9, 2023
Copy link
Collaborator

@Linchenn Linchenn left a comment

Choose a reason for hiding this comment

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

You may also do the tests for TFCLASS_MODULE_MAP.

@fengwuyao fengwuyao requested a review from Linchenn June 15, 2023 20:09
Copy link
Collaborator

@Linchenn Linchenn left a comment

Choose a reason for hiding this comment

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

LGTM! Just some nits. Thanks!

elif inspect.ismodule(obj):
_build_class_module_map(obj)

def build_map():
Copy link
Collaborator

Choose a reason for hiding this comment

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

get_module_path and others could call _build_class_module_map directly

@@ -0,0 +1,55 @@
# Copyright 2018 Google LLC
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could update to 2023.

Copy link
Member

@mattsoulanille mattsoulanille left a comment

Choose a reason for hiding this comment

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

LGTM

@fengwuyao fengwuyao merged commit 4dbc79c into tensorflow:master Jun 20, 2023
2 checks passed
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.

None yet

3 participants