Skip to content

Some issues about inference #1

Description

@HuichiZhou

When I use the following model to inference,
code1 is a normal code, and code2 is a random string, why the output is true?

from transformers import pipeline

pipe = pipeline(model="Lazyhope/python-clone-detection", trust_remote_code=True)
code1 = """h = int(input()) ans = 0 n_enemy = 1 while h > 1: h //= 2 ans += n_enemy n_enemy *= 2 if h == 1: ans += n_enemy print(ans)"""
code2 = """123456789"""
is_clone = pipe((code1, code2))
is_clone

{False: 0.01862591877579689, True: 0.9813740849494934}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions