Slow initialization generally indicates that the environment definition is too large or too complex. Initialization time tends to increase superlinearly with the number of packages in the environment. Additionally, Foundry will often pre-initialize commonly used environments, so if you created a custom environment based on a default profile, the slowness is likely because you are no longer getting a pre-initialized environment and must wait for a new environment to be created. See Introduction to Environment Creation for more details about the environment creation process.
Try the following:
python
and for packages with complex dependency graphs like scipy
. If adding a particular package caused the environment to become slow, try pinning a version for that package.
python=3.6.10
will match only that version, but python=3.6
will match any of python 3.6.x
, and so is more likely to be satisfiable.If your environment fails to initialize, you can view the environment startup error logs to view additional information about what went wrong.
The first line of the log will read Execution failed with non-zero exit code:
followed by an integer error code. This error code indicates the specific failure mode.
This error indicates that some subset of the specified packages (and/or their dependencies) are incompatible or could not be installed. If a recent change in the Environment Configuration panel caused initialization to begin failing, try reverting the change. Below is a list of common environment resolution errors.
Palantir contributed ↗ to the open-source Mamba community by providing better formatting of environment initialization error messages. As of February 2023, Foundry services benefit from errors that more closely represent the dependency tree being infringed by environment failures.
For guidance on understanding those new messages, how to interpret them, and advice on how to remediate them, see New error messages.
Find below a list of common error messages from the legacy error messages, before the new Mamba error messages were introduced.
In this case, no configured channel provides the package A
dependency.
Copied!1
Problem: nothing provides requested A.a.a.a
This can happen if the pinned version of your package does not exist. If this is the case, try relaxing or removing the versioning from your package within the meta.yml
; for example, matplotlib 1.1.1
could become matplotlib
. Alternatively, this may also mean that the environment manager could not locate the necessary package to install the specified version.
In this case, package A
contains a required dependency B
which was not provided by any channel.
Copied!1
Problem: nothing provides B-b.b.b needed by A-a.a.a:
Note that B
can be a package the user requested explicitly (in meta.yml/foundry-ml/vector
profiles) or it can be a transitive dependency.
This may occur if B
is not available for installation on your enrollment; for example, B
may have been recalled and therefore is not available for install.
If this is the case, try removing the pinned version of A
in case there is a version of A
that has all its dependencies available, or contact your Palantir representative to import the necessary package into Foundry.
Copied!1
cannot install both X.a.b.c and X.d.e.f
This error occurs if you try to install the same package X
and have two different version pinnings for both. For example, you might receive this error if you try to pin both python 3.6.*
and python 3.7.*
in your meta.yml
. You can resolve this issue by removing one of the duplicate package pinnings.
Copied!1
CondaService:ReadRepositoryPermissionDenied
If you receive this error, it may be because some of the assets and packages you need are not available in your enrollment.
In this case, package A
has a requirement on the version of package B
but this version of B
conflicts with other packages:
Copied!1
Problem: package A-a.a.a requires B >=2.2.5,<2.3.0a0, but none of the providers can be installed
Note that the package B
could refer to a transitive dependency of A
, which you have not explicitly listed as a requirement in your environment. See Resolved Environment documentation for more information on transitive dependencies.
To remediate an environment failure, consider the following steps:
STDOUT
in the environment startup logs.This error typically indicates that the environment initialization required more memory than was available on the Spark module. If a recent change in the Environment Configuration panel caused initialization to begin failing, try reverting the change. Otherwise, try one or more of the following suggestions:
If your environment still fails to initialize after removing all unneeded packages and pinning some of the remaining packages to specific versions, contact your Palantir representative and include details of all debugging steps you tried.
If your environment fails to initialize with an error code not listed above and the environment fails again on retry, contact your Palantir representative and include the full text of the error log.
We expect that default profiles will sometimes initialize quickly and sometimes take longer. In the latter case, you are waiting for Mamba to resolve your environment specification and install it onto the Spark module backing your Workbook. This is the default behavior. In the former case, either you are getting a pre-initialized module or your environment specification matches a resolved environment in the cache that can be installed right away. If many users are opening Workbooks around the same time, you are less likely to get a pre-initialized module and will need to wait for a new one to be spun up.
Some packages require both a Conda package and a JAR in order to be available. A common example is the graphframes package. Such packages require a special setup process, and you may experience the following error during build time if this package has not previously been configured for your instance:
Copied!1
o257.loadClass.: java.lang.ClassNotFoundException:<Class>
JAR Files can be added to a profile's configuration in the Advanced section of the Conda Environment configuration tab in Control Panel (see Configure Code Workbook Profiles). Contact your Palantir representative if you need assistance in configuring such packages.
If the guidance above is insufficient to resolve your issue, or if you encounter an issue outside the scope of this guide, contact your Palantir representative and include details of any debugging steps you tried.