Skip to content

Conversation

@nikochiko
Copy link
Member

Q/A checklist

  • I have tested my UI changes on mobile and they look acceptable
  • I have tested changes to the workflows in both the API and the UI
  • I have done a code review of my changes and looked at each line of the diff + the references of each function I have changed
  • My changes have not increased the import time of the server
How to check import time?

time python -c 'import server'

You can visualize this using tuna:

python3 -X importtime -c 'import server' 2> out.log && tuna out.log

To measure import time for a specific library:

$ time python -c 'import pandas'

________________________________________________________
Executed in    1.15 secs    fish           external
   usr time    2.22 secs   86.00 micros    2.22 secs
   sys time    0.72 secs  613.00 micros    0.72 secs

To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:

def my_function():
    import pandas as pd
    ...

Legal Boilerplate

Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

📝 Walkthrough

Walkthrough

This change modifies configuration parameters in a modal function decorator within modal_functions/agri_llm.py. Specifically, the scaledown_window parameter is increased from 5 minutes to 15 minutes, and the timeout parameter is increased from 3 minutes to 15 minutes. These adjustments affect the GPU allocation lifecycle, teardown timing, and function execution timeout behavior. No other functional logic, dependencies, or configurations are modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that the new timeout and scaledown_window values of 15 minutes are appropriate for the function's expected execution time and GPU resource management strategy
  • Confirm that increasing the timeout from 3 to 15 minutes does not conflict with any upstream orchestration or dependency constraints
  • Ensure the scaledown timing change aligns with infrastructure cost optimization goals

Suggested reviewers

  • devxpy

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: increasing the scaledown window for agrillm to 15 minutes, which matches the summary of changes.
Description check ✅ Passed The PR description matches the required template structure with all required sections included, though the Q/A checklist items are unchecked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch agri-llm-15min-window

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 242e4ae and 6d90e98.

📒 Files selected for processing (1)
  • modal_functions/agri_llm.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{py,js,ts,tsx,java,cs,cpp,c,go,rb,php}

📄 CodeRabbit inference engine (.cursor/rules/devs-rules.mdc)

Format code in reverse topological order: place the main() function at the top and dependencies below it

Files:

  • modal_functions/agri_llm.py
🧠 Learnings (1)
📚 Learning: 2025-11-24T09:06:12.002Z
Learnt from: nikochiko
Repo: GooeyAI/gooey-server PR: 839
File: daras_ai_v2/asr.py:1296-1296
Timestamp: 2025-11-24T09:06:12.002Z
Learning: When reviewing PRs that add modal functions (identified by modal.Function.lookup or app.function decorators), verify that:
1. The modal function code file exists in the `modal_functions/` directory (not in other directories like daras_ai_v2/)
2. The import statement uses the correct path: `from modal_functions.<module_name> import app`
3. The function is decorated with app.function and matches the name used in modal.Function.lookup()

Applied to files:

  • modal_functions/agri_llm.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test (3.10.12, 1.8.3)
🔇 Additional comments (1)
modal_functions/agri_llm.py (1)

43-44: LGTM! Configuration changes align with PR objectives.

The increase in both scaledown_window and timeout to 15 minutes is correct and consistent. This will keep H100 GPU containers alive for 15 minutes of idle time (3x increase from 5 minutes), which reduces cold start latency at the cost of higher idle resource usage. The timeout increase ensures sufficient execution time for the web server function.

The alignment of both values at 15 minutes provides clean lifecycle management for the Modal containers.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@nikochiko nikochiko force-pushed the agri-llm-15min-window branch from 7673efd to 6d90e98 Compare December 19, 2025 08:52
@nikochiko nikochiko merged commit c54fed5 into master Dec 23, 2025
8 checks passed
@nikochiko nikochiko deleted the agri-llm-15min-window branch December 23, 2025 06:41
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