# Creating Artifact Manually While Using Metaflow \<\> WandB Integration

**URL:** <https://community.wandb.ai/t/creating-artifact-manually-while-using-metaflow-wandb-integration/935>\
**Category:** W&B Help\
**Created:** [October 12, 2021, 6:54pm UTC](https://community.wandb.ai/t/creating-artifact-manually-while-using-metaflow-wandb-integration/935 "2021-10-12T18:54:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahilchopra](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sahilchopra](https://community.wandb.ai/u/sahilchopra)\
**Post date:** [October 12, 2021, 6:54pm UTC](https://community.wandb.ai/t/creating-artifact-manually-while-using-metaflow-wandb-integration/935/1 "2021-10-12T18:54:06Z")

</div>

Hi everyone,

I’m using the [MetaFlow Integration with WandB](https://docs.wandb.ai/guides/integrations/other/metaflow). I understand the decorator will help me log instance variables (e.g., pandas data frames) as artifacts to WandB automatically.

In one of Metaflow steps, I’m trying to write a set of arrow files to disk and then upload these to an artifact with WandB. To do such I must run:

```auto
run.log_artifact(artifact)

```

Is there an easy way to extract / get the [run object created by the wandb metaflow decorator](https://github.com/wandb/client/blob/master/wandb/integration/metaflow/metaflow.py#L278) so that it can be used to log this artifact explicitly?

Thanks!  
Sahil

---

<div class="post-metadata">

**Author:** ![megatruong](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/megatruong/32/396_2.png) [@megatruong](https://community.wandb.ai/u/megatruong)\
**Post date:** [October 15, 2021, 1:41pm UTC](https://community.wandb.ai/t/creating-artifact-manually-while-using-metaflow-wandb-integration/935/2 "2021-10-15T13:41:14Z")

</div>

Hi Sahil!

We don’t expose the run object directly, but you can log to that run implicitly by calling this inside your step.

```auto
artifact = wandb.Artifact(name, type="dataset")
artifact.add_file("file.arrow")
wandb.log_artifact(artifact)

```

Are you trying to save dataframes as `.arrow`? We [save this as `.parquet` today](https://github.com/wandb/client/blob/master/wandb/integration/metaflow/metaflow.py#L122), but can add an arrow option.

---

<div class="post-metadata">

**Author:** ![sahilchopra](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sahilchopra](https://community.wandb.ai/u/sahilchopra)\
**Post date:** [October 15, 2021, 5:08pm UTC](https://community.wandb.ai/t/creating-artifact-manually-while-using-metaflow-wandb-integration/935/3 "2021-10-15T17:08:28Z")

</div>

That’s awesome! Thanks so much 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [April 20, 2022, 6:02pm UTC](https://community.wandb.ai/t/creating-artifact-manually-while-using-metaflow-wandb-integration/935/4 "2022-04-20T18:02:06Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
