BYUCamachoLab / simphony

A simulator for photonic integrated circuits.
https://simphonyphotonics.rtfd.io
Other
119 stars 35 forks source link

Cannot run the Layout-Aware example #87

Open vmetodiev opened 1 year ago

vmetodiev commented 1 year ago

On the latest master branch commit, even if gdsfactory is installed, upon trying to run the "Layout-Aware Monte Carlo Simulations for Yield Estimation" example from the official documentation page, I get:

2023-07-08 18:51:59.778 | INFO | gdsfactory.config:init:205 - LogLevel: INFO 2023-07-08 18:52:01.503 | WARNING | gdsfactory.types::47 - gdsfactory.types has been renamed to gdsfactory.typings. types will be removed in the near future. 2023-07-08 18:52:01.749 | WARNING | gdsfactory.pdk:get_active_pdk:621 - No active PDK. Activating generic PDK.

2023-07-08 18:52:01.934 | INFO | gdsfactory.technology.layer_views:init:785 - Importing LayerViews from YAML file: '/usr/local/lib/python3.8/dist-packages/gdsfactory/generic_tech/layer_views.yaml'. 2023-07-08 18:52:01.945 | INFO | gdsfactory.pdk:activate:266 - 'generic' PDK is now active Traceback (most recent call last): File "sim.py", line 62, in c = mzi() File "/usr/local/lib/python3.8/dist-packages/gdsfactory/cell.py", line 186, in _cell component = func(*args, **kwargs) File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute File "sim.py", line 33, in mzi gc_input["pin1"].connect(y_splitter, gcin, ysplit) File "/home/ubuntu/Work/Photonics/simphony/simphony/pins.py", line 104, in connect raise ImportError("gdsfactory is not installed. Try pip install gdsfactory.") ImportError: gdsfactory is not installed. Try pip install gdsfactory.

Note: I have created the sim.py file that contains the copy-pasted snippets from the tutorial and is located inside the repo root directory.

sequoiap commented 1 year ago

@cjcarver @SkandanC

sequoiap commented 1 year ago

gdsfactory's API changes frequently, so it's possible that the latest versions of gdsfactory don't work with this example anymore. @SkandanC, any ideas on how far back of a reversion might be required?

I'll also mention that simphony is presently undergoing a pretty major refactoring to be released as v0.7.0 (and it will be incompatible with previous versions). The new API will be much prettier, in my opinion as the developer, so we probably won't be trying very hard to get the old versions of simphony to work with gdsfactory again but focus our efforts on the new one.