Skip to content

Frequently Asked Questions

General Questions

What is the Virtualitics SDK?

The Virtualitics SDK is a Python framework for building interactive data applications on the Virtualitics AI Platform.

What Python version is required?

Python 3.11 or later is required.

Can I use the SDK locally without the platform?

The SDK is designed to work with the Virtualitics AI Platform. Some features may work standalone, but full functionality requires the platform.

Development

How do I debug my app?

  • Check backend logs: docker logs -f predict-backend
  • Check worker logs: docker logs -f predict-worker
  • Use print statements (they appear in logs)
  • Enable debug mode in your IDE

My app isn't showing up in the platform

  • Verify PROJECTS_LIST includes your module
  • Check for import errors in backend logs
  • Ensure __init__.py exports your app
  • Restart the platform containers

How do I pass data between steps?

Use _outLink and _inLink:

# In Step 1
self._outLink.my_data = dataset

# In Step 2
dataset = self._inLink.my_data

Can I use external libraries?

Yes, add them to your requirements.txt and they'll be installed when your app loads.

UI and Elements

How do I make elements responsive?

Elements automatically adjust to screen size. Use Dashboard layouts for complex arrangements.

Can I customize element styling?

Limited customization is available through element properties. Full styling customization is not currently supported.

How do I validate user inputs?

Validate in the action() method:

def action(self, flow_metadata):
    value = self.page.get_element_by_id("input").value
    if not is_valid(value):
        return error_page("Invalid input")
    # Process valid input

Data and Assets

What's the maximum dataset size?

While there's no hard limit, datasets >100MB may impact performance. Consider chunking or server-side processing for large data.

Can I connect to external databases?

Yes, use the DataSource element and connection APIs.

How do I save results?

Store results in _outLink, they're automatically persisted.

Deployment

How do I upload my app to the platform?

Use the virtualitics-cli:

virtualitics-cli upload my_app.whl --host https://platform.com

Can I schedule my app to run automatically?

Yes, workflows can be scheduled through the platform UI or API.

How do I share my app with others?

Set is_shareable=True when creating your App, then share instances through the platform.

Performance

My app is running slowly

  • Check for large datasets
  • Optimize data processing
  • Use PySpark for distributed processing
  • Profile your code to find bottlenecks

How can I show progress for long operations?

Update _progress and _message:

for i, item in enumerate(items):
    self._progress = int((i / len(items)) * 100)
    self._message = f"Processing {i+1} of {len(items)}"
    process(item)

LLM Integration

How do I use IRIS in my app?

Add the Chat element to your page or use app-level LLM callbacks.

Can I customize the LLM behavior?

Yes, use system prompts and custom agents to control behavior.

Errors and Troubleshooting

Common Error Messages

"Unable to include the character '/' in the Flow Title" - Don't use / in step or app names

"Duplicate section titles found" - Ensure all sections have unique titles within a page

"Element ID not found" - Check that the element ID in get_element_by_id() matches the element's id parameter

Getting Help