domino logo
Tech Ecosystem
Get Started
Get started with Python
Step 0: Orient yourself to DominoStep 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Get started with R
Step 0: Orient yourself to Domino (R Tutorial)Step 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Get Started with MATLAB
Step 1: Orient yourself to DominoStep 2: Create a ProjectStep 3: Configure Your ProjectStep 4: Start a MATLAB WorkspaceStep 5: Fetch and Save Your DataStep 6: Develop Your ModelStep 7: Clean Up Your Workspace
Step 8: Deploy Your Model
Scheduled JobsLaunchers
Step 9: Working with Datasets
Domino Reference Projects
Search in Deployments
Security and Credentials
Secure Credential Storage
Store Project CredentialsStore User CredentialsStore Model Credentials
Get API KeyUse a Token for AuthenticationCreate a Mirror of Compute Environments
Collaborate
Share and Collaborate on Projects
Set Project VisibilityInvite CollaboratorsCollaborator Permissions
Add Comments
Reuse Work
Set Up ExportsSet Up Imports
Organizations
Organization PermissionsTransfer Projects to an Organization
Projects
Domino File System Projects
Domino File SystemOrganize Domino File System Project AssetsImport Git RepositoriesWork from a Commit ID in GitCopy a ProjectFork ProjectsMerge Projects
Manage Project Files
Upload Files to DominoCompare File RevisionsExclude Project Files From SyncExport Files as Python or R Package
Archive a Project
Revert Projects and Files
Revert a FileRevert a Project
Git-based Projects
Git-based Project Directory StructureCreate a Git-based ProjectCreate a New RepositoryOrganize Git-based Project AssetsDevelop Models in a WorkspaceSave Artifacts to the Domino File System
Project FilesSet Project SettingsStore Project Credentials
Project Goals
Add GoalsEdit GoalsLink Work to Goals
Organize Projects with TagsSet Project Stages
Project Status
Set Project as BlockedSet Project as CompleteSet Project as Unblocked
View Execution DetailsView Project ActivityTrack Project StatusRename a Project
Share and Collaborate
Set Project VisibilityInvite CollaboratorsCollaborator Permissions
Export and Import Project Content
Set Up ExportsSet Up Imports
See the Assets for Your ProjectPromote Projects to ProductionTransfer Project OwnershipIntegrate Jira
Domino Datasets
Manage Large DataDatasets Best PracticesCreate a DatasetUse an Existing DatasetFile Location of Datasets in Projects
Datasets and Snapshots
Update a DatasetAdd Tags to SnapshotsCreate a Snapshot of a DatasetDelete Snapshots of DatasetsDelete a Dataset
Upgrade from Versions Prior to 4.5
External Data
Considerations for Connecting to Data Sources
External Data Volumes
Mount an External VolumeView Mounted VolumesUse a Mounted VolumeUmount a Volume
Tips: Transfer Data Over a Network
Workspaces
Create a Workspace
Open a VS Code WorkspaceSet Custom Preferences for RStudio Workspaces
Workspace Settings
Edit Workspace SettingsChange Your Workspace's Volume SizeConfigure Long-Running Workspaces
Save Work in a WorkspaceSync ChangesView WorkspacesStop a WorkspaceResume a WorkspaceDelete a WorkspaceView Workspace LogsView Workspace UsageView Workspace HistoryWork with Legacy Workspaces
Use Git in Your Workspace
Commit and Push Changes to Your Git RepositoryCommit All Changes to Your Git RepositoryPull the Latest Changes from Your Git Repository
Run Multiple Applications in a Workspace
Clusters
Spark on Domino
Hadoop and Spark Overview
Connect to a Cloudera CDH5 cluster from DominoConnect to a Hortonworks cluster from DominoConnect to a MapR cluster from DominoConnect to an Amazon EMR cluster from DominoRun Local Spark on a Domino ExecutorUse PySpark in Jupyter WorkspacesKerberos Authentication
On-Demand Spark Overview
Validated Spark VersionConfigure PrerequisitesWork with your ClusterManage DependenciesWork with Data
On-Demand Ray Overview
Validated Ray VersionConfigure PrerequisitesWork with your ClusterManage DependenciesWork with Data
On-Demand Dask Overview
Validated Dask VersionConfigure PrerequisitesWork with Your ClusterManage DependenciesWork with Data
Environments
Set a Default EnvironmentCreate an EnvironmentEdit Environment DefinitionView Your EnvironmentsView Environment RevisionsDuplicate an EnvironmentArchive an Environment
Environments
Example: Create a New Environment
Customize Environments
Install Custom Packages with Git Integration
Add Packages to Environments
Use Dockerfile InstructionsUse requirements.txt (Python only)Use the Execution to Add a Package
Add Workspace IDEsAdd a Scala KernelAccess Additional Domains and HostnamesUse TensorBoard in Jupyter Workspaces
Use Partner Environments
Use MATLAB as a WorkspaceUse Stata as a WorkspaceAdd an NVIDIA NGC to DominoUse SAS as a Workspace
Executions
Execution StatesDomino Environment Variables
Jobs
Start a JobScheduled Jobs
Launchers
Launchers OverviewCreate a LauncherRun a LauncherCopy Launcher Definitions
View Job DetailsCompare JobsTag JobsStop JobsView Execution Performance
Execution Notifications
Set Notification PreferencesSet Custom Execution Notifications
Execution Results
Download Execution ResultsCustomize the Results DashboardAutomate Complex Pipelines with Apache Airflow
Model APIs
Configure a Model for Deployment
Scale Models
Scale Python ModelsScale Model Versions
Configure Compute ResourcesRoute Your ModelProject Files in ModelsEnvironments for ModelsShare and Collaborate on Models
Publish
Model APIs
Publish a ModelSend Test Calls to the ModelPublish a New Version of a ModelSelect How to Authorize a Model
Domino Apps
Publish a Domino AppHost HTML Pages from DominoGrant Access to Domino AppsView a Domino AppView All Domino AppsIdentify Resources to WhitelistPublish a Python App with DashPublish an R App with ShinyPublish a Project as a Website with FlaskOptimize App Scalability and PerformanceGet the Domino Username of an App Viewer
Launchers
Create a LauncherRun a LauncherCopy Launcher Definitions
Model Monitoring
Model Monitoring APIsAccessing The Model MonitorGet Started with Model MonitoringModel Monitor DeploymentIngest Data into The Model MonitorModel RegistrationMonitoring Data DriftMonitoring Model QualitySetting Scheduled Checks for the ModelConfigure Notification Channels for the ModelUse Model Monitoring APIsProduct Settings
Domino Command Line Interface (CLI)
Install the Domino Command Line Interface (CLI)Domino CLI ReferenceDownload Files with the CLIForce-Restore a Local ProjectMove a Project Between DeploymentsUse the Domino CLI Behind a Proxy
Troubleshooting
Troubleshoot Domino ModelsWork with Many FilesTroubleshoot Imports
Get Help
Additional ResourcesGet Domino VersionContact Technical SupportSupport BundlesBrowser SupportUser Guide Updates
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Domino Datasets
>
Datasets Best Practices

Datasets Best Practices

This topic describes how to use Domino Datasets to solve problems, improve collaboration, and open new workflow possibilities in Domino.

File size, storage, and access

When you start a Run or launch a Workspace, Domino copies your project files to a Domino execution. When working with large volumes of data, this presents the following potential issues:

  1. By default, you can store 10,000 files in a Domino project and you might exceed the limit.

  2. By default, you can only transfer individual files that are 8GB to and from your Domino project files, and you might exceed the limit.

  3. The time required to transfer data to and from the Domino executions is proportional to the size of the data. It can take a long time if the size of the data is large, which can lead to long startup and shutdown times for Workspaces, Jobs, Apps, and Launchers.

You can solve these problems with Domino Datasets because:

  1. Domino datasets do not have a limit on the number of files that can be stored.

  2. Domino datasets do not have a limit on the size of any individual file.

  3. Domino Datasets are directly attached to executions as networked filesystems, so you do not have to transfer their contents when executions start or complete.

Versioning

When you want to reproduce a training experiment, you might want to version a Domino Dataset so that you can return to a specific version used in the past.

To do this with Domino:

  • Create a snapshot to create versions of a Domino dataset.

  • Use a naming convention and a folder hierarchy to organize data your way in the read/write portions of a dataset.

Shareable data in your project

If you export and import project content to share data with other members of your team, the consumers of your project will receive the entire contents of your project files in their Runs and Workspaces. That works well if your project is small, simple, and narrowly scoped.

However, for large projects that produce many data artifacts, you might want to expose them to your consumers in smaller, curated subsets. You can do this with Domino Datasets.

Consider the following project.

Screen Shot 2019 01 30 at 12.30.10 PM

This project has a small folder full of code and nine folders with various kinds of output data. Each data folder is larger than 10GB, and the whole project is 100GB. It would be impractical to ask your data consumers to import this project, but you also don’t want to separate the data from the code that produced it by moving the data to a different project.

You can organize the data into Datasets, with one Dataset for each type of data in which your consumers are interested. In this example, suppose you have two colleagues who want to consume your data. One of them is only interested in the data from the experiment1 folder, and the other is only interested in the data from experiment9.

You can create and write two Datasets with scripts like the following, where it’s assumed you have named the Datasets experiment1-data and experiment9-data.

experiment1-populate-dataset.sh
cp -R $DOMINO_WORKING_DIR/experiment1/. /domino/datasets/experiment1-data/
experiment9-populate-dataset.sh
cp -R $DOMINO_WORKING_DIR/experiment9/. /domino/datasets/experiment9-data/

Your consumers can then mount only the datasets in which they are interested.

If you are working with data at this scale, write it to datasets whenever you produce it, instead of storing it in your project files.

Work with local data

If you use the Domino CLI to work with projects on your local machine, you might find that storing large data files slows your download and sync operations, and fills up a lot of your local disk storage. To prevent this, store data in a Domino dataset, and reserve your project files for the scripts and documents that you want to work with locally.

To simplify your local workflow:

  1. Create a Dataset in your project, and write your large data files to it.

  2. After the files have been written to the Dataset, remove them from your project files.

  3. Fetch a clean, lighter-weight copy of your project.

  4. Update your code to reference your data files in their new location, at:

    /domino/datasets/local/<dataset-name>/

  5. When everything is working properly, delete copies of the project that have the large data files in them from your local machine.

Load data from external sources into Domino

If you have data in an external source from which you want to periodically fetch and load into Domino, you can set up scheduled Jobs to write to Datasets.

Suppose you have data stored in an external data source that is periodically updated. If you wanted to fetch the latest state of that file once a week and load it into a Domino dataset, you could set up a scheduled Run:

  1. Create a dataset to store the data from the external source.

  2. Write a script that fetches the data and writes it to the dataset.

  3. Create a scheduled job to run your script with the new dataset configuration.

The following is a detailed example showing how to fetch a large, dynamic data file from a private S3 bucket with a scheduled Run once a week.

  1. Create a dataset to hold the file. This example shows the Dataset named fetched-from-s3.

    datasets best practices from s3

    For this example, assume the S3 bucket is named my_bucket and the file you want is named some_data.csv. You can set up your script like this:

    fetch-data.py
    import boto3
    import io
    
    # create new S3 client
    client = boto3.client('s3')
    
    # download some_data.csv from my_bucket and write to latest-S3 output mount
    file = client.download_file('my_bucket',
                                'some_data.csv',
                                '/domino/datasets/fetched-from-s3/some_data.csv')
  2. Set up a scheduled job that executes this script once a week with the correct dataset configuration.

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.