Prepare transfer artifacts from a local instance to a cloud instance¶
!lamin set auto-connect false
import lamindb as ln
import bionty as bt
import wetlab as wl
import pandas as pd
ln.setup.init(storage="./test-transfer-to-cloud", schema="bionty,wetlab")
ln.setup.settings.auto_connect = False
artifact = ln.Artifact.from_df(pd.DataFrame({'a': [1, 2, 3]}), description='test-transfer-to-cloud')
artifact.save()
features = bt.CellMarker.from_values(["PD1", "CD21"], field=bt.CellMarker.name, organism="human")
ln.save(features)
artifact.features.add_feature_set(ln.FeatureSet(features), slot="var")
organism = bt.Organism.from_public(name="human")
organism.save()
artifact.labels.add(organism)
experiment_type = wl.ExperimentType(name="experiment-type-test-transfer-to-cloud")
experiment_type.save()
experiment = wl.Experiment(name="experiment-test-transfer-to-cloud")
experiment.experiment_type = experiment_type
experiment.save()
artifact.experiments.add(experiment)
artifact.describe()
❗ no run & transform get linked, consider calling ln.track()
Artifact(uid='IiFxBv0x4Dg7ygRNH2Z9', description='test-transfer-to-cloud', suffix='.parquet', accessor='DataFrame', size=1654, hash='7D9KyOpePOAwibz6Hl6V4A', hash_type='md5', visibility=1, key_is_virtual=True, updated_at='2024-05-25 15:34:55 UTC')
Provenance
.created_by = 'testuser1'
.storage = '/home/runner/work/lamindb/lamindb/docs/storage/test-transfer-to-cloud'
Labels
.experiments = 'experiment-test-transfer-to-cloud'
.organisms = 'human'