Hi, I've been able to access local `whl` file usin...
# ask-metaflow
b
Hi, I've been able to access local
whl
file using the syntax
Copy code
@pypi(
        python="3.11.5",
        packages={
            "/my/directory/path/mylibrary.whl": "",
        },
    )
using the
metaflow-netflixext
package. I'm having to have
mamba
installed though. Is there any way of configuring things so that
mamba
is not required? For example, setting an env variable to use
conda
instead?
โœ… 1
d
of course
you can use conda, micromamba or mamba
Let me find you the env variable to use (you can set it in your metaflow config as well if you want)
b
Ah, just googled. Thanks @glamorous-night-24898. Is that
METAFLOW_CONDA_DEPENDENCY_RESOLVER
yes
you beat me to it ๐Ÿ™‚
b
๐Ÿ™‚
Thanks so muc.
d
i test primarily with mamba so if you face issues with conda/micromamba, let me know and Iโ€™ll take a look.
โœ… 1
it should work the same though.
ps: I am @dry-beach-38304 (so you may have pinged some unsuspecting similarly named person ๐Ÿ™‚ )
b
๐Ÿ˜ž oof
It worked! Thanks @dry-beach-38304
d
cool โ€” let us know if you have more questions/concerns.
b
Here's another question @dry-beach-38304. So let's say that the
.whl
file has been updated. Is there a way to force update of the cached environment?
d
I am actually working on that. Right now not directly. It uses the path to determine if something changed. SO if the name or path changes, it will re-update it but it doesnโ€™t pick it up as is. There was a similar question around using a local directory. I need to fix that but havenโ€™t quite figured out how yet for everything (for a whl file it should be easier to just hash it and figure out if the hash changed).
let me try to get something together shortly โ€” itโ€™s come up a few times now
๐Ÿ™ 1
in the meantime, if you move it around and/or rename it, it should work (yes, itโ€™s not great)
b
Hi @dry-beach-38304 I seem to occasionally encounter the "file change update" problem. Is there a fix for that besides renaming? I had resorted to just trying to place everything within the flow file.
d
Sorry โ€” this is still on my plate (I know I know itโ€™s been a while). I am hoping to get a few of these minor annoyances out soon. I actually started on it uesterday :). Hopefully by this weekend. I can definitely take care of the wheel part (still thinking for directory).
โœ… 1
b
Thanks! I'm wondering if it is possible or advisable to have "helper" methods defined in a FlowSpec derived class?
d
What do you mean?
b
Hi @dry-beach-38304, I just meant if it is ok to have a class method separate from a flow step as part of a FlowSpec subclass. for example
Copy code
def helper(self, x, y):
   etc.
d
Alright โ€” I am an idiot. A similar problem has come up but itโ€™s not what you are asking (I am also fixing the similar problem). For what you are asking though, yes, there is a way rn to get it to work. You can do something like
python ./myflow.py --environment=conda environment resolve --force <step-name>
. That will re-resolve the environment even if it is already resolved. The related problem is about uploading updated versions of the wheel and that it seems it does already (albeit badly) So am working on that as well but the command above should help.
โœ… 1
now I feel like an idiot. Anyways, let me know if that works for you.
๐Ÿ’ฅ 1
๐ŸŽ‰ 1
b
@dry-beach-38304 you are amazing. Thank you ๐Ÿ™
d
does it work?
b
I haven't tested it, but I very much appreciate the efforts!
One question @dry-beach-38304, does this require version 2.11.8 of metaflow? I was having problems with version 2.11.7 so rolled back to 2.11.0.
d
What were the issues in 2.11.7?
b
I was getting the following error in 2.11.7 when attempting to run Amazon AWS job with `@batch`` parameter
Copy code
2024-03-29 08:36:00.520 [1195/train/8756 (pid 10349)] raise ParamValidationError(report=report.generate_report())
2024-03-29 08:36:00.520 [1195/train/8756 (pid 10349)] botocore.exceptions.ParamValidationError: Parameter validation failed:
2024-03-29 08:36:00.520 [1195/train/8756 (pid 10349)] Missing required parameter in containerProperties.logConfiguration: "logDriver"
d
@brainy-truck-72938 โ€” this last error is not related to plugin but seems to be to this: https://github.com/Netflix/metaflow/pull/1777/files
โœ… 1
b
yeah, https://github.com/Netflix/metaflow/pull/1777/files is the fix actually, because if you don't populate these values, we don't fill them -- which is the same behaviour as before...
โœ… 1
b
Thanks @freezing-telephone-6958
b
actually, there's still a slight problem it seems, let me fix it
โœ… 1
b
Thanks ๐Ÿ™‚
So would the new version (after 2.11.8) have the fixes you mention @dry-beach-38304 or are those found just in the extensions?
b
https://github.com/Netflix/metaflow/pull/1786 is not in 2.11.8, yet to be merged ๐Ÿ˜•
โœ… 1
@bored-megabyte-53307 this is fixed in 2.11.9
๐ŸŽ‰ 1
b
Thanks @freezing-telephone-6958