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

Optional relabelling of nodes & edges with Annotation.UNKNOWN label #200

Merged
merged 11 commits into from
Sep 6, 2023

Conversation

KristinaUlicna
Copy link
Collaborator

@KristinaUlicna KristinaUlicna commented Sep 4, 2023

If the user decides to do so, relabel all GT annotations from Annotation.UNKNOWN to Annotation.TRUE_NEGATIVE, to increase the number of data points to train the GCN on. Particularly good for exhaustive annotation.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

grace/io/image_dataset.py Show resolved Hide resolved
grace/training/train.py Outdated Show resolved Hide resolved
grace/io/image_dataset.py Show resolved Hide resolved
@crangelsmith
Copy link
Collaborator

I'm trying to run the code, but I get a fail with the following error:

File "/Users/crangelsmith/Projects/grace/grace/models/classifier.py", line 72, in forward
    embeddings, p=self.dropout, training=self.training
    ^^^^^^^^^^
UnboundLocalError: cannot access local variable 'embeddings' where it is not associated with a value

I think it is due to the embeddings variable in this line not being defined is the condition in line 66 is not met.

embeddings = x

@KristinaUlicna
Copy link
Collaborator Author

I'm trying to run the code, but I get a fail with the following error:

File "/Users/crangelsmith/Projects/grace/grace/models/classifier.py", line 72, in forward
    embeddings, p=self.dropout, training=self.training
    ^^^^^^^^^^
UnboundLocalError: cannot access local variable 'embeddings' where it is not associated with a value

I think it is due to the embeddings variable in this line not being defined is the condition in line 66 is not met.

embeddings = x

Temporarily fixed now, proper fix for option to train a linear-only classifier upcoming in #183 🚀

@KristinaUlicna KristinaUlicna changed the title Optional of relabelling of nodes & edges with Annotation.UNKNOWN label Optional relabelling of nodes & edges with Annotation.UNKNOWN label Sep 5, 2023
@crangelsmith
Copy link
Collaborator

I'm trying to run the code, but I get a fail with the following error:

File "/Users/crangelsmith/Projects/grace/grace/models/classifier.py", line 72, in forward
    embeddings, p=self.dropout, training=self.training
    ^^^^^^^^^^
UnboundLocalError: cannot access local variable 'embeddings' where it is not associated with a value

I think it is due to the embeddings variable in this line not being defined is the condition in line 66 is not met.

embeddings = x

Temporarily fixed now, proper fix for option to train a linear-only classifier upcoming in #183 🚀

Cool, it runs now without issues.

Copy link
Collaborator

@crangelsmith crangelsmith left a comment

Choose a reason for hiding this comment

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

I've run the code with the relabelling annotation on and off and seems to run well. My only comment left is on making the relabeling a configurable option for the user, but besides that I think is ready to merge.

@KristinaUlicna KristinaUlicna merged commit c4bd043 into main Sep 6, 2023
1 check passed
@KristinaUlicna KristinaUlicna deleted the relabel branch September 6, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request methodology Building functional & diverse pipeline
Projects
None yet
2 participants