Тёмный
Pingcode
Pingcode
Pingcode
Подписаться
Комментарии
@snakeywakey4109
@snakeywakey4109 5 часов назад
Thank you so much! i spent like 5 hours trying to install this and i finally stumbled upon this tutorial
@pingcode
@pingcode 40 минут назад
@@snakeywakey4109 glad I could help!
@b_a_n_g..__.-._.-.__...b_a_n_g
@b_a_n_g..__.-._.-.__...b_a_n_g 12 дней назад
thank you for the tutorial but can you please help im getting the error OSError: [WinError 127] The specified procedure could not be found. im unsure of what to do
@KhaledHossamShosha
@KhaledHossamShosha 16 дней назад
Does i need to install pytorch and protobuf in every unity project that i create
@pingcode
@pingcode 16 дней назад
@KhaledHossamShosha if you are installing mlagents and you are getting errors saying that you need them, then yes. Since you aren't installing these globally, you would have to do it for every project
@iaxsgames6029
@iaxsgames6029 17 дней назад
I don't know if someone will see this because it was posted 4 moths ago but I have this error that says TypeError: Invalid first argument to `register()` And I'm confused because when try and find a fix everything says 3.10.0 is'nt copatable with mlagents?
@pingcode
@pingcode 17 дней назад
@iaxsgames6029 Are you working in a venv? Is pip up to date? Did you install packages when using python version 3.10.0 and not just switching python versions? If yes to all then I really don't know. I made a dropbox link to my requirements.txt file if you want to try install everything using that? www.dropbox.com/scl/fi/phe813xzccz69riaf678x/requirements.txt?rlkey=etb53insp2txwtz8x0yaqwmqx&st=vdsaergu&dl=0 Delete venv folder, and remake it. Put the file in the venv folder. Activate the venv and run *pip install -r requirements.txt*
@iaxsgames6029
@iaxsgames6029 16 дней назад
@@pingcode Do You Know How To Increase max_steps because right now when I say Mlagents-learn --run-id=**** It always pops up at the bottom max_steps: 50000 So It alwasy ends early
@pingcode
@pingcode 16 дней назад
@@iaxsgames6029 you have to edit a YAML configuration file somewhere within the files. Please watch a tutorial on using ML-Agents for that. Code monkey's tutorial talk about it!
@IsmaiArrouchdi
@IsmaiArrouchdi 19 дней назад
Hey. First of all, great tutorial. I was hoping you could help with a error i've been seeing a lot in the comments. I was getting this error :""ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects"", so i tried to use your "requirements.txt" file and install the packages with the "correct" versions you specified. I couldn't help but notice the same error when typing "pip install - r requirements.txt" in cmd. I am using python 3.10.0, I also updated pip to the latest version, but i keep getting this error : RuntimeError: Broken toolchain: cannot link a simple C program [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy Failed to build numpy ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numpy)" Could it be some C++ tools i didnt install (yes i did download the vs build tools for C++, v:14.0) Also i was wondering if i can follow an outdated tutorial (say CodeMonkey's tutorial for example) and use older versions of torch, python, mlagents etc... Would it theoreticaly work ?
@pingcode
@pingcode 19 дней назад
This has been bothering me for a while too. It's upsetting because I cannot reproduce this behavior. You don't need any C++ tools because pip builds the binary version of numpy. If you want to manually install it from source code, then you would need C++, but I have never done that. One thing I can suggest, is running this *pip install --no-cache-dir setuptools wheel* This installs *steuptools* and *wheel* libraries. Try installing numpy after that (make sure you are still in the venv). Not sure if it will fix you issue, but its worth a shot As for following another tutorial, you definitely can try. However, I made this tutorial because following them came with a lot of headaches such as conflicting library versions, outdated python versions, etc. Most tutorials cover the same thing anyway. If you find a solution, please let me know about it so I can pin the comment!
@IsmaiArrouchdi
@IsmaiArrouchdi 19 дней назад
@@pingcode I tried installing the setuptools and wheel libraries as you suggested, but it didn't work. The good news is that I found a comment on CodeMonkey's video suggesting a similar procedure with different versions of Python and the Unity editor. It worked for me, and the "mlagents-learn --help" command worked just fine. I'll juste paste the comment right here : " Hi from 2023! I had some trouble instaling the python enviroment but I made it work. Unity: 2022.3.14f1 Python 3.9.13 Before venv: py -3.9 -m venv venv After venv: python -m pip install --upgrade pip pip install mlagents pip3 install torch torchvision torchaudio pip install protobuf==3.20.3 pip install packaging Works fine! Hope so u too :D " I started from scratch, created a new project with the suggested Unity version, and it worked. #### Another question: Does it matter if I install the ML Agents package (from the Unity editor) after the whole CMD procedure? Will it impact my simulations? Thank you for the quick response btw.
@pingcode
@pingcode 19 дней назад
@@IsmaiArrouchdi No it shouldnt make a difference. You might have to restart Unity or CMD if it doesn't detect its been installed yet. But that's it. So looks like using a different python version helped you, that's good to know. I will pint the comment for others to look at. Thanks!
@user-mx9bl7cw3r
@user-mx9bl7cw3r 4 дня назад
@@IsmaiArrouchdi this was the same solution for me. I guess you need the exact python version for the different version of Ml-agents
@yonatan_bs
@yonatan_bs 21 день назад
i am getting the following error when i'm trying to run "pip install nlagents": ERROR: Failed building wheel for numpy Failed to build numpy ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numpy)
@pingcode
@pingcode 21 день назад
Many people are having this issue and the reason isn't quite clear. The most I found online about this issue is that Numpy and Python are conflicting with each other. Try to install a different version of numpy. Make sure pip is updated. Make sure you are using Python 3.10.0 in the terminal.
@yonatan_bs
@yonatan_bs 21 день назад
@@pingcode that's probably the problem because when i try to install numpy i'm getting this error (and i'm using python 3.10 and pip is updated): (venv) C:\Users\yonat\ot>pip install numpy==1.19 Collecting numpy==1.19 Using cached numpy-1.19.0.zip (7.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [90 lines of output] Running from numpy source directory. <string>:460: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates C:\Users\yonat\AppData\Local\Temp\pip-install-ha3yov2t umpy_1fff654732424398a076fa9ec2c2648c\tools\cythonize.py:73: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. required_version = LooseVersion('0.29.14') C:\Users\yonat\AppData\Local\Temp\pip-install-ha3yov2t umpy_1fff654732424398a076fa9ec2c2648c\tools\cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(cython_version) < required_version: performance hint: _common.pyx:275:19: Exception check after calling 'random_func' will always require the GIL to be acquired. Declare 'random_func' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions. performance hint: _common.pyx:299:19: Exception check after calling 'random_func' will always require the GIL to be acquired. Declare 'random_func' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions. performance hint: _common.pyx:322:50: Exception check after calling 'random_func' will always require the GIL to be acquired. Declare 'random_func' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions. performance hint: _common.pyx:1002:32: Exception check after calling 'f1' will always require the GIL to be acquired. Declare 'f1' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions. performance hint: _generator.pyx:706:41: Exception check after calling '_shuffle_int' will always require the GIL to be acquired. Possible solutions: 1. Declare '_shuffle_int' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions. 2. Use an 'int' return type on '_shuffle_int' to allow an error code to be returned. performance hint: _generator.pyx:735:45: Exception check after calling '_shuffle_int' will always require the GIL to be acquired. Possible solutions: 1. Declare '_shuffle_int' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions. 2. Use an 'int' return type on '_shuffle_int' to allow an error code to be returned. Error compiling Cython file: ------------------------------------------------------------ ... for i in range(1, RK_STATE_LEN): self.rng_state.key[i] = val[i] self.rng_state.pos = i self._bitgen.state = &self.rng_state self._bitgen.next_uint64 = &mt19937_uint64 ^ ------------------------------------------------------------ _mt19937.pyx:138:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned. Processing numpy/random\_bounded_integers.pxd.in Processing numpy/random\bit_generator.pyx Processing numpy/random\mtrand.pyx Processing numpy/random\_bounded_integers.pyx.in Processing numpy/random\_common.pyx Processing numpy/random\_generator.pyx Processing numpy/random\_mt19937.pyx Traceback (most recent call last): File "C:\Users\yonat\AppData\Local\Temp\pip-install-ha3yov2t umpy_1fff654732424398a076fa9ec2c2648c\tools\cythonize.py", line 235, in <module> main() File "C:\Users\yonat\AppData\Local\Temp\pip-install-ha3yov2t umpy_1fff654732424398a076fa9ec2c2648c\tools\cythonize.py", line 231, in main find_process_files(root_dir) File "C:\Users\yonat\AppData\Local\Temp\pip-install-ha3yov2t umpy_1fff654732424398a076fa9ec2c2648c\tools\cythonize.py", line 222, in find_process_files process(root_dir, fromfile, tofile, function, hash_db) File "C:\Users\yonat\AppData\Local\Temp\pip-install-ha3yov2t umpy_1fff654732424398a076fa9ec2c2648c\tools\cythonize.py", line 188, in process processor_function(fromfile, tofile) File "C:\Users\yonat\AppData\Local\Temp\pip-install-ha3yov2t umpy_1fff654732424398a076fa9ec2c2648c\tools\cythonize.py", line 77, in process_pyx subprocess.check_call( File "C:\Users\yonat\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['C:\\Users\\yonat\\ot\\venv\\Scripts\\python.exe', '-m', 'cython', '-3', '--fast-fail', '-o', '_mt19937.c', '_mt19937.pyx']' returned non-zero exit status 1. Cythonizing sources Traceback (most recent call last): File "C:\Users\yonat\ot\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module> main() File "C:\Users\yonat\ot\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\Users\yonat\ot\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "C:\Users\yonat\AppData\Local\Temp\pip-build-env-u1c354rr\overlay\Lib\site-packages\setuptools\build_meta.py", line 368, in prepare_metadata_for_build_wheel self.run_setup() File "C:\Users\yonat\AppData\Local\Temp\pip-build-env-u1c354rr\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup super().run_setup(setup_script=setup_script) File "C:\Users\yonat\AppData\Local\Temp\pip-build-env-u1c354rr\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup exec(code, locals()) File "<string>", line 489, in <module> File "<string>", line 469, in setup_package File "<string>", line 274, in generate_cython RuntimeError: Running cythonize failed! [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
@nicholaspaleologos7088
@nicholaspaleologos7088 21 день назад
I was hoping you could help as I get the error: TypeError: Invalid first argument to `register()`. typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class or union type. I am using 3.11.9 but i have tried python 3.10 and get the same error and help would be greatly appreciated
@pingcode
@pingcode 21 день назад
Are you working in a venv? Is pip up to date? Did you install packages when using python version 3.10.0 and not just switching python versions? If yes to all then I really don't know. I made a dropbox link to my requirements.txt file if you want to try install everything using that? www.dropbox.com/scl/fi/phe813xzccz69riaf678x/requirements.txt?rlkey=etb53insp2txwtz8x0yaqwmqx&st=vdsaergu&dl=0 Delete venv folder, and remake it. Put the file in the venv folder. Activate the venv and run *pip install -r requirements.txt*
@nicholaspaleologos7088
@nicholaspaleologos7088 18 дней назад
@@pingcode Thank you this worked you have literally saved my dissertation
@pingcode
@pingcode 18 дней назад
@@nicholaspaleologos7088 awesome, glad it worked out!
@KhaledHossamShosha
@KhaledHossamShosha 24 дня назад
thank you very much it worked thanks
@pingcode
@pingcode 24 дня назад
@@KhaledHossamShosha Awesome!
@KhaledHossamShosha
@KhaledHossamShosha 24 дня назад
@@pingcode Dose i need a CUDA in this release ?
@pingcode
@pingcode 21 день назад
@KhaledHossamShosha do you have an nvidia gpu? Cuda is just used to speed up training to my understanding. I don't know much about it. You don't NEED it
@KhaledHossamShosha
@KhaledHossamShosha 21 день назад
@@pingcode i have RTX3050
@pingcode
@pingcode 21 день назад
@@KhaledHossamShosha yeah so then you should be able to use it. Try look up some documentation or videos
@Breadianity
@Breadianity 27 дней назад
'venv' is not recognized as an internal or external command, operable program or batch file. When activating
@pingcode
@pingcode 26 дней назад
Can you please share more details as to what you are doing when you see the error? What command are you typing when you see this? What OS are you using?
@bauxitegamingworld9402
@bauxitegamingworld9402 Месяц назад
Can you please help me with these???????? pleaseeeeeeeeeeeeeee (venv) C:\Windows\System32>mlagents-learn --help Traceback (most recent call last): File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib unpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib unpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Windows\System32\venv\Scripts\mlagents-learn.exe\__main__.py", line 4, in <module> File "C:\Windows\System32\venv\lib\site-packages\mlagents\trainers\learn.py", line 2, in <module> from mlagents import torch_utils File "C:\Windows\System32\venv\lib\site-packages\mlagents\torch_utils\__init__.py", line 1, in <module> from mlagents.torch_utils.torch import torch as torch # noqa File "C:\Windows\System32\venv\lib\site-packages\mlagents\torch_utils\torch.py", line 6, in <module> from mlagents.trainers.settings import TorchSettings File "C:\Windows\System32\venv\lib\site-packages\mlagents\trainers\settings.py", line 25, in <module> from mlagents.trainers.cli_utils import StoreConfigFile, DetectDefault, parser File "C:\Windows\System32\venv\lib\site-packages\mlagents\trainers\cli_utils.py", line 5, in <module> from mlagents_envs.environment import UnityEnvironment File "C:\Windows\System32\venv\lib\site-packages\mlagents_envs\environment.py", line 48, in <module> from .rpc_communicator import RpcCommunicator File "C:\Windows\System32\venv\lib\site-packages\mlagents_envs pc_communicator.py", line 1, in <module> import grpc File "C:\Windows\System32\venv\lib\site-packages\grpc\__init__.py", line 22, in <module> from grpc import _compression File "C:\Windows\System32\venv\lib\site-packages\grpc\_compression.py", line 20, in <module> from grpc._cython import cygrpc ImportError: cannot import name 'cygrpc' from 'grpc._cython' (C:\Windows\System32\venv\lib\site-packages\grpc\_cython\__init__.py)
@pingcode
@pingcode Месяц назад
Are you using Python 3.10.0? I can't help you with a random error message.
@bauxitegamingworld9402
@bauxitegamingworld9402 29 дней назад
@@pingcode Yeah i am using the python 3.10.
@Alex-Basurto-7
@Alex-Basurto-7 Месяц назад
Thank you! The video was very helpful and I was able to understand and implement this
@pingcode
@pingcode Месяц назад
That's awesome, glad it helped
@user-mr9lh4xj6c
@user-mr9lh4xj6c Месяц назад
why exactly python 3.10.0 ? I can't use 3.12 fo example ?
@pingcode
@pingcode Месяц назад
There are a lot of different libraries that need to work together in order to have ml agents run properly. Many of these libraries have version conflicts with different python versions. 3.10.0 is a version I found to be stable. 3.12 for example is a newer python version that ml agents doesn't support yet.
@melchizedek79
@melchizedek79 Месяц назад
Great!. Just subscribed. Please do more tutorials.
@pingcode
@pingcode Месяц назад
Thank you! Got any suggestions? Let me know!
@Phoenix_3223
@Phoenix_3223 Месяц назад
Edit: my comments do show up unless you sort by newest first idk why i always get this error message when installing mlagents in python : "ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects" I already tried installing numpy by itself but it was already there could someone please help me?
@pingcode
@pingcode Месяц назад
Did you make a virtual environment? If not, you might be using a version of numpy already installed on your pc. If you did make a virtual environment, try to unistall numpy and reinstall it from within it The error might be indicating a version of numpy not compatible with the current version of python or mlagents.
@Phoenix_3223
@Phoenix_3223 Месяц назад
@@pingcode got the same error when trying to install numpy 1.21.2 on the newest version it just doesnt even tries to create that "wheel" yes i am in an virtual environment heres an List of all the installed packages(if it helps): Package Version ----------------- --------- filelock 3.15.1 fsspec 2024.6.0 intel-openmp 2021.4.0 Jinja2 3.1.4 MarkupSafe 2.1.5 mkl 2021.4.0 mpmath 1.3.0 networkx 3.3 numpy 1.26.4 pillow 10.3.0 pip 24.0 setuptools 57.4.0 sympy 1.12.1 tbb 2021.12.0 torch 2.3.1 torchaudio 2.3.1 torchvision 0.18.1 typing_extensions 4.12.2
@pingcode
@pingcode Месяц назад
@@Phoenix_3223 Thanks for that. Upon checking my pip install list, I see I have a lot more packages installed. Please check this link to download my requirements.txt file I just made: www.dropbox.com/scl/fi/phe813xzccz69riaf678x/requirements.txt?rlkey=etb53insp2txwtz8x0yaqwmqx&st=nxd615dq&dl=0 You can try uninstall everything in your virtual environment and installing everything in this file using *pip install -r requirements.txt* Let me know if that works!
@Phoenix_3223
@Phoenix_3223 Месяц назад
@@pingcode i did exactly that untill the installing just stopped because of the same error: ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
@jasperharris3555
@jasperharris3555 Месяц назад
I had this and had the microsoft store version which was 3.10.11 and installing 3.10.0 fixed it
@justinbishop9584
@justinbishop9584 Месяц назад
very much appreciated this video needed to be made!
@pingcode
@pingcode Месяц назад
You're welcome! 😊
@4valongaming388
@4valongaming388 2 месяца назад
Thank you very much. I saw Code Monkey's videos and thought it's gonna be perfect, but the installation was weird, so I started looking and your vid is perfect for filling that gap.
@pingcode
@pingcode 2 месяца назад
Glad I could help!
@Plaquedragon
@Plaquedragon 2 месяца назад
i got this error when i did mlagents-learn --help ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there. i dont understand it
@pingcode
@pingcode 2 месяца назад
It's hard to say without knowing what you did. The error message is saying that you are trying to import numpy from its source directory. You might have done something wrong when changing directories in the terminal or you might have numpy installed in a weird way on your machine. Is there any part of the tutorial that you are confused about and need help with?
@spyrocsgo
@spyrocsgo 2 месяца назад
Loved the tutorial
@pingcode
@pingcode 2 месяца назад
Thank you 😊
@Ruhal567
@Ruhal567 2 месяца назад
WHAT! i thought this channel has 100K+ subs! but u are only on 100+ !!!! HOW! Well, I have an issue! this is my code when i try to activate it: (venv) D:\apps\Learning AI>mlagents-learn --help Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "D:\apps\Learning AI\venv\Scripts\mlagents-learn.exe\__main__.py", line 4, in <module> File "D:\appsl\Learning AI\venv\Lib\site-packages\mlagents\trainers\learn.py", line 2, in <module> from mlagents import torch_utils File "D:\apps\Learning AI\venv\Lib\site-packages\mlagents\torch_utils\__init__.py", line 1, in <module> from mlagents.torch_utils.torch import torch as torch # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\apps\Learning AI\venv\Lib\site-packages\mlagents\torch_utils\torch.py", line 6, in <module> from mlagents.trainers.settings import TorchSettings File "D:\appsl\Learning AI\venv\Lib\site-packages\mlagents\trainers\settings.py", line 5, in <module> from mlagents.trainers.settings import RewardSignalType, RewardSignalSettings ImportError: cannot import name 'RewardSignalType' from partially initialized module 'mlagents.trainers.settings' (most likely due to a circular import) (D:\appsl\Learning AI\venv\Lib\site-packages\mlagents\trainers\settings.py) (venv) D:\apps\Learning AI> I tried everything and i even asked CHATGPT! but i got no answer whope u will help... Also i am using python version 3.12.1 PLS HELP!
@pingcode
@pingcode 2 месяца назад
Thanks for the kind words. Don't use python 3.12. I don't think mlagents works with it yet. As I say in the video, use python 3.10.0. Link is in the description. You can just switch python versions in the terminal when following the tutorial.
@Ruhal567
@Ruhal567 2 месяца назад
thanks for the help Remember me as your subscriber! Because you will get blown up later just keep uploading please
@potato8938
@potato8938 2 месяца назад
Heyy! thanks for the tutorial, it worked perfectly. But I have a question like in the monkeycode video or any other youtube video about trying out the mlagents, they used agent assets. How would i get the assets? I've downloaded the latest mlagent released which was vers 21 and i dragged the Assets from that folder to mine, but there is an issue which was "The associated script can not be loaded" How would i fix this?
@pingcode
@pingcode 2 месяца назад
Honestly no idea since I never used the agent asset. I'm assuming you mean the little blue character? I've never used it so I don't know. If that's not what you mean, can you be a bit more specific
@potato8938
@potato8938 2 месяца назад
@@pingcode yeah it was and actually i resolved it by just using the latest mlagent version tar.gz and extract it and used its Project folder to access the assets properly (including the steps you shown in this vid)
@pingcode
@pingcode 2 месяца назад
@potato8938 That's great to hear 👍
@cosminp236
@cosminp236 2 месяца назад
This is the best tutorial on installing ML Agents atm. I followed some other tutorials and documentation but got frustrated after trying so many different versions and nothing worked. This video will get everything working, so thanks a lot!
@pingcode
@pingcode 2 месяца назад
Glad it helped!
@simonnaulet2118
@simonnaulet2118 2 месяца назад
Hi, thank you for your simple and short tutorial. I got the error for "protobuf". After installing it, when I execute again mlagents-learn --help, i got the following error : TypeError: Invalid first argument to `register()`. typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class or union type. Can you help me please ?
@simonnaulet2118
@simonnaulet2118 2 месяца назад
I had 2 versions of python installed on my computer. I needed to uninstall my recent version of Python to switch on the 3.10 version. I hope it helps someone ;)
@pingcode
@pingcode 2 месяца назад
@simonnaulet2118 you dont have to uninstall that python version! You can just switch python versions in the terminal when needed.
@Plaquedragon
@Plaquedragon 2 месяца назад
@@pingcode where terminal
@Plaquedragon
@Plaquedragon 2 месяца назад
opps nvm
@Spiex81
@Spiex81 2 месяца назад
i get this error at the end: TypeError: Invalid first argument to `register()`. typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class or union type.
@pingcode
@pingcode 2 месяца назад
What version of Python are you using?
@Spiex81
@Spiex81 2 месяца назад
@@pingcode sorry for the late reply, but i have 3.12.2
@pingcode
@pingcode 2 месяца назад
@@Spiex81 you need 3.10, check description
@Spiex81
@Spiex81 2 месяца назад
@@pingcode Ah ok thanks
@AlmostCoolTho
@AlmostCoolTho 2 месяца назад
Hey, when the help command runs I see you also have an error about torch.set_default_tensor_type() being deprecated. I see it still runs with this, but my results aren't showing on tensor board. Could this error be an indication of why? and any idea what the fix would be?
@pingcode
@pingcode 2 месяца назад
I'm assuming you ran the tensorflow command in the terminal? I can't help you without more information. A common mistake is that a training session didn't finish yet, so no grpah can be made (which is indicated by the number of `steps`). Let me know what you have tried and I'll try to help you. In the meantime, make sure you read this unity-technologies.github.io/ml-agents/Using-Tensorboard/
@AlmostCoolTho
@AlmostCoolTho 2 месяца назад
@@pingcode Yes looks like I excited it too early. Thank You
@ks-kr1hx
@ks-kr1hx 3 месяца назад
great explanation, but whenerver i want to access the website now it keeps dowloading the file without loading the page (i got rid the code added added in the last section of the video but it still does the same)
@pingcode
@pingcode 2 месяца назад
Thanks! Without seeing your code I can't help you. If you want me to take a look at it, create an issue on the github page I made for this video. github.com/MyPingO/Refresh-Jinja-HTML-Example/issues This repository has the full complete code from the video which you can reference too!
@calalmuradov6162
@calalmuradov6162 3 месяца назад
I could not why
@pingcode
@pingcode 3 месяца назад
you could not what?
@calalmuradov6162
@calalmuradov6162 3 месяца назад
@@pingcode to install ml agents i made all like you
@pingcode
@pingcode 3 месяца назад
@@calalmuradov6162 well, what is the problem?
@victorhurst5569
@victorhurst5569 3 месяца назад
Legend. Got stuck on this for 2.5 hours
@pingcode
@pingcode 3 месяца назад
I'm so glad it helped!
@rehabuddinshawon6767
@rehabuddinshawon6767 3 месяца назад
Thank You so much. You just saved me
@pingcode
@pingcode 3 месяца назад
Glad I could help!
@daniell9062
@daniell9062 3 месяца назад
How do you make it render_template at the end of progress bar?
@pingcode
@pingcode 3 месяца назад
In my case, I would call render_template() after the for loop in my progress() function. Once the code for whatever you are loading finishes, just call render_template like normal.
@DrHanes
@DrHanes 3 месяца назад
Thank you!!!🙏
@pingcode
@pingcode 3 месяца назад
No problem!
@hoomanjafari9477
@hoomanjafari9477 3 месяца назад
yesssss i use this in django and it worked !!! thank u sirr
@pingcode
@pingcode 3 месяца назад
Glad I could help :)
@hoomanjafari9477
@hoomanjafari9477 4 месяца назад
i wish i could know the way to do this with django
@pingcode
@pingcode 4 месяца назад
Doesn't Django have a similar templating language to Jinja? I'm sure there is a way
@theashbot4097
@theashbot4097 4 месяца назад
I am soo glad somebody is making a update to his older setup!
@willylatache
@willylatache 4 месяца назад
Great..👌🏽
@pafodev
@pafodev 4 месяца назад
Hey does it only work with python 3.10.0? i have 3.11 and it isnt working
@pingcode
@pingcode 4 месяца назад
Yes, from my experience 3.10.12 is the latest version that works. This is odd because their documentation says 3.10.12 *or higher* unity-technologies.github.io/ml-agents/Installation/ If you don't want to get rid of your current python version, you can install python 3.10.0 and switch the version of python you use in the terminal when running the commands shown in the video
@pafodev
@pafodev 4 месяца назад
Ill give it a try and tell you, you deserve a sub , thanks man!@@pingcode
@pafodev
@pafodev 4 месяца назад
@@pingcode IT WORKED, THANKSSS you deserve a sub!!
@pingcode
@pingcode 4 месяца назад
@@pafodev No problem!
@soulfool5511
@soulfool5511 4 месяца назад
Is it possible to train on GPU with mlagents? In the official documentation I found "Currently for the ML-Agents Toolkit, only CUDA v9.0 and cuDNN v7.0.5 is supported." It is sad, because I can't even install CUDA v9.0 anymore, because it is not compatible with never GPUs :(
@pingcode
@pingcode 4 месяца назад
I am not sure, I never tried it. Please look at these links, they might be helpful in some way. forum.unity.com/threads/gpu-training-using-ml-agents-cuda-cudnn.910652/ www.tensorflow.org/install/pip github.com/miyamotok0105/unity-ml-agents/blob/master/docs/Installation-Windows.md www.reddit.com/r/Unity2D/comments/16nko4k/how_to_utilize_cuda_during_the_training_of/
@ItwasajokeVrballslol
@ItwasajokeVrballslol 4 месяца назад
Best. Tutorial. I. Have. Watched. In. My. Life.
@pingcode
@pingcode 4 месяца назад
Thank you
@atnguyencong4116
@atnguyencong4116 4 месяца назад
help me fix error: Failed building wheel for numpy, I am using python 3.10.2, numpy is 1.26.4. I got this error when pip install mlagents
@deoz210
@deoz210 4 месяца назад
use python 3.9
@atnguyencong4116
@atnguyencong4116 4 месяца назад
@@deoz210 Does 3.9 work with ml-agents 21
@pingcode
@pingcode 4 месяца назад
apologies for the late reply, if you still have the issue. Do you know what numpy version you have? You might have an older numpy version installed on your PC that isn't compatible with python 3.10 This issue page might be helpful to read what others have said. Someone mentions at the end they used numpy version 1.23.3 and it works github.com/Unity-Technologies/ml-agents/issues/6008
@BastiaanNetjes
@BastiaanNetjes 3 месяца назад
@@pingcode I am running into the same issue. I am using Numpy 1.23.3 and python 3.10.0 and I also get the "ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects" message :/ Help would greatly be appreciated!
@pingcode
@pingcode 3 месяца назад
@@BastiaanNetjes I'm not sure since I never ran into this issue myself. The only thing I can suggest is to uninstall numpy and reinstall it to see if that fixes anything. To my knowledge, you might also need C++ Build Tools installed since python and some libraries like numpy use C/C++. Though this is speculation. Here is a link to the build tools: visualstudio.microsoft.com/visual-cpp-build-tools/
@pingcode
@pingcode 4 месяца назад
If you are interested in one on one tutoring for beginner's/intermediate's, I offer it for a fair price. Email me: (mypingo7 [at] yahoo [dot] com) if you are interested!
@pingcode
@pingcode 4 месяца назад
If you are interested in one on one tutoring for beginner's/intermediate's, I offer it for a fair price. Email me: (mypingo7 [at] yahoo [dot] com) if you are interested!
@pingcode
@pingcode 4 месяца назад
If you are interested in one on one tutoring for beginner's/intermediate's, I offer it for a fair price. Email me: (mypingo7 [at] yahoo [dot] com) if you are interested!
@user-jr7kh2mp9x
@user-jr7kh2mp9x 4 месяца назад
jezz, finaly tutorial that really helped... i was trying to setup my training for almost a week. you`re life saver <3
@pingcode
@pingcode 4 месяца назад
Appreciate it! Good luck with your project
@begosik4444
@begosik4444 4 месяца назад
When installing mlagents I get this: ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects. How do I fix this
@NikodemWisniewski-jp2bg
@NikodemWisniewski-jp2bg 4 месяца назад
i have it too and if i do it in Python 3.12.0 its giving me this: TypeError: Invalid first argument to `register()`. typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class or union type.
@begosik4444
@begosik4444 4 месяца назад
@@NikodemWisniewski-jp2bg i tried on python 3.11.0, and now I have the same error
@begosik4444
@begosik4444 4 месяца назад
@@NikodemWisniewski-jp2bg I was able to install mlagents with python version 3.9.13, but there is a warning that 3.9.13 does not support pytorch but it can work
@akifpsh
@akifpsh 4 месяца назад
@@NikodemWisniewski-jp2bg Same issue how can solve this prob. I didnt find any path
@sherlin1320
@sherlin1320 2 месяца назад
hey.. i am facing this error too. did u find the solution to this ?
@FrancescoRossiPhotography
@FrancescoRossiPhotography 5 месяцев назад
There is a racing condition, the fetch starts before the connect and therefore it doesn't have the socket id yet.
@johnpricejoseca1705
@johnpricejoseca1705 6 месяцев назад
Thanks for the helpful video and GitHub repo! Happy New Year from California.
@ignaciosambrailo8844
@ignaciosambrailo8844 10 месяцев назад
You don't know how much you've helped me with this one! I've been struggling for days with jquery and ajax... I've applied this in my app so when someones add a product to a shopping cart it doesn't refresh the page but hits the endpoint :) tytyty
@pietraderdetective8953
@pietraderdetective8953 10 месяцев назад
How come you only got 2 digit subs?? The clarity of your teaching method, the structure, the presentation..all are awesome. You deserve a lot more subs Sir!! Great content! Are you planning to create more Flask videos? I'm rooting for them
@pingcode
@pingcode 10 месяцев назад
Hey thanks for the kind words. To be honest I'm not sure. I wanted to make videos for things I couldn't find an answer for online. Those are probably the only ones to get viewed since they aren't anywhere else. Regular tutorials, even for flask are all over the internet so I'm not sure if I should make them. You can always leave a comment for a video request. If I know how to make a good video explaining that topic/question, I will
@nirajbava799
@nirajbava799 Год назад
this code not work with more 2 user at same time give error 500
@pingcode
@pingcode Год назад
You might be doing something wrong, or perhaps the video is outdated, there might be some changes to the libraries since I've made the video
@kotvkvante22
@kotvkvante22 Год назад
cool