# Numerapi command line interface with new data format

**URL:** <https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200>\
**Category:** Tournament\
**Created:** [September 25, 2021, 8:28pm UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200 "2021-09-25T20:28:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![factorsparsity](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@factorsparsity](https://forum.numer.ai/u/factorsparsity)\
**Post date:** [September 25, 2021, 8:28pm UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/1 "2021-09-25T20:28:18Z")

</div>

Hi - I’m using uuazed’s numerapi command line interface to download the Numerai data (scripted). I cannot really find the right option to change to the new data format. In fact, ideally I’d like to download only the tournament parquet file (as the other files don’t change that often). Can somebody help me out here?

---

<div class="post-metadata">

**Author:** ![profricecake](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/profricecake/32/2528_2.png) [@profricecake](https://forum.numer.ai/u/profricecake)\
**Post date:** [September 26, 2021, 12:17am UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/2 "2021-09-26T00:17:45Z")

</div>

```
napi = numerapi.NumerAPI()
napi.download_dataset( "numerai_tournament_data.parquet")

```

This is what works for me!

---

<div class="post-metadata">

**Author:** ![uuazed](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/uuazed/32/3333_2.png) [@uuazed](https://forum.numer.ai/u/uuazed)\
**Post date:** [September 28, 2021, 9:26am UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/3 "2021-09-28T09:26:42Z")

</div>

Indeed, the cli interface doesn’t work with the new data yet. I’ve ticketed it and will take a look soonish. Of course, PRs are welcome 😉

> <https://github.com/uuazed/numerapi/issues/63>

---

<div class="post-metadata">

**Author:** ![factorsparsity](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@factorsparsity](https://forum.numer.ai/u/factorsparsity)\
**Post date:** [October 11, 2021, 7:48pm UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/4 "2021-10-11T19:48:54Z")

</div>

Nice. Does uploading work with both old and new datasets?

(Small comment BTW: the warning says “use download\_dataset\_old” but should say “use download-dataset-old” (for command line users))

---

<div class="post-metadata">

**Author:** ![uuazed](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/uuazed/32/3333_2.png) [@uuazed](https://forum.numer.ai/u/uuazed)\
**Post date:** [October 14, 2021, 7:04am UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/5 "2021-10-14T07:04:43Z")

</div>

Thanks for pointing out the type, I fixed that. Uploading now also works for both datasets when using the command line interface. You need to add `--new-data` flag

---

<div class="post-metadata">

**Author:** ![factorsparsity](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@factorsparsity](https://forum.numer.ai/u/factorsparsity)\
**Post date:** [June 26, 2022, 3:22pm UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/6 "2022-06-26T15:22:47Z")

</div>

Hi - Is it planned to implement the cli interface for the v4 data also?

---

<div class="post-metadata">

**Author:** ![uuazed](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/uuazed/32/3333_2.png) [@uuazed](https://forum.numer.ai/u/uuazed)\
**Post date:** [June 28, 2022, 12:26pm UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/7 "2022-06-28T12:26:21Z")

</div>

Have you tried? Anything not working?

---

<div class="post-metadata">

**Author:** ![factorsparsity](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@factorsparsity](https://forum.numer.ai/u/factorsparsity)\
**Post date:** [June 28, 2022, 6:41pm UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/8 "2022-06-28T18:41:49Z")

</div>

Yes.

numerapi download-dataset --filename numerai\_tournament\_data.parquet

works, but

numerapi download-dataset --filename “v3/numerai\_tournament\_data.parquet”  
numerapi download-dataset --filename “v4/live.parquet”  
numerapi download-dataset --filename live.parquet

do not (with or without quotes). Also, I wouldn’t know which switch to use for submitting, as “–new\_data” obviously assumes version v3, not v4. I haven’t tried that yet though.

---

<div class="post-metadata">

**Author:** ![uuazed](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/uuazed/32/3333_2.png) [@uuazed](https://forum.numer.ai/u/uuazed)\
**Post date:** [June 30, 2022, 6:59am UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/9 "2022-06-30T06:59:50Z")

</div>

I double checked and made some tweaks to numerapi. Both, downloading and uploading, should now work via the cli.

- re downloading: Check that the filename is valid by calling `numerapi --list-datasets`. If the filename contains a directory, like `v3`, it tries downloading to a directory as well. The latest numerapi version will ensure directories exist. The other workaround is to specify the `dest_path` explicitely` or to create the directory manually.
- re uploading: that `--new_data` flag is no longer needed and uploading works the same across all data versions. In fact, the live ‘ids’ are the same for v2, v3 and v4.

---

<div class="post-metadata">

**Author:** ![factorsparsity](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@factorsparsity](https://forum.numer.ai/u/factorsparsity)\
**Post date:** [June 30, 2022, 8:43pm UTC](https://forum.numer.ai/t/numerapi-command-line-interface-with-new-data-format/4200/10 "2022-06-30T20:43:28Z")

</div>

Thanks. Creating the directory beforehand did the trick. I also hadn’t upgraded to the latest version (which then, as you say, doesn’t need the directory anymore). Shame on me. Will try the submission on Saturday.
