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

πŸ› Fix compulsory inPort args in new compiler #211

Merged
merged 2 commits into from
Feb 25, 2023

Conversation

MFA-X-AI
Copy link
Member

@MFA-X-AI MFA-X-AI commented Feb 24, 2023

Description

Currently the new compiler does not compile any xircuits canvas that has compulsory inPorts which is indicated as [β˜…]. As currently Xircuits bakes the β˜… into the label, it breaks the compiler due to β˜… being a a special character.
This PR updates the compiler to read .xircuits files using utf-8 encoding, then filters β˜… from port strings.

References

#209
#210

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

Take the wheel and try compiling examples/KerasTrainImageClassifier.xircuits. It should correctly compile.

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

Notes

In the future we should rethink baking the β˜… in the label.

Copy link
Member

@mansouralawi mansouralawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR,

I have faced this issue with building xircuits or using the branch wheel:

  • Any Xircuits examples with CompArg is compiling to an empty python script.
  • Xircuits examples without CompArg are fine.

image

@MFA-X-AI
Copy link
Member Author

Ah thanks for catching that. I only tested the compile using the xircuits-compile command, turns out the compile from in-Xircuits does call it from a different place. Should be fixed now.

@MFA-X-AI MFA-X-AI merged commit b2e3785 into master Feb 25, 2023
@MFA-X-AI MFA-X-AI deleted the fahreza/fix-compulsory-ports branch February 25, 2023 11:06
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

Successfully merging this pull request may close these issues.

2 participants