Spaces:
Build error
Build error
| import nbformat from 'nbformat'; | |
| import { parse } from 'ast'; | |
| export class NotebookParser { | |
| constructor() { | |
| this.TARGET_PARAMS = new Set([ | |
| 'learning_rate', 'lr', 'batch_size', 'epochs', 'num_epochs', | |
| 'optimizer', 'loss', 'dropout', 'weight_decay', 'momentum', | |
| 'hidden_dim', 'num_layers', 'activation', 'scheduler', | |
| 'backbone', 'model_name', 'pretrained', 'num_classes', | |
| 'augmentation', 'early_stopping', 'gradient_clip', 'warmup_epochs' | |
| ]); | |
| this.extractedParams = []; | |
| } | |
| async parseNotebook(notebookPath) { | |
| const content = await fs.readFile(notebookPath, 'utf-8'); | |
| const notebook = JSON.parse(content); | |
| this.extractedParams = []; |