Skip to content

Unify notebook dataset creation under DatasetJob workflow#305

Merged
cristian-tamblay merged 8 commits into
developfrom
feat/notebook-dataset-job
Sep 25, 2025
Merged

Unify notebook dataset creation under DatasetJob workflow#305
cristian-tamblay merged 8 commits into
developfrom
feat/notebook-dataset-job

Conversation

@Irozuku
Copy link
Copy Markdown
Collaborator

@Irozuku Irozuku commented Sep 23, 2025

This pull request refactors and streamlines the process for creating a dataset from a notebook in DashAI. The main changes include removing the old API endpoint for dataset creation from notebooks, updating the job logic to support notebook-based dataset creation, and modifying the frontend to use the new workflow. These updates improve maintainability and unify dataset creation under the job system.

Backend API and Job System Updates:

  • Removed the /notebook/{notebook_id}/dataset API endpoint and its associated logic for creating datasets directly from notebooks, shifting this functionality to the job system. [1] [2]
  • Enhanced the dataset job (DatasetJob) to support an optional notebook_id parameter. If provided, the job loads the dataset from the notebook's file path instead of using a dataloader. [1] [2]
  • Updated the dataset job API to accept a notebook_id and handle cases where the file input may be null, supporting notebook-based dataset creation.

Frontend Workflow and API Usage:

  • Refactored the frontend to remove direct calls to the old notebook dataset creation API, and now uses the dataset creation job with the notebook_id parameter. [1] [2]
  • Improved the dataset readiness polling logic to work with the new job-based workflow, ensuring the UI updates appropriately as the dataset is processed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the dataset creation workflow by removing the direct notebook-to-dataset API endpoint and unifying all dataset creation through the job system. The changes streamline the architecture by having notebook-based dataset creation use the same job workflow as regular dataset uploads.

  • Removed the direct /notebook/{notebook_id}/dataset API endpoint and moved functionality to the DatasetJob system
  • Enhanced DatasetJob to accept an optional notebook_id parameter for loading datasets from notebooks
  • Updated frontend to use the unified job-based workflow for both regular and notebook dataset creation

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
DashAI/front/src/pages/datasets/Datasets.jsx Refactored to use job-based workflow and unified dataset polling logic
DashAI/front/src/api/notebook.ts Removed createDatasetFromNotebook function
DashAI/front/src/api/job.ts Added notebook_id parameter and made file optional for dataset jobs
DashAI/back/job/dataset_job.py Enhanced to support notebook-based dataset creation
DashAI/back/api/api_v1/schemas/datasets_params.py Added notebook_id field to schema
DashAI/back/api/api_v1/endpoints/notebook.py Removed create_dataset_from_notebook endpoint

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread DashAI/back/job/dataset_job.py Outdated
Comment thread DashAI/front/src/pages/datasets/Datasets.jsx Outdated
Comment thread DashAI/back/api/api_v1/schemas/datasets_params.py Outdated
@cristian-tamblay cristian-tamblay merged commit 4b3d49d into develop Sep 25, 2025
5 checks passed
@cristian-tamblay cristian-tamblay deleted the feat/notebook-dataset-job branch September 25, 2025 15:49
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.

3 participants