M365con.net Microsoft Community Conference 2027
Aug. 28, 2026

Supercharge AI Training with Microsoft Fabric Notebooks

Artificial intelligence and machine learning projects demand massive amounts of computational power, seamless data integration, and efficient processing workflows. Historically, data scientists have struggled with the overhead of moving large datasets across disparate environments, managing fragmented toolsets, and dealing with significant latency during training sessions. Today, we have a unified solution that bridges the gap between massive data engineering and agile machine learning development. By leveraging Microsoft Fabric Notebooks, teams can streamline their entire operational pipeline from raw data ingestion to model deployment.

In this blog post, we will expand on the core concepts covered in our podcast episode, Train AI Models with Microsoft Fabric Notebooks. We will dive deep into setting up your environment, preparing datasets efficiently, running training jobs, managing models, and adopting best practices that will supercharge your AI workflows.

Fabric Notebooks Setup

Setting up your workspace in fabric notebooks gives you a strong foundation for AI model training. This section provides a fabric notebooks overview and guides you through each step, from account creation to launching your first notebook. You will see how easy it is to connect with your data and leverage Spark for powerful analytics.

Accessing Microsoft Fabric

Creating an Account

To begin, you need access to fabric. You can create a Fabric free account, which lets you log in to the Fabric app. If you already use Microsoft Power BI, you can use your existing Power BI account. This simple process ensures you can start working with notebooks right away.

Tip: No major access issues have been reported by users, so you can expect a smooth sign-up experience.

Navigating Workspace

Once you log in, you will see the fabric workspace. Here, you can organize your projects, manage resources, and access your lakehouse. The workspace dashboard helps you find your notebooks, datasets, and other assets quickly. You can also check your workspace capacity and settings to make sure you meet the requirements for AI projects.

Requirement Description
Microsoft Fabric Set up fabric with F64 capacity.
Lakehouse Add a lakehouse to the notebook and download data from a public blob.
Azure AI Search Configure Azure AI Search.
Copilot Ensure the tenant setting for Copilot is enabled.
Workspace Capacity Use a supported capacity (F2 or higher, or P1 or higher).
Cross-geo Settings Enable tenant settings for cross-geo data processing if needed.

Launching a Notebook

Kernel Selection

After setting up your workspace, you can start creating a new notebook. When you launch a notebook, you choose a kernel. The kernel controls the programming language and environment. Fabric notebooks support Python and other languages, making them flexible for different AI tasks.

Library Setup

Before you begin your analysis, you may need to install or import libraries. Fabric notebooks make this process simple. You can add libraries for data science, machine learning, or visualization directly in your notebook. This setup allows you to use Spark for processing large datasets and connect seamlessly with your lakehouse.

Feature Description
Language Flexibility Supports Python and other languages for data science workflows.
Data Processing at Scale Uses Spark to handle large datasets efficiently.
Interactivity Lets you run code and see results in real time.
Seamless Integration with Storage Connects directly with lakehouse, so you work with data where it lives.

When creating a new notebook, you avoid the hassle of moving data between tools. You can process, analyze, and visualize your data all in one place. This integration saves time and reduces errors. If you are new to fabric, you may notice a learning curve, but the unified workspace and direct data access make the process much easier.

Note: If you work with large projects or teams, fabric notebooks help you avoid fragmented workflows. You can keep everything organized and efficient from the start.

Data Preparation in Fabric Notebooks

Preparing your dataset in fabric notebooks sets the stage for successful AI model training. You can streamline every step, from data ingestion to data visualization, using the built-in tools and Spark-powered features.

Importing Data

Connecting to Lakehouse

You start by connecting your notebook to a lakehouse. This connection gives you direct access to your datasets, so you do not need to move files between systems. You can work with data where it lives, which saves time and reduces errors. The lakehouse stores your dataset in delta tables, making it easy to load and update information as needed.

Loading Data with Spark

After connecting, you use Spark for data ingestion. Spark lets you load large datasets quickly and efficiently. You can read data from multiple sources, including CSV files, Parquet files, or existing tables in your lakehouse. Spark handles the heavy lifting, so you can focus on working with data instead of worrying about memory limits.

Tip: Use Spark DataFrames to process your dataset at scale. This approach helps you manage even the largest datasets without slowing down your workflow.

Data Cleaning

Handling Missing Values

Cleaning your dataset is a key step before training any model. You can launch Data Wrangler from your fabric notebook to explore your dataset and spot missing values. Data Wrangler provides automatic code generation for common cleaning tasks, such as filling in missing values or removing incomplete rows. You can export these cleaning steps as reusable functions in pandas or PySpark, making your workflow more efficient.

Feature Engineering

Feature engineering helps you create new variables from your existing dataset. You can use Python-based tools in fabric notebooks to transform your data and build features that improve model accuracy. Spark makes it easy to apply these transformations across your entire dataset, even if you have millions of rows.

Best Practice:

  1. Use Spark and Python tools to clean and transform your dataset.
  2. Create experiments to test different feature sets.
  3. Track your runs and results using MLflow in the fabric UI.

Data Exploration

Summary Statistics

Exploring your dataset helps you understand its structure and quality. You can generate summary statistics, such as mean, median, and standard deviation, directly in your notebook. These statistics give you a quick overview of your dataset and highlight any issues that need attention.

Visualizations

Data visualization brings your dataset to life. Fabric notebooks support built-in visualization functions and integrate with libraries like Matplotlib and Bokeh. You can turn tabular results into charts without writing extra code. The display function lets you interact with your data and spot trends or outliers easily.

Note: Interactive data visualization helps you make better decisions when preparing your dataset for AI model training.

Train Models in Fabric

Writing Training Code

Using Python or R

You can write your model training code in several languages within Microsoft Fabric Notebooks. The platform supports:

  • PySpark (Python)
  • Spark (Scala)
  • Spark SQL
  • SparkR (R)

Most users choose Python for its flexibility and rich ecosystem. You can also use R if you prefer its statistical tools. PySpark lets you scale your learning jobs across many nodes, which is important for large datasets. Python works well for deep learning and pytorch model development. If you want to use pytorch, you can install the library and start building your pytorch model right away. You can also use SparkR for statistical learning or Spark SQL for quick data queries.

Structuring Code Cells

You should organize your code into clear, logical cells. Start with data loading and cleaning. Add cells for feature engineering and exploratory analysis. Place your model training code in its own cell. This structure helps you debug and rerun parts of your machine learning experiment without repeating earlier steps. You can also add markdown cells to explain your logic and document your experiments. This approach makes your notebooks easy to read and share with others.

Algorithm Selection

Choosing Models

You need to pick the right algorithm for your task. Logistic regression works well for binary classification problems. You can also use libraries like scikit-learn, PySpark ML, TensorFlow, or pytorch for more advanced models. If you want to build a pytorch model, you can use the GPU support in fabric to speed up your learning process. PyTorch is popular for deep learning, image recognition, and natural language processing. You can also use pytorch for transfer learning and fine-tuning pre-trained models.

When you select an algorithm, think about your data size, the type of problem, and the resources you have. FLAML, created by Microsoft Research, helps you train models efficiently. It uses less compute and works well with parallel jobs. This makes it a good choice for large-scale machine learning experiment runs.

Setting Hyperparameters

Hyperparameters control how your models learn. You can use flaml.tune to search for the best settings. Fabric lets you run many tuning trials at once, thanks to Spark’s parallel processing. This means you can test different learning rates, batch sizes, or layers for your pytorch model quickly. You can track each trial in your machine learning experiment using experiment tracking. Visualization tools help you compare results and pick the best configuration. You can see which settings work best for your model testing and model training.

Tip: Use experiment tracking to log every trial, metric, and parameter. This helps you repeat successful experiments and avoid mistakes.

Running Training Jobs

Monitoring Progress

You can monitor your training jobs in real time. Fabric notebooks show you how each step performs. High Concurrency mode speeds up your jobs by about 30%. You get detailed logs for every notebook step. MLflow integration gives you autologging, so you do not have to log metrics by hand. You can define your training sessions and choose which parameters and metrics to record. This makes it easy to track your learning progress and compare different experiments.

Scenario Python Notebooks (2-core VM) PySpark Notebooks (Spark Compute)
Handling of Large Datasets Limited by single-node memory. May struggle with scaling. Distributed processing ensures scalable handling of multi-GB to TB workloads.

You can see that PySpark Notebooks handle large datasets better. This is important when you train pytorch model or other deep learning models on big data.

Checkpointing

Checkpointing lets you save your model’s state during training. If your job stops or you want to pause, you can resume from the last checkpoint. This is useful for long-running pytorch model training jobs. You do not lose your progress if you need to restart. You can also use checkpoints to test different learning strategies or continue your machine learning experiment from a certain point.

Note: Always set checkpoints when you train models on large datasets. This practice saves time and protects your work.

You now have the tools to train, test, and monitor machine learning models in Microsoft Fabric Notebooks. You can run experiments, tune hyperparameters, and build powerful pytorch model solutions for any data science challenge.

AI Model Training Workflow

AI Model Training Workflow

You can unlock the full power of ai model training by mastering the workflow in Microsoft Fabric Notebooks. This section guides you through distributed evaluation, model tuning, and the use of built-in AI functions. You will see how Spark, real-time monitoring, and Copilot features help you build better models faster.

Distributed Evaluation

Evaluating Performance

You can evaluate your model’s performance across large datasets using Spark’s distributed computing. Spark splits your test data into smaller parts and processes them in parallel. This means you do not have to wait hours for results. You can check metrics like accuracy, precision, and recall right inside your notebook. This approach works well for deep learning with pytorch, where you need to test models on millions of records. Real-time monitoring in fabric lets you watch resource usage and job progress as your evaluation runs.

Comparing Models

You can compare different models side by side in notebooks. For example, you might train a pytorch model and a scikit-learn model on the same dataset. You can log each model’s results and visualize them with built-in charts. This helps you pick the best model for your ai model training project. You can also use experiment tracking to save your results and share them with your team. This makes it easy to repeat successful experiments and improve your workflow.

Tuning Models

Hyperparameter Search

You can boost your model’s accuracy by tuning hyperparameters. Microsoft Fabric Notebooks support advanced tools like Optuna for this task. Here is a simple workflow you can follow:

  1. Create a study with Optuna to store trial results:
    study = optuna.create_study(direction="maximize")
  2. Optimize the study over a set number of trials:
    study.optimize(objective, n_trials=60, show_progress_bar=True)
  3. Print the results of the trials:
    print("Number of finished trials:", len(study.trials))

You can also visualize your search with plots. Use plot_optimization_history(study).show() to see how your model improves over time. Try plot_param_importances(study).show() to find out which settings matter most. Use plot_parallel_coordinate(study).show() to explore how different parameters interact. Do not just copy code—adapt and experiment with different hyperparameters to get the best results for your pytorch or other models.

Avoiding Overfitting

You want your ai model training to create models that work well on new data, not just the training set. Overfitting happens when a model learns the training data too well and fails on new examples. You can prevent this by using cross-validation and stacking techniques.

Stacking typically uses cross-validation to generate predictions for the meta-model, ensuring that no information leaks from training into testing. This adds complexity but also provides robustness.

You can also use early stopping in pytorch, regularization, and dropout layers to make your models more robust. Always check your validation scores and adjust your training process if you see signs of overfitting.

Built-in AI Functions

Text Classification

You can save time on common tasks by using built-in AI functions in Microsoft Fabric Notebooks. For text classification, you can use the Classify function to sort emails, support tickets, or documents into categories. This works well for business cases like routing urgent requests or tagging customer feedback. You can also build custom pytorch models for more advanced classification tasks.

Sentiment Analysis

Sentiment analysis helps you understand the tone of text, such as customer reviews or social media posts. You can use the Sentiment Analysis function to flag negative comments and respond quickly. This feature works out of the box in notebooks, so you do not need to write complex code. You can also combine built-in functions with your own pytorch models for even better results.

Here is a table of built-in AI functions you can use in your ai model training workflow:

Function Description Use Cases
Summarize Shortens long text into short summaries Lengthy company internal emails into short, concise summary
Classify Categorizes text based on custom labels or tags Classify support tickets based on severity (urgent, critical, etc.)
Extract Retrieve specific information from input text Extract name, location from a customer email database
Translate Convert text from one language to another Translate customer emails from Spanish to English
Similarity Check two different texts and tells you how similar Find similar customer support tickets that highlight the same problem
Sentiment Analysis Identifies the tone of text – positive, negative, or neutral Flag customer reviews having words like “unacceptable”, “bad” and address them before they escalate

You can use Copilot to generate code, suggest improvements, and automate repetitive steps. This makes your ai model training process faster and more productive. You can focus on building and tuning pytorch models while Copilot handles the routine work.

By following this workflow in Microsoft Fabric Notebooks, you can scale your ai model training, tune pytorch models efficiently, and use built-in AI functions to solve real-world problems.

Model Management and Deployment

Saving Models

Exporting and Versioning

You need a reliable way to save and track your pytorch models in fabric. Start by using mlflow to log every training run. Mlflow records your parameters, metrics, and artifacts. This helps you find the best version of your pytorch model when you need it. You should enable autologging at the start of tracking experiments. This way, you capture all important details from the first run. You cannot add logs later, so start early.

You can use Delta Lake time travel to pin the exact version of your training data. This ensures you can always reproduce your results. Register each pytorch model in the mlflow model registry. Include the version, training data hash, performance metrics, and owner. This creates a clear audit trail for managing models. Before you move a model to production, set up a human review process. Use Azure DevOps pull request approvals linked to fabric deployment pipelines. This step keeps your workflow safe and compliant.

Tip: Always keep your best pytorch models registered in mlflow. You can roll back to a previous version if you find a problem.

Sharing Notebooks

Collaboration Features

You can work with your team easily in notebooks. The platform connects directly to your Lakehouse, so everyone uses the same data. Notebooks combine code, comments, and outputs in one place. This makes it simple to share ideas and results. Team members can use their favorite programming languages, like Python or R, on the same dataset. This flexibility helps everyone contribute to managing models and tracking experiments.

Feature Description
Easy to work with Lakehouse data Direct connection to fabric Lakehouse for seamless data interaction without extra setup.
Better collaboration Notebooks combine code, comments, and outputs, enhancing understanding and sharing among team members.
Supports different coding styles Allows team members to use their preferred programming languages, fostering collaboration on the same dataset.

Deploying Models

Integration with Fabric Pipelines

You can deploy your pytorch models using fabric deployment pipelines. These pipelines help you manage models across development, test, and production environments. You keep control and consistency at every stage. The visual workflow in Microsoft Fabric Deployment Pipelines lets you see where your pytorch model is and what steps come next. You can promote your pytorch models through controlled environments. This process ensures your team follows best practices for managing models.

  • Integrate with Azure OpenAI services using SynapseML.
  • Use the Python SDK for deployment.
  • Access your pytorch models through REST APIs.
  • Common use cases include text summarization and sentiment analysis.

Real-Time Inference

You can serve your pytorch models for real-time inference. This means you can make predictions on new data as soon as it arrives. For example, you can use your deployed pytorch model to classify support tickets or analyze customer feedback instantly. Mlflow tracks every deployment, so you know which version of your pytorch model is running. You can update or roll back deployments quickly if you need to.

Note: Real-time inference helps you respond to business needs without delay. Use mlflow to monitor and manage your pytorch models in production.

By following these steps, you can handle saving, sharing, and deploying your pytorch models in fabric. You keep your workflow organized and your results reproducible. Mlflow and notebooks give you the tools you need for tracking experiments and managing models at scale.

Best Practices in Fabric Notebooks

Reproducibility

Documenting Workflow

You should always document your workflow to make your AI projects easy to repeat and understand. Good documentation helps you and your team track every step of your model training process. Start by describing the business context for each experiment. Register your models with clear explanations of what they predict, how to use them, and any known limits. Use markdown cells in your notebooks to explain your logic and decisions. This habit makes your work easier to share and review.

  • Use Delta Lake time travel to pin the exact version of your training data for each experiment.
  • Separate feature engineering from training by creating reusable feature tables.
  • Enable autologging at the start of your experiments to capture all parameters and results.
  • Stage your models before production. Validate them against holdout data and compare with current models.
  • Schedule regular checks for model drift by comparing predictions with real outcomes.

Tip: Document every experiment as you go. You will save time and avoid confusion later.

Environment Management

Managing your environment ensures that your results stay consistent across different runs. You should record the versions of all libraries and dependencies you use. This practice helps you avoid surprises when you or your teammates rerun your notebooks. Use environment files or package lists to keep track of your setup. When you share your work, include these details so others can reproduce your results without issues.

Collaboration

Team Sharing

Working as a team in fabric is simple and effective. You can share notebooks with your colleagues and set permissions for each user. This control lets you decide who can view or edit your work. Teams can add cell-level comments to discuss code, ask questions, or suggest changes. These features help everyone stay on the same page and move projects forward together.

  • Share notebooks directly with your team.
  • Set user permissions to control access.
  • Use cell-level comments for feedback and discussion.

Code Review

Code review is important for quality and learning. Notebooks support version history, so you can see what changed and when. If you need to, you can roll back to a previous version. Integration with Git allows you to use source control for even better tracking. These tools make it easy to review code, spot errors, and keep your project safe.

  • Check version history to track changes.
  • Roll back to earlier versions if needed.
  • Use Git integration for advanced source control.

Performance Optimization

Resource Management

You can optimize performance by managing your resources wisely. Right-size your compute capacity based on your workload. Scale up during busy times and pause resources when not in use. Reserved capacity and spot workloads can help you save costs. Set budgets and alerts to avoid overspending. Monitor workload peaks to detect bottlenecks early.

Optimization Tip Benefit
Right-size capacity Matches resources to workload needs
Reserved/spot workloads Reduces costs
Monitor peaks Finds bottlenecks quickly
Set budgets/alerts Prevents unexpected expenses

Efficient Data Handling

Efficient data handling speeds up your AI projects. Process data in-place to minimize movement and save time. Clean up your storage to improve performance. Use reusable feature tables to avoid repeating work. Parallel hyperparameter tuning lets you test many settings at once, making your experiments faster. Always track your experiments to keep your results organized.

Note: Efficient data handling and smart resource management help you get the most out of your AI projects.

Troubleshooting

When you work with Microsoft Fabric Notebooks, you may face challenges that slow down your progress. Knowing how to troubleshoot common issues helps you keep your projects on track. This section gives you practical steps for debugging and finding support when you need it.

Debugging

You can solve many problems by following a clear process. Start by checking the Monitoring Hub in the Microsoft Fabric portal. This tool shows you if any pipelines have failed or if there are errors in your workspace. If you see a problem, look at the details, such as the workspace name, activator, and eventstream source. These details help you find the root cause quickly.

Use the following steps to debug your data pipelines and notebooks:

  1. Check the Monitoring Hub for failed jobs or errors.
  2. Validate all connections and credentials, especially for Azure SQL or other linked services.
  3. Use debug mode to step through your data pipelines and spot where they get stuck.
  4. Review scheduling and trigger settings to make sure your jobs run as planned.
  5. Monitor resource usage to see if slow performance comes from limited capacity.
  6. Visit the Microsoft Fabric Status Page to check for service outages or updates.
  7. Export and import pipelines using the 'Save As' feature if you need to duplicate or reset them.
  8. Document rule IDs, conditions, timestamps, and affected objects to keep track of what happened.

Tip: When running and debugging notebooks, always keep a log of changes and actions. This habit makes it easier to trace issues and share findings with your team.

Support Resources

If you cannot fix a problem on your own, you have several support options. Microsoft provides a strong community and official help channels. You can use these resources to get answers and learn from others.

  • Microsoft Docs offer step-by-step guides and troubleshooting articles.
  • Community forums let you ask questions and get advice from both peers and Microsoft staff.
  • Support tickets connect you with Microsoft experts for more complex issues.
  • The Monitoring Hub and status pages keep you updated on ongoing problems or outages.

When you ask for help, include important details like your workspace name, eventstream source, rule IDs, and the time the issue happened. This information helps support teams respond faster and more accurately.

Note: Engaging with the community often leads to quick solutions. Many users share tips and best practices that can help you avoid similar issues in the future.

By following these troubleshooting steps and using available support resources, you can resolve most issues in fabric notebooks and keep your projects moving forward.


You can accelerate AI model training with Microsoft Fabric Notebooks. The familiar interface, similar to Power BI, makes your workflow intuitive and productive. You work in a unified environment that combines data engineering, analytics, and AI assistance, so you avoid switching between tools. This integration streamlines every step, from data prep to deployment.

Explore these resources to deepen your skills:

  • Microsoft Learn for hands-on exercises
  • Certification programs to validate your expertise
  • Data Wrangler for easy data cleaning
  • MLflow for experiment tracking
  • Lakehouse for unified data storage

Start your journey today and unlock the full power of scalable, efficient AI model development. To hear more about these techniques and expert discussions, make sure to check out the related podcast episode: Train AI Models with Microsoft Fabric Notebooks.

Related Episode

Aug. 14, 2025

Train AI Models with Microsoft Fabric Notebooks

Stop torturing your laptop. Train models where the data lives. With Microsoft Fabric notebooks running on Spark next to your Lakehouse, you skip CSV exports, move terabytes at query speed, and iterate in Python or R without memory crashes. Push transforms to the data, engineer features at scale, monitor long runs in real time, checkpoint models, and evaluate across massive test sets—cutting days of wrangling into hours of results.
Guest: Mirko Peters