# How to use autotrain spacerunner CLI

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-autotrain-spacerunner-cli%2F135980%3E%5C
**Category:** Beginners\
**Created:** [January 16, 2025, 3:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-autotrain-spacerunner-cli%2F135980 "2025-01-16T03:19:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jungrok](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@jungrok](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjungrok)%5C
**Post date:** [January 16, 2025, 3:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-autotrain-spacerunner-cli%2F135980%2F1 "2025-01-16T03:19:57Z")

</div>

> **[Train Custom Models on Hugging Face Spaces with AutoTrain SpaceRunner](https://huggingface.co/blog/abhishek/autotrain-spacerunner)**
>
> A Blog post by Abhishek Thakur on Hugging Face

I proceeded by looking at the document in the URL.

Cli is  
autotrain spacerunner --project-name demo2 --script-path /Users/codecraft\_rock/source/neuroflux-model-tuning --username jungrok --token hf\_COfEeulNuZNFpVBXmAaiFVhdneIeNAdBRk --backend spaces-cpu-basic --env TOKENIZERS\_PARALLELISM=false;TRANSFORMERS\_VERBOSITY=error --args padding=right;–push\_to\_hub=false

error  
INFO | 2025-01-16 12:18:57 | autotrain.trainers.generic.utils:create\_dataset\_repo:23 - Creating dataset repo…  
INFO | 2025-01-16 12:18:57 | autotrain.trainers.generic.utils:create\_dataset\_repo:31 - Uploading dataset…

raise HTTPError(http\_error\_msg, response=self)  
requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: [https://huggingface.co/api/datasets/jungrok/autotrain-demo1/commit/main](https://huggingface.co/api/datasets/jungrok/autotrain-demo1/commit/main)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “/opt/anaconda3/bin/autotrain”, line 8, in   
sys.exit(main())  
^^^^^^  
File “/opt/anaconda3/lib/python3.12/site-packages/autotrain/cli/autotrain.py”, line 68, in main  
command.run()  
File “/opt/anaconda3/lib/python3.12/site-packages/autotrain/cli/run\_spacerunner.py”, line 126, in run  
dataset\_id = create\_dataset\_repo(  
^^^^^^^^^^^^^^^^^^^^  
File “/opt/anaconda3/lib/python3.12/site-packages/autotrain/trainers/generic/utils.py”, line 32, in create\_dataset\_repo  
api.upload\_folder(  
File “/opt/anaconda3/lib/python3.12/site-packages/huggingface\_hub/utils/\_validators.py”, line 114, in \_inner\_fn  
return fn(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^  
File “/opt/anaconda3/lib/python3.12/site-packages/huggingface\_hub/hf\_api.py”, line 1518, in \_inner  
return fn(self, \*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/opt/anaconda3/lib/python3.12/site-packages/huggingface\_hub/hf\_api.py”, line 4711, in upload\_folder  
commit\_info = self.create\_commit(  
^^^^^^^^^^^^^^^^^^^  
File “/opt/anaconda3/lib/python3.12/site-packages/huggingface\_hub/utils/\_validators.py”, line 114, in \_inner\_fn  
return fn(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^  
File “/opt/anaconda3/lib/python3.12/site-packages/huggingface\_hub/hf\_api.py”, line 1518, in \_inner  
return fn(self, \*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/opt/anaconda3/lib/python3.12/site-packages/huggingface\_hub/hf\_api.py”, line 4087, in create\_commit  
hf\_raise\_for\_status(commit\_resp, endpoint\_name=“commit”)  
File “/opt/anaconda3/lib/python3.12/site-packages/huggingface\_hub/utils/\_http.py”, line 477, in hf\_raise\_for\_status  
raise \_format(HfHubHTTPError, str(e), response) from e  
huggingface\_hub.errors.HfHubHTTPError: 504 Server Error: Gateway Time-out for url: [https://huggingface.co/api/datasets/jungrok/autotrain-demo1/commit/main](https://huggingface.co/api/datasets/jungrok/autotrain-demo1/commit/main)  
zsh: command not found: --args  
zsh: command not found: --push\_to\_hub=false  
(base) codecraft\_rock@anjeonglog-ui-iMac ~ % autotrain spacerunner --project-name demo1 --script-path /Users/codecraft\_rock/source/neuroflux-model-tuning --username jungrok --token hf\_COfEeulNuZNFpVBXmAaiFVhdneIeNAdBRk --backend spaces-cpu-basic --env TOKENIZERS\_PARALLELISM=false;TRANSFORMERS\_VERBOSITY=error

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [January 16, 2025, 4:12am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-autotrain-spacerunner-cli%2F135980%2F2 "2025-01-16T04:12:53Z")

</div>

It is dangerous to make your token public.😱 Make sure to invalidate any tokens that you have made public.  
You can do this from the token settings page.
