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

How to re-cache a step after modifying it? #413

Open
BigRedT opened this issue Sep 20, 2022 · 9 comments
Open

How to re-cache a step after modifying it? #413

BigRedT opened this issue Sep 20, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@BigRedT
Copy link
Contributor

BigRedT commented Sep 20, 2022

What is the recommended way to recache a step?

I tried deleting the cached file and re-running as recommended by the error message, but I keep getting the following error:

Screen Shot 2022-09-19 at 8 14 05 PM

@BigRedT BigRedT added the question Further information is requested label Sep 20, 2022
@epwalsh
Copy link
Member

epwalsh commented Sep 20, 2022

That might be a bug considering you did what it told you to do, and then you still got an error. @dirkgr is more familiar with the local workspace.

That said, if you want to recache the step because you changed/fixed something with how the step runs, the best way to do that is to change/set the VERSION class variable on your step subclass. For example:

class MyStep(Step):
    VERSION = "001"

@BigRedT
Copy link
Contributor Author

BigRedT commented Sep 20, 2022

Thanks, setting the version number worked!

@dirkgr
Copy link
Member

dirkgr commented Sep 20, 2022

Glad you got unblocked. Before you did the version number thing, did you remove the entire directory? Or did you just remove all files in it?

@BigRedT
Copy link
Contributor Author

BigRedT commented Sep 20, 2022

I removed that directory

@BigRedT
Copy link
Contributor Author

BigRedT commented Sep 28, 2022

@dirkgr any updates on this bug?

Even though version numbers are great, sometimes I want to recache a step because of a change somewhere else in the code that affects that step (e.g rerunning on different random samples). For that purpose it would actually be helpful to be able to delete a step's cache and recompute that particular step as well as all the following steps that depend on it.

@BigRedT BigRedT added bug Something isn't working and removed question Further information is requested labels Sep 28, 2022
@epwalsh
Copy link
Member

epwalsh commented Sep 28, 2022

+1 for this. I ran into a similar situation where the step in question was defined in a dependency of my project (catwalk) so I couldn’t tick the version.

@dirkgr
Copy link
Member

dirkgr commented Oct 3, 2022

Still not a big fan, but maybe add an API to the workspace that allows you to delete a cache entry, and then expose it in the CLI?

@dirkgr
Copy link
Member

dirkgr commented Oct 3, 2022

the step in question was defined in a dependency of my project (catwalk) so I couldn’t tick the version

Why did you have to re-run it then?

@AkshitaB
Copy link
Contributor

AkshitaB commented Jun 28, 2023

Also ran into a similar issue.

maybe add an API to the workspace that allows you to delete a cache entry, and then expose it in the CLI?

This would be useful. Removing the directory works in the case of local workspace, but for remote workspaces, not all of the information resides in the bucket. For instance, in GSWorkspace, step info information is in the datastore, which allows for better speeds, but also means that removing a run/step requires us to delete the bucket entry as well as the datastore entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants