Skip to content

Commit

Permalink
Adjust handling of _tf_keras namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Sep 23, 2023
1 parent 29a954a commit e80b0f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pip_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ def run_namex_conversion():

def create_legacy_directory():
# Make keras/_tf_keras/ by copying keras/
tf_keras_dirpath = os.path.join(package, "_tf_keras")
tf_keras_dirpath_parent = os.path.join(package, "_tf_keras")
tf_keras_dirpath = os.path.join(tf_keras_dirpath_parent, "keras")
os.makedirs(tf_keras_dirpath)
with open(os.path.join(tf_keras_dirpath_parent, "__init__.py"), "w") as f:
f.write("")
with open(os.path.join(package, "__init__.py")) as f:
init_file = f.read()
init_file = init_file.replace(
Expand Down

0 comments on commit e80b0f2

Please sign in to comment.