Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented May 29, 2025

WHY

Users can now choose to either get an immediate response after job creation or wait for the job to complete, making the component more flexible for different use cases.

Summary by CodeRabbit

  • New Features

    • Added an option to wait for fine-tuning job completion before returning results.
    • Job selection for evaluation now only displays completed jobs.
  • Improvements

    • Simplified descriptions for dataset upload keys.
    • Enhanced job selection filtering for improved flexibility.
  • Chores

    • Updated version numbers across multiple actions and components for consistency.

@vercel
Copy link

vercel bot commented May 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) May 29, 2025 2:54am
pipedream-docs ⬜️ Ignored (Inspect) May 29, 2025 2:54am
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) May 29, 2025 2:54am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 29, 2025

Walkthrough

Several Lamini action components were updated, mainly with version increments and minor property description changes. The create-fine-tune-job action introduced a new waitForCompletion option with asynchronous polling logic. The evaluate-job action now filters selectable job IDs to completed jobs. The shared jobId option was refactored for flexible filtering.

Changes

File(s) Change Summary
components/lamini/actions/create-fine-tune-job/create-fine-tune-job.mjs Added waitForCompletion prop, restructured run method for polling and multi-step async control flow.
components/lamini/actions/evaluate-job/evaluate-job.mjs Version bump; jobId prop now filters for jobs with status "COMPLETED".
components/lamini/actions/generate-completion/generate-completion.mjs
components/lamini/actions/get-batch-completions/get-batch-completions.mjs
components/lamini/sources/get-job-status/get-job-status.mjs
Version bumped from 0.0.1 to 0.0.2; no functional changes.
components/lamini/actions/upload-dataset/upload-dataset.mjs Version bump; simplified descriptions for inputKey and outputKey props.
components/lamini/lamini.app.mjs Refactored jobId option method to accept a customizable filter function.
components/lamini/package.json Package version incremented from 0.1.0 to 0.1.1.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CreateFineTuneJobAction
    participant LaminiAPI

    User->>CreateFineTuneJobAction: Trigger action (waitForCompletion = true)
    CreateFineTuneJobAction->>LaminiAPI: Create fine-tune job
    LaminiAPI-->>CreateFineTuneJobAction: Return job ID
    alt waitForCompletion = true
        loop Until job completes or max retries
            CreateFineTuneJobAction->>LaminiAPI: Poll job status
            LaminiAPI-->>CreateFineTuneJobAction: Return job status
            alt Job completed
                CreateFineTuneJobAction-->>User: Return final job status
            else Job failed
                CreateFineTuneJobAction-->>User: Throw error
            else Still running
                CreateFineTuneJobAction->>CreateFineTuneJobAction: Wait and rerun
            end
        end
    else waitForCompletion = false
        CreateFineTuneJobAction-->>User: Return job creation response
    end
Loading

Poem

In Lamini’s meadow, version numbers grow,
With polling and filters, the features now flow.
Fine-tune jobs wait, or hurry if told,
Dataset keys simpler, their stories retold.
The jobs now complete before you select,
As rabbits, we code, and always perfect!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/lamini/actions/evaluate-job/evaluate-job.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)

components/lamini/actions/create-fine-tune-job/create-fine-tune-job.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)

components/lamini/lamini.app.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:799:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:723:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:706:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:307:38)
at #link (node:internal/modules/esm/module_job:170:49)

  • 4 others
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
components/lamini/actions/create-fine-tune-job/create-fine-tune-job.mjs (1)

82-83: Consider longer timeout or configurable delays for fine-tuning jobs.

The current maximum wait time is 7.5 minutes (15 retries × 30 seconds). Fine-tuning jobs can potentially take longer depending on dataset size and model complexity. Consider:

  • Increasing MAX_RETRIES
  • Making the delay configurable as a prop
  • Implementing exponential backoff to reduce API calls while still checking frequently at the start

Also applies to: 129-131

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acb55d0 and 301ddb7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/lamini/actions/create-fine-tune-job/create-fine-tune-job.mjs (3 hunks)
  • components/lamini/actions/evaluate-job/evaluate-job.mjs (1 hunks)
  • components/lamini/actions/generate-completion/generate-completion.mjs (1 hunks)
  • components/lamini/actions/get-batch-completions/get-batch-completions.mjs (1 hunks)
  • components/lamini/actions/upload-dataset/upload-dataset.mjs (2 hunks)
  • components/lamini/lamini.app.mjs (1 hunks)
  • components/lamini/package.json (1 hunks)
  • components/lamini/sources/get-job-status/get-job-status.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (8)
components/lamini/package.json (1)

3-3: LGTM! Version bump aligns with semantic versioning.

The minor version increment from 0.1.0 to 0.1.1 is appropriate for the backwards-compatible enhancements being introduced in this PR.

components/lamini/actions/generate-completion/generate-completion.mjs (1)

8-8: LGTM! Coordinated version bump.

The patch version increment is appropriate and aligns with the coordinated version updates across the Lamini action suite.

components/lamini/actions/get-batch-completions/get-batch-completions.mjs (1)

8-8: LGTM! Consistent version increment.

The patch version bump maintains consistency with other actions in the Lamini component suite.

components/lamini/lamini.app.mjs (1)

41-44:

✅ Verification successful

Verify that dependent components handle the API change appropriately.

The jobId options method has undergone a significant API change:

  1. Parameter change: includeFineTunedModelsfilter function
  2. Behavioral change: Default now shows all jobs instead of only completed jobs
  3. Breaking change: Existing consumers expecting only completed jobs may be affected

While this change aligns with the PR objectives for more flexible job handling, ensure that all dependent actions (like evaluate-job) explicitly provide appropriate filters to maintain expected behavior.

Let me verify that dependent components are properly updated to handle this change:


🏁 Script executed:

#!/bin/bash
# Description: Check for any usage of the old includeFineTunedModels parameter and verify filter usage
# Expected: No remaining usage of old parameter, proper filter functions in place

# Search for any remaining usage of includeFineTunedModels
echo "=== Searching for old includeFineTunedModels parameter usage ==="
rg "includeFineTunedModels" --type js

# Search for jobId propDefinition usage to see how filters are applied
echo "=== Searching for jobId propDefinition usage ==="
rg -A 10 -B 2 "jobId.*propDefinition" --type js

# Search for evaluate-job specifically mentioned in AI summary
echo "=== Checking evaluate-job implementation ==="
fd "evaluate-job" --exec cat {}

Length of output: 1494


🏁 Script executed:

#!/bin/bash
# List all JS files in the lamini/actions folder that reference 'jobId'
echo "=== Files in components/lamini/actions referencing 'jobId' ==="
rg -l "jobId" --type js components/lamini/actions

# Show surrounding context for each occurrence to verify propDefinition usage
echo "=== Context for 'jobId' usages in actions ==="
rg -n "jobId" -C5 --type js components/lamini/actions

Length of output: 351


🏁 Script executed:

#!/bin/bash
# List all JavaScript and MJS files under components/lamini/actions
echo "=== JS/MJS files in components/lamini/actions ==="
fd -e js -e mjs components/lamini/actions

# Search for all 'jobId' references with context to confirm propDefinition overrides
echo "=== Context for 'jobId' usages in actions ==="
rg -n "jobId" -C5 components/lamini/actions

Length of output: 8536


Dependent components correctly preserve previous behavior

No instances of the old includeFineTunedModels parameter remain, and the only consumer of the jobId options method—components/lamini/actions/evaluate-job/evaluate-job.mjs—explicitly supplies the original completed‐jobs filter:

  • In evaluate-job.mjs (lines 11–17), the propDefinition passes
    filter: ({ status }) => status === "COMPLETED",
    ensuring only completed jobs appear by default.

Since all dependent actions have been updated to provide their own filter, there are no breaking changes to address.

components/lamini/actions/upload-dataset/upload-dataset.mjs (1)

10-10: LGTM! Version bump and clarified descriptions.

The version increment and simplified property descriptions are appropriate. The removal of CSV references from the descriptions better aligns with the actual implementation, which only supports JSONL/JSONLINES formats.

Also applies to: 22-22, 27-27

components/lamini/sources/get-job-status/get-job-status.mjs (1)

11-11: LGTM! Consistent version bump.

The version increment aligns with the coordinated package update.

components/lamini/actions/evaluate-job/evaluate-job.mjs (1)

7-7: Good addition of job status filtering.

The version increment and the filter to show only completed jobs for evaluation make perfect sense. This improves the user experience by preventing selection of jobs that cannot be evaluated.

Also applies to: 15-17

components/lamini/actions/create-fine-tune-job/create-fine-tune-job.mjs (1)

9-9: Well-implemented polling logic for job completion.

The addition of waitForCompletion option and the associated polling implementation using $.flow.rerun is clean and follows Pipedream patterns correctly. The state management between runs and error handling are properly implemented.

Also applies to: 52-58, 82-161

@lcaresia lcaresia moved this from Ready for PR Review to Ready for QA in Component (Source and Action) Backlog May 29, 2025
@vunguyenhung vunguyenhung moved this from Ready for QA to Ready for Release in Component (Source and Action) Backlog May 30, 2025
@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test report
https://vunguyenhung.notion.site/Audit-lamini-improvements-202bf548bb5e81e58f65eff21c7fe8cf

@vunguyenhung vunguyenhung merged commit b1d1018 into master May 30, 2025
11 checks passed
@vunguyenhung vunguyenhung deleted the lamini-fixes branch May 30, 2025 00:23
@github-project-automation github-project-automation bot moved this from Ready for Release to Done in Component (Source and Action) Backlog May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants