forked from GokuMohandas/Made-With-ML
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added local catch for EFS OS/permissions issues
- Loading branch information
1 parent
5407543
commit 11ab35b
Showing
7 changed files
with
446 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ stores/ | |
mlflow/ | ||
results/ | ||
workspaces/ | ||
efs/ | ||
|
||
# VSCode | ||
.vscode/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from pathlib import Path | ||
|
||
import nbformat | ||
|
||
|
||
def clear_execution_numbers(nb_path): | ||
with open(nb_path, "r", encoding="utf-8") as f: | ||
nb = nbformat.read(f, as_version=4) | ||
for cell in nb["cells"]: | ||
if cell["cell_type"] == "code": | ||
cell["execution_count"] = None | ||
for output in cell["outputs"]: | ||
if "execution_count" in output: | ||
output["execution_count"] = None | ||
with open(nb_path, "w", encoding="utf-8") as f: | ||
nbformat.write(nb, f) | ||
|
||
|
||
if __name__ == "__main__": | ||
NOTEBOOK_DIR = Path(__file__).parent | ||
notebook_fps = list(NOTEBOOK_DIR.glob("**/*.ipynb")) | ||
for fp in notebook_fps: | ||
clear_execution_numbers(fp) |
Oops, something went wrong.