Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] #90

Open
China-GentleWang opened this issue Aug 27, 2024 · 2 comments
Open

[BUG] #90

China-GentleWang opened this issue Aug 27, 2024 · 2 comments

Comments

@China-GentleWang
Copy link

1、USE WORCTutorialBasic.ipynb
2、use newWORC with python=3.11
3、When I execute ”experiment.execute()“
error:
SimpleV validated: True.
MinSubjectsV validated: True.
Sample validated: True.
Label_type given is None, extracting all labels.
Label names to extract: Index(['imaginary_label_1', 'imaginary_label_2', 'Hospital', 'Age',
'complement_label_1'],
dtype='object')
InvalidLabelsV validated: True.
Debug detected: False.
Building training network...
[WARNING] basemanager:0327 >> Could not load file e:\tools\worc-newpython\WORC\resources\fastr_tools\combat\ComBat.xml: 'tuple' object has no attribute 'values'

@China-GentleWang
Copy link
Author

details

AttributeError Traceback (most recent call last)
File E:\Tools\WORC-newpython\WORC\facade\simpleworc.py:66, in _error_bulldozer..dec(*args, **kwargs)
65 try:
---> 66 func(*args, **kwargs)
67 except Exception as e:

File E:\Tools\WORC-newpython\WORC\facade\basicworc.py:191, in BasicWORC.execute(self)
190 # Build the fastr network
--> 191 self._worc.build(buildtype=self._buildtype)
192 if self._add_evaluation:

File E:\Tools\WORC-newpython\WORC\WORC.py:562, in WORC.build(self, buildtype)
561 if buildtype == 'training':
--> 562 self.build_training()
563 elif buildtype == 'inference':

File E:\Tools\WORC-newpython\WORC\WORC.py:601, in WORC.build_training(self)
600 # Create config source
--> 601 self.source_class_config = self.network.create_source('ParameterFile', id='config_classification_source', node_group='conf', step_id='general_sources')
603 # Classification tool and label source

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\api_init_.py:576, in Network.create_source(self, datatype, id, step_id, resources, node_group)
575 resources = resources or ResourceLimit()
--> 576 return Node(self.parent.create_source(
577 datatype=datatype,
578 id_=id,
579 stepid=step_id,
580 resources=resources.copy(),
581 nodegroup=node_group
582 ))

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\planning\network.py:558, in Network.create_source(self, datatype, id_, stepid, resources, nodegroup)
557 resources = resources or ResourceLimit()
--> 558 source_node = SourceNode(datatype=datatype, id_=id_, parent=self, resource_limits=resources, nodegroup=nodegroup)
559 self.add_node(source_node)

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\planning\node.py:1153, in SourceNode.init(self, datatype, id_, parent, resource_limits, nodegroup)
1135 """
1136 Instantiation of the SourceNode.
1137
(...)
1151 >>> source = network.create_source(datatype=types['ITKImageFile'], id_='sourceN')
1152 """
-> 1153 tool = resources.tools['fastr/Source:1.0', '1.0']
1155 super(SourceNode, self).init(tool, id_, parent=parent, resource_limits=resource_limits, nodegroup=nodegroup)

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\plugins\managers\objectmanager.py:65, in ObjectManager.getitem(self, key)
64 new_key = self.keytransform(key)
---> 65 if new_key not in self.data:
66 raise exceptions.FastrObjectUnknownError('Key "{}" (expanded to {}) not found in {}'.format(key, new_key, type(self).name))

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\basemanager.py:64, in BaseManager.data(self)
61 """
62 The actual data dict underlying this Manager
63 """
---> 64 self.ensure_loaded()
65 return self._data

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\basemanager.py:72, in BaseManager.ensure_loaded(self)
71 if self._data is None:
---> 72 self.populate()

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\plugins\managers\toolmanager.py:28, in ToolManager.populate(self)
27 def populate(self):
---> 28 super().populate()
29 IOPluginManager.create_ioplugin_tool(self, interfaces=resources.interfaces)

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\basemanager.py:82, in BaseManager.populate(self)
81 if self._path[0] is not None:
---> 82 self._scan_directory(self._path[0], recursive=self._path[1])

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\basemanager.py:300, in BaseManager._scan_directory(self, path, recursive, namespace)
299 for entry in path:
--> 300 self._scan_directory(entry, recursive)
301 else:

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\basemanager.py:317, in BaseManager._scan_directory(self, path, recursive, namespace)
316 if recursive:
--> 317 self._scan_directory(filepath, recursive, namespace + (filename,))
318 elif os.path.isfile(filepath) and self.match_filename(filename):

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\basemanager.py:325, in BaseManager._scan_directory(self, path, recursive, namespace)
324 try:
--> 325 self._load_item(filepath, namespace=namespace)
326 except Exception as exception:

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\plugins\managers\objectmanager.py:146, in ObjectManager._load_item(self, filepath, namespace)
142 """
143 Load a Object file and store it in the Manager
144 """
--> 146 obj = load(filepath, cls=self.object_class)
147 object_version = self.get_object_version(obj)

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\serializable.py:387, in load(path, method, cls)
384 if hasattr(cls, 'dataschemafile'):
385 # We just check if dataschemafile existed, but pylint missed that
386 # pylint: disable=no-member
--> 387 data = cls.get_serializer().instantiate(data)
389 # Instantiate object

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\abc\serializable.py:278, in Serializable.get_serializer(cls, filename)
277 try:
--> 278 cls.SERIALIZERS[filename] = jsonschemaparser.getblueprinter(filename)
279 except IOError as err:

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\helpers\jsonschemaparser.py:569, in getblueprinter(uri, blueprint)
568 validator = jsonschema.validators.validator_for(blueprint)
--> 569 blueprinter = extend(validator)(uri, blueprint)
570 return blueprinter

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\helpers\jsonschemaparser.py:474, in extend..Blueprinter.init(self, uri, schema, types, resolver, format_checker)
473 if resolver is None:
--> 474 resolver = FastrRefResolver(uri, schema)
476 if format_checker is None:

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\fastr\helpers\jsonschemaparser.py:62, in FastrRefResolver.init(self, base_uri, referrer, store, cache_remote, handlers)
61 default_handlers.update(handlers)
---> 62 super(FastrRefResolver, self).init(base_uri, referrer, store, cache_remote, default_handlers)

File D:\Software\Anaconda3\envs\newworc\Lib\site-packages\jsonschema\validators.py:930, in _RefResolver.init(self, base_uri, referrer, store, cache_remote, handlers, urljoin_cache, remote_cache)
927 self.store.update(store)
928 self.store.update(
929 (schema["$id"], schema)
--> 930 for schema in store.values()
931 if isinstance(schema, Mapping) and "$id" in schema
932 )
933 self.store[base_uri] = referrer

AttributeError: 'tuple' object has no attribute 'values'

During handling of the above exception, another exception occurred:

Exception Traceback (most recent call last)
Cell In[6], line 2
1 # Run the experiment!
----> 2 experiment.execute()

File E:\Tools\WORC-newpython\WORC\facade\simpleworc.py:69, in _error_bulldozer..dec(*args, **kwargs)
67 except Exception as e:
68 if e.class not in _valid_exceptions:
---> 69 raise unexpected_exception_exception
70 raise e

Exception: An unexpected error has occured, which we have not catched in WORC. Double check your code or make an issue on the WORC github so that we can fix this issue. Please report the actual error raised in your report.

@China-GentleWang
Copy link
Author

This is my env:
alabaster==0.7.16
aniso8601==9.0.1
anyio @ file:///C:/b/abs_847uobe7ea/croot/anyio_1706220224037/work
appdirs==1.4.4
argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work
argon2-cffi-bindings @ file:///C:/ci_311/argon2-cffi-bindings_1676424443321/work
arrow==1.3.0
asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work
async-lru @ file:///C:/b/abs_e0hjkvwwb5/croot/async-lru_1699554572212/work
attrs @ file:///C:/b/abs_35n0jusce8/croot/attrs_1695717880170/work
Babel @ file:///C:/ci_311/babel_1676427169844/work
backports.tarfile==1.2.0
baron==0.10.1
beautifulsoup4 @ file:///C:/b/abs_d5wytg_p0w/croot/beautifulsoup4-split_1718029833749/work
bidict==0.23.1
bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work
blinker==1.8.2
blosc2==2.7.1
Brotli @ file:///C:/b/abs_3d36mno480/croot/brotli-split_1714483178642/work
certifi @ file:///C:/b/abs_7bbxxprxir/croot/certifi_1720453609121/work/certifi
cffi @ file:///C:/b/abs_78eb1_vq6z/croot/cffi_1714483206096/work
charset-normalizer @ file:///croot/charset-normalizer_1721748349566/work
click==8.1.7
click-option-group==0.5.6
colorama @ file:///C:/ci_311/colorama_1676422310965/work
comm @ file:///C:/b/abs_67a8058udb/croot/comm_1709322909844/work
contourpy==1.2.1
cycler==0.12.1
debugpy @ file:///C:/b/abs_c0y1fjipt2/croot/debugpy_1690906864587/work
decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work
defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work
distro==1.3.0
docutils==0.20.1
enum-compat==0.0.3
enum34==1.1.10
executing @ file:///opt/conda/conda-bld/executing_1646925071911/work
fastjsonschema @ file:///C:/ci_311/python-fastjsonschema_1679500568724/work
fastr==3.3.1
Flask==3.0.3
flask-restplus==0.13.0
fonttools==4.53.1
fqdn==1.5.1
ghalton==0.6.2
gitdb==4.0.11
GitPython==3.1.43
graphviz==0.20.3
h11==0.14.0
httpcore==1.0.5
httpx==0.27.2
idna @ file:///C:/b/abs_aad84bnnw5/croot/idna_1714398896795/work
imageio==2.35.1
imagesize==1.4.1
imbalanced-learn==0.12.3
imblearn==0.0
importlib-metadata==6.11.0
ipykernel @ file:///C:/b/abs_c2u94kxcy6/croot/ipykernel_1705933907920/work
ipython @ file:///C:/b/abs_7dmlwmkafn/croot/ipython_1718287997280/work
ipywidgets @ file:///C:/b/abs_25rsd7yhd4/croot/ipywidgets_1709575117021/work
isodate==0.6.1
isoduration==20.11.0
itsdangerous==2.2.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.0.2
jedi @ file:///C:/b/abs_1b8kmj7rrm/croot/jedi_1721058359741/work
Jinja2 @ file:///C:/b/abs_92fccttino/croot/jinja2_1716993447201/work
joblib==1.4.2
json5==0.9.25
jsonpickle==3.2.2
jsonpointer==3.0.0
jsonschema==3.2.0
jsonschema-specifications==2023.12.1
jupyter @ file:///C:/b/abs_4e102rc6e5/croot/jupyter_1707947170513/work
jupyter-console @ file:///C:/b/abs_82xaa6i2y4/croot/jupyter_console_1680000189372/work
jupyter-events @ file:///C:/b/abs_c2m9s5b5m5/croot/jupyter_events_1718738115254/work
jupyter-lsp @ file:///C:/b/abs_ecle3em9d4/croot/jupyter-lsp-meta_1699978291372/work
jupyter_client @ file:///C:/b/abs_a6h3c8hfdq/croot/jupyter_client_1699455939372/work
jupyter_core @ file:///C:/b/abs_beftpbuevw/croot/jupyter_core_1718818307097/work
jupyter_server @ file:///C:/b/abs_9a333nh6yu/croot/jupyter_server_1718827092223/work
jupyter_server_terminals @ file:///C:/b/abs_ec0dq4b50j/croot/jupyter_server_terminals_1686870763512/work
jupyterlab @ file:///C:/b/abs_43venm28fu/croot/jupyterlab_1706802651134/work
jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work
jupyterlab-widgets @ file:///C:/b/abs_62picw9xos/croot/jupyterlab_widgets_1709323131962/work
jupyterlab_server @ file:///C:/b/abs_e08i7qn9m8/croot/jupyterlab_server_1699555481806/work
keyring==25.3.0
keyrings.alt==5.0.2
kiwisolver==1.4.5
lazy_loader==0.4
lxml==5.3.0
MarkupSafe @ file:///C:/b/abs_ecfdqh67b_/croot/markupsafe_1704206030535/work
matplotlib==3.7.0
matplotlib-inline @ file:///C:/ci_311/matplotlib-inline_1676425798036/work
mistune @ file:///C:/ci_311/mistune_1676425111783/work
more-itertools==10.4.0
mpmath==1.3.0
msgpack==1.0.8
multidict==6.0.5
nbclient==0.10.0
nbconvert @ file:///C:/b/abs_17p29f_rx4/croot/nbconvert_1699022793097/work
nbformat==5.10.4
ndindex==1.8
nest-asyncio @ file:///C:/b/abs_65d6lblmoi/croot/nest-asyncio_1708532721305/work
networkx==3.3
notebook @ file:///C:/b/abs_09nvambyty/croot/notebook_1719499424678/work
notebook_shim @ file:///C:/b/abs_a5xysln3lb/croot/notebook-shim_1699455926920/work
numexpr==2.10.1
numpy==1.26.0
overrides @ file:///C:/b/abs_cfh89c8yf4/croot/overrides_1699371165349/work
packaging @ file:///C:/b/abs_c3vlh0z4jw/croot/packaging_1720101866539/work
pandas==2.2.2
pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work
parso @ file:///opt/conda/conda-bld/parso_1641458642106/work
pillow==10.4.0
platformdirs @ file:///C:/b/abs_b6z_yqw_ii/croot/platformdirs_1692205479426/work
ply==3.11
progressbar2==4.4.2
prometheus-client @ file:///C:/ci_311/prometheus_client_1679591942558/work
prompt-toolkit @ file:///C:/b/abs_68uwr58ed1/croot/prompt-toolkit_1704404394082/work
prov==2.0.1
psutil @ file:///C:/ci_311_rebuilds/psutil_1679005906571/work
pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work
py-cpuinfo==9.0.0
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
pydicom==2.4.4
pydotplus==2.0.2
Pygments @ file:///C:/b/abs_fay9dpq4n_/croot/pygments_1684279990574/work
pyparsing==3.1.4
PyQt5==5.15.10
PyQt5-sip @ file:///C:/b/abs_c0pi2mimq3/croot/pyqt-split_1698769125270/work/pyqt_sip
pyrsistent==0.20.0
PySocks @ file:///C:/ci_311/pysocks_1676425991111/work
python-dateutil==2.8.2
python-json-logger @ file:///C:/b/abs_cblnsm6puj/croot/python-json-logger_1683824130469/work
python-utils==3.8.2
pytz @ file:///C:/b/abs_6ap4tsz1ox/croot/pytz_1713974360290/work
PyWavelets==1.7.0
pywin32==305.1
pywin32-ctypes==0.2.3
pywinpty @ file:///C:/ci_311/pywinpty_1677707791185/work/target/wheels/pywinpty-2.0.10-cp311-none-win_amd64.whl
PyYAML @ file:///C:/b/abs_782o3mbw7z/croot/pyyaml_1698096085010/work
pyzmq @ file:///C:/b/abs_89aq69t0up/croot/pyzmq_1705605705281/work
qtconsole @ file:///C:/b/abs_03f8rg9vl6/croot/qtconsole_1709231218069/work
QtPy @ file:///C:/b/abs_derqu__3p8/croot/qtpy_1700144907661/work
rdflib==6.3.2
redbaron==0.9.2
referencing @ file:///C:/b/abs_09f4hj6adf/croot/referencing_1699012097448/work
requests @ file:///C:/b/abs_9frifg92q2/croot/requests_1721410901096/work
rfc3339-validator @ file:///C:/b/abs_ddfmseb_vm/croot/rfc3339-validator_1683077054906/work
rfc3986-validator @ file:///C:/b/abs_6e9azihr8o/croot/rfc3986-validator_1683059049737/work
rpds-py @ file:///C:/b/abs_76j4g4la23/croot/rpds-py_1698947348047/work
rply==0.7.8
scikit-image==0.24.0
scikit-learn==1.3.0
scipy==1.14.1
Send2Trash @ file:///C:/b/abs_08dh49ew26/croot/send2trash_1699371173324/work
shellescape==3.8.1
SimpleITK==2.4.0
sip @ file:///C:/b/abs_edevan3fce/croot/sip_1698675983372/work
six @ file:///tmp/build/80754af9/six_1644875935023/work
smmap==5.0.1
sniffio @ file:///C:/b/abs_3akdewudo_/croot/sniffio_1705431337396/work
snowballstemmer==2.2.0
soupsieve @ file:///C:/b/abs_bbsvy9t4pl/croot/soupsieve_1696347611357/work
Sphinx==7.4.7
sphinx-argparse==0.5.2
sphinx-autodoc-typehints==2.2.3
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-httpdomain==1.8.1
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work
sympy==1.13.2
tables==3.10.1
terminado @ file:///C:/ci_311/terminado_1678228513830/work
threadpoolctl==3.5.0
tifffile==2024.8.24
tikzplotlib==0.10.1
tinycss2 @ file:///C:/ci_311/tinycss2_1676425376744/work
tornado @ file:///C:/b/abs_7bua0304mj/croot/tornado_1718740122405/work
traitlets @ file:///C:/b/abs_bfsnoxl4pq/croot/traitlets_1718227069245/work
types-python-dateutil==2.9.0.20240821
typing_extensions @ file:///C:/b/abs_0as9mdbkfl/croot/typing_extensions_1715268906610/work
tzdata==2024.1
uri-template==1.3.0
urllib3 @ file:///C:/b/abs_a7hvzm4y95/croot/urllib3_1718912661242/work
wcwidth==0.2.13
webcolors==24.8.0
webencodings==0.5.1
websocket-client @ file:///C:/b/abs_5dmnxxoci9/croot/websocket-client_1715878351319/work
Werkzeug==3.0.4
widgetsnbextension @ file:///C:/b/abs_a84ycxud7_/croot/widgetsnbextension_1709322945280/work
win-inet-pton @ file:///C:/ci_311/win_inet_pton_1676425458225/work
WORC==3.7.0
xgboost==2.1.1
xlrd==2.0.1
xnat==0.3.28
yarl==1.9.4
zipp==3.20.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant