# Offline API with Google Cloud Storage bucket

**URL:** <https://discuss.ray.io/t/offline-api-with-google-cloud-storage-bucket/3977>\
**Category:** RLlib\
**Created:** [October 28, 2021, 2:25pm UTC](https://discuss.ray.io/t/offline-api-with-google-cloud-storage-bucket/3977 "2021-10-28T14:25:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Simon\_Zehnder](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/lars_simon_zehnder/32/1185_2.png) [@Lars\_Simon\_Zehnder](https://discuss.ray.io/u/Lars_Simon_Zehnder)\
**Post date:** [October 28, 2021, 2:25pm UTC](https://discuss.ray.io/t/offline-api-with-google-cloud-storage-bucket/3977/1 "2021-10-28T14:25:09Z")

</div>

Hi everyone,

I am running my experiments in the cloud and that works fine. I use RLlib’s _Offline API_ to write out variables from my custom environment and policy. That works also fine.

What I want to do now is to store these outputs from the _Offline API_ not on the head node, but in a GCS bucket (which works for example for `tune` syncing). I saw in the documentation:

```auto
    # Specify where experiences should be saved:
    # - None: don't save any experiences
    # - "logdir" to save to the agent log dir
    # - a path/URI to save to a custom output directory (e.g., "s3://bucket/")
    # - a function that returns a rllib.offline.OutputWriter
    "output": None,
    # What sample batch columns to LZ4 compress in the output data.
    "output_compress_columns": ["obs", "new_obs"],
    # Max output file size before rolling over to a new file.
    "output_max_file_size": 64 * 1024 * 1024,

```

where it says also “e.g. s3://bucket/”. This let me thought it works also with GCS, but it does not. I do not even know where the output gets written to - at least it does not get written into the GCS bucket 😄

I checked several times the path to the bucket (which I copied) and ensured that this path is correct. When running `tune.run()` I get the following debug info:

```auto
DEBUG json_writer.py:77 -- Wrote 1477409 bytes to <_io.TextIOWrapper name='output/output-2021-10-28_02-22-24_worker-1_0.json' encoding='UTF-8'> in 0.08527207374572754s

```

My original path in the `config` was actually `"output": "gs://output-from-train/output/"`. What happened here? Can anyone help? Is GCS support even implemented for the _Offline API_ or do I fight windmills here?

Any help is welcome!

---

<div class="post-metadata">

**Author:** ![Lars\_Simon\_Zehnder](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/lars_simon_zehnder/32/1185_2.png) [@Lars\_Simon\_Zehnder](https://discuss.ray.io/u/Lars_Simon_Zehnder)\
**Post date:** [October 29, 2021, 9:54pm UTC](https://discuss.ray.io/t/offline-api-with-google-cloud-storage-bucket/3977/2 "2021-10-29T21:54:22Z")

</div>

Opened an [issue](https://github.com/ray-project/ray/issues/19875).
