Prepare transfer artifacts from a local instance to a cloud instance¶
!lamin disconnect
! not connected, call: ln.connect('account/name')
import lamindb as ln
import bionty as bt
import wetlab as wl
import pandas as pd
! not connected, call: ln.connect('account/name')
ln.setup.init(storage="./test-transfer-to-cloud", modules="bionty,wetlab")
→ initialized lamindb: testuser1/test-transfer-to-cloud
artifact = ln.Artifact.from_dataframe(
pd.DataFrame({"a": [1, 2, 3]}), description="test-transfer-to-cloud"
).save()
features = bt.CellMarker.from_values(
["PD1", "CD21"], field=bt.CellMarker.name, organism="human"
).save()
artifact.features._add_schema(ln.Schema(features), slot="var")
organism = bt.Organism.from_source(name="human").save()
artifact.labels.add(organism)
experiment = wl.Experiment(name="experiment-test-transfer-to-cloud").save()
artifact.experiments.add(experiment)
artifact.describe()
! no run & transform got linked, call `ln.track()` & re-run
→ writing the in-memory object into cache
Artifact: (0000) | description: test-transfer-to-cloud ├── uid: On98rQPomAP2AvWg0000 run: │ kind: dataset otype: DataFrame │ hash: YDf8IRE_ZkxP6cMBO60H8A size: 1.6 KB │ branch: main space: all │ created_at: 2025-12-01 17:03:25 UTC created_by: testuser1 │ n_observations: 3 ├── storage/path: │ /home/runner/work/lamindb/lamindb/docs/storage/test-transfer-to-cloud/.lamindb/On98rQPomAP2AvWg0000.parquet ├── Dataset features │ └── var (2 bionty.CellMarker) │ PD1 num │ CD21 num └── Labels └── .organisms bionty.Organism human .experiments wetlab.Experiment experiment-test-transfer-to-cloud
assert artifact.features.slots["var"].members.count() == 2