covalent icon indicating copy to clipboard operation
covalent copied to clipboard

Leptons render python wrapper code in UI instead of source code

Open Emmanuel289 opened this issue 2 years ago • 7 comments

Environment

  • Covalent version: 0.110.0
  • Python version: 3.8.13
  • Operating system: Linux/MacOS

What is happening?

When dispatching Leptons, the python wrapper code gets rendered to the UI instead of the Lepton's source instead.

How can we reproduce the issue?

This can be reproduced by dispatching a task containing a lepton and observing its output in the UI. The python wrapper code gets rendered to the UI instead of the Lepton's source code.

What should happen?

A lepton's source code should be rendered in the UI and not its python wrapper.

Any suggestions?

No response

Emmanuel289 avatar Jun 21 '22 02:06 Emmanuel289

~short term solution: do not show source code for C Leptons~

wjcunningham7 avatar Jul 27 '22 20:07 wjcunningham7

Hi, @Emmanuel289. Just to make sure that I understand expected result let's take a look an example, to be more concrete https://github.com/AgnostiqHQ/covalent/blob/develop/doc/source/how_to/coding/construct_lepton.ipynb. You would expect to see in this area instead of python_wrapper function image code from Python file, right?

def entrypoint(x: int, y: int) -> int:
    return x + y

TerraVenil avatar Jun 12 '23 17:06 TerraVenil

I was considering looking at this one; however, I am getting errors trying to install covalent. I am following the "First Steps" to contribute instructions at https://github.com/AgnostiqHQ/covalent/blob/master/CONTRIBUTING.md. I am getting an error in the third cell, after the command: python setup.py webapp

The error: File ".../anaconda3/envs/cov_dev/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['yarn', 'build']' returned non-zero exit status 1.

Any suggestions? Thanks!

nrhawkins avatar Jun 13 '23 03:06 nrhawkins

Hi @nrhawkins. Can you execute the following?

cd covalent_ui/webapp
yarm build

Probably you have an issue related to the node version. To setup webapp part there is another doc here https://github.com/AgnostiqHQ/covalent/blob/develop/covalent_ui/README.md or https://github.com/AgnostiqHQ/covalent/blob/master/CONTRIBUTING.md#contribution-for-covalent-ui

TerraVenil avatar Jun 13 '23 08:06 TerraVenil

Hi @TerraVenil - thanks so much!!! I hadn't read ahead, but I see there now that it requires node v16 or later. I had 12, which was the default for my latest Ubuntu and Fedora Linux. Looks like I am in business now!!! All the tests pass too. Thanks again!!! I guess the hack is over, but, at least, I feel better!

nrhawkins avatar Jun 14 '23 05:06 nrhawkins

This issue is a part of Hacktoberfest. Closing this issue will earn you 3 points.

wjcunningham7 avatar Oct 04 '23 15:10 wjcunningham7

I'd like to earn 3 points please!

ShatilKhan avatar Oct 22 '23 13:10 ShatilKhan