Intel® Tiber Developer Cloud
Help connecting to or getting started on Intel® Tiber Developer Cloud
331 Discussions

How to reset pre-configured conda environment?

Kunger11
Novice
13,551 Views

I am facing an issue with my conda environment in Jupyter Notebook. I activated the 'pytorch-gpu' environment and installed some packages using pip. However, there are compatibility issues with the versions of these packages. Now, I would like to reset the 'pytorch-gpu' environment to its initial state. Could you please provide guidance on how to do this?

Additionally, I have noticed that even when no notebooks are running in Jupyter Notebook, the system's CPU remains at a high load. Is this behavior normal, and if not, what could be the possible reasons for it?

Thank you for your assistance.

Labels (1)
0 Kudos
7 Replies
Athirah_Intel
Employee
13,520 Views

Hi Kunger11,

 

Thank you for reaching out to us.

 

We have informed the relevant team about this issue for further investigation and will update you as soon as possible.

 

 

Regards,

Athirah


0 Kudos
Athirah_Intel
Employee
13,391 Views

Hi Kunger11,

 

Please share your user ID so that we can investigate this issue further.

06090733.png

 

 

Regards,

Athirah

 

0 Kudos
PackageRate
Beginner
13,377 Views

Resetting a pre-configured conda environment involves a few steps to return it to its initial state:

  1. Deactivate the Environment: If the environment is currently active, deactivate it. Use:conda deactivate

  2. Remove the Environment: Use the following command to remove the environment entirely:

          conda remove --name your_env_name --all

Replace your_env_name with the name of the environment you want to reset.

      3.Recreate the Environment: If you have the environment configuration file or know the packages you want to reinstall, recreate the environment:

conda create --name your_env_name [list of packages]

Replace your_env_name with the environment name and [list of packages] with the specific packages you want to install. If you have a requirements.txt file containing package names, you can use conda create --name your_env_name --file requirements.txt to recreate the environment from the file.

This process will remove the existing environment and create a new one with a clean slate, allowing you to start afresh with your pre-configured environment.

Package Rate

0 Kudos
Kunger11
Novice
13,355 Views

is you mean username on computed node?

u22f390a763ad8fc99b0d55cf8c167d0@idc-beta-batch-pvc-node-03

0 Kudos
Athirah_Intel
Employee
13,344 Views

Hi Kunger11,


Yes, that is correct. Thank you for sharing your user id.

 

We're investigating this issue and will update you as soon as possible.



Regards,

Athirah


0 Kudos
Athirah_Intel
Employee
13,263 Views

Hi Kunger11,

 

There are couple of ways to reset pytorch :

 

1. PyTorch provides a built-in function called empty_cache() that releases GPU memory that can be freed. to use empty_cache():

 

{{import torch

torch.cuda.empty_cache()}}

This function releases all the memory that can be freed, may need to call this function multiple times to ensure that all the memory is released.

 

2. Another method is to delete variables  that are no longer needed. When a variable is deleted, its memory is freed and can be used by other variables.

 

Here’s an example:

 

import torch

# Define a tensor

x = torch.randn(1000, 1000)....

{{}}

{{ # Use the tensor}}

y = x * 2

{{}}

# Delete the tensor

{{del x

  1. }}
  2. {{}}
  3. {{Use the GPU memory for other variables
  4. z = y * 3}}
  5. {{}}

 

 

Regards,

Athirah


0 Kudos
Athirah_Intel
Employee
13,140 Views

Hi Kunger11,

 

This thread will no longer be monitored since your question has been answered. If you need any additional information from Intel, please submit a new question.

 

 

Regards,

Athirah


0 Kudos
Reply