mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-06 06:12:39 +02:00
fix hfdataset; make dirs when save notebook
This commit is contained in:
parent
294d0fe709
commit
60e8e3eab8
2 changed files with 7 additions and 3 deletions
|
|
@ -99,6 +99,7 @@ def save_notebook(role: Role, save_dir: str = "", name: str = ""):
|
|||
for code in codes:
|
||||
clean_nb.cells.append(nbformat.v4.new_code_cell(code))
|
||||
nb = process_cells(role.execute_code.nb)
|
||||
os.makedirs(save_dir, exist_ok=True)
|
||||
file_path = save_dir / f"{name}.ipynb"
|
||||
clean_file_path = save_dir / f"{name}_clean.ipynb"
|
||||
nbformat.write(nb, file_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue