Can this run on Colab environment? #564
Replies: 1 comment
-
I've not tested running TopoStats in Google Colab before. We do have some example Notebooks that show how to use TopoStats from Jupyter Notebooks but running those in Colab is not something I've had recourse to try yet. You could try using them by pasting the repositories URL ( Because these notebooks were written with the expectation that the user has setup a Virtual Environment locally and installed TopoStats it currently fails as TopoStats isn't installed. It is possible to install TopoStats directly from Git from the Google Colab Notebooks by adding the following to a cell before any modules are loaded...
...although note the message about needing to restart the Runtime before the packages are picked up. IMPORTANT - This still won't work as the lab books are designed to search a local directory to find files to process. We do have a work in progress to have a Notebook that allows users to upload a selected file but haven't finished that off yet (I hit a stumbling block on creating dialog buttons for people to select files to upload). Let us know how you get on. Regards, Neil |
Beta Was this translation helpful? Give feedback.
-
Try to run on Colab, I tried by using "!" as line commend to install topostats and igor than run switch the current directory than run the command "run_topostats" and get error message, also using "colabxterm" give the same result, I already use "pip list" to check the package installed and use "ls" to check the current directory and files list:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/schema.py", line 405, in validate
nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/schema.py", line 463, in validate
raise SchemaError(message, e.format(data) if e else None)
schema.SchemaError: (4) should evaluate to True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/topostats/validation.py", line 203, in validate_config
config_schema.validate(config)
File "/usr/local/lib/python3.10/dist-packages/schema.py", line 409, in validate
raise SchemaError([message] + x.autos, [e.format(data) if e else None] + x.errors)
schema.SchemaError: Key 'cores' error:
(4) should evaluate to True
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/run_topostats", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/topostats/run_topostats.py", line 371, in main
validate_config(config)
File "/usr/local/lib/python3.10/dist-packages/topostats/validation.py", line 206, in validate_config
raise SchemaError(
schema.SchemaError: There is an error in your configuration. Please refer to the first error message above for details
Beta Was this translation helpful? Give feedback.
All reactions