22,710 questions
0
votes
2
answers
52
views
pytorch Module B=A, A.to('cpu'), but the tensor in B is still in GPU, why?
After converting module A to CPU, the origin parameter tensor still stays on the GPU? When it is released? Is it wrong if I reuse the parameter?
My code:
import torch.nn as nn
class A(nn.Module):
...
0
votes
2
answers
53
views
python: vscode doesnt highlight direct import from module
When I attempt to import a module from a local package (from core import config), VSCode's syntax highlighting isn't working. When hovering over config, it shows "config: Any" (the editor ...
0
votes
0
answers
84
views
Why does Visual Studio mention the symbol loading to be disabled by Include/Exclude setting? [duplicate]
I'm debugging a C++ program, and in order to do that, I'd like to have a look at objects, defined in imported libraries. However, the "Modules" window mentions some symbols not to be loaded ...
1
vote
1
answer
72
views
Ray: Resource request cannot be scheduled — using offline data and enabled the RL module
I tried training a BC algorithm using offline data and enabled the RL module in the algorithm configuration. I ran the code on Google Colab, which only provides 2 CPUs, and encountered the following ...
0
votes
0
answers
26
views
Wordpress assets loading. Uncaught TypeError: Failed to resolve module specifier
I hope you can help me with one, it's drivinig me crazy :(
I recently splitted a giant file called admin.js into many modules, using these two WordPress functions:
wp_register_script_module
...
0
votes
0
answers
107
views
How to make #[cfg(test)] gated code in one module, visible to #[cfg(test)] code in another module in Rust?
I have some code I am working on that has a certain struct object Permissions:-
// Stores permissions with a bit flag
/// 1 << ? - Vote - Anyone with a weight > 0 can vote.
/// 1 << ? -...
2
votes
1
answer
61
views
FastAPI won't recognize module changes
I keep my SQL hooks in a separate module. I added a function, and for the life of me I cannot get it to be registered in the fastAPI. I can alter the main file of the fast API, but it just keeps ...
0
votes
0
answers
74
views
Why Odoo custom module code changes are not reflected in website?
I’m building a website using a custom Odoo module. I created a hero section on the homepage, and I can see it correctly at localhost:8070.
The issue is that after making several changes and adding new ...
2
votes
1
answer
52
views
vscode breakpoints in an imported module do not work suddenly [closed]
I encountered a weird problem about vscode breakpoints for python in an imported module.
The module is in the subfolder 'src' of the working folder of the main program 'main.py'.
Then the main program ...
0
votes
0
answers
42
views
Can i modifiy the priority when loading more than one linux module?
I'm doing a Linux kernel module which every time a keyboard is plugged in it prints a message like "Keyboard connected!"
#include <linux/module.h>
#include <linux/kernel.h>
#...
3
votes
1
answer
72
views
TypeError: unsupported operand type(s) for +: 'SQL' and 'str'
Issue:
I'm encountering a TypeError: unsupported operand type(s) for +: 'SQL' and 'str' when trying to install an Odoo module that was working fine in Odoo 17, but now has issues after migrating it to ...
0
votes
0
answers
28
views
intall a submodule before build if it is not exist yet?
I have a multi-module project. The whole point of the project is to provide a parent pom for other projects to do a specific way of build, which depends on an artifact created one of the modules. ...
0
votes
1
answer
58
views
Can tcsh users reliably use conda packages with .sh activate/deactivate hooks but no .csh alternative?
My site has a huge amount of infrastructure for configuring project environments using tcsh. I'm trying to add conda environments for managing packages.
In particular I'm using Miniforge-25.5.1 and ...
3
votes
1
answer
96
views
Can i use the using: scope modifier for a script block executed in a module function
If a have Powershell function, like
function invoke-sb1 ([scriptBlock] $sb) {
invoke-command -computerName abc -credential (get-cred.ps1) -scriptBlock $sb
}
and then invoke the function from ...
0
votes
0
answers
50
views
Could not build Objective-C module 'TensorFlowLiteSelectTfOps'
I'm working on an iOS project where I need to use both TensorFlowLiteSwift and TensorFlowLiteSelectTfOps. I installed them via CocoaPods by including the following in my Podfile:
pod '...
1
vote
1
answer
147
views
Refer to a class in Ruby
In Ruby I create a module like this:
Mod = Module.new do
class MyClass
attr_reader :a
def initialize(a)
@a = a
end
end
end
And I'm trying to create an instance of the class:
...
-1
votes
3
answers
131
views
I need to import a function from a file in vscode using python but "module not found error" error happening
I have a workspace with different projects as shown below.
I have a code in my main_scripts.py which is under main_scripts sub folder that needs to call a function inside the file config_reader.py ...
0
votes
1
answer
84
views
Header includes in global module fragment not propagated to other files
I have two modules:
module;
#include <cerrno>
#include <streambuf>
#include <nlohmann/json.hpp>
#include <nlohmann/json_fwd.hpp>
export module Utils:JsonSerializable;
...
2
votes
0
answers
53
views
PrimeNg 19.x version Packages not loading in imports
@Component({
selector: 'app-root',
imports: [RouterOutlet,FormsModule,MenuBarModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
when im typing the ...
1
vote
1
answer
336
views
How can I use Nuitka to import all script's modules?
I try to turn a .py file into a .bin file with Nuitka.
Since it have to work on machine without python installed, I use the --standalone option that comes with --follow-imports and --python-flag=...
0
votes
0
answers
110
views
How to use C++20 modules across shared library and main executable in Clang with CMake?
Sorry newbie here but this is not obvious for me.
I use linux mint, latest clang version (21.0.0) and switching my project to C++ modules. The problem I experience is that i need to interact in shared ...
0
votes
1
answer
47
views
Configuring external user-defined module for multiple scripts in python
I am running several python scripts (one at a time) to manipulate photo, video, and audio files in different combinations in the CWD.
Instead of specifying in each script's body the dozens of "...
1
vote
1
answer
54
views
Gradle deploy failing in Liferay due don't recognize project import
I’m extending a Liferay 7 portal by adding a new “basic” app under the standard modules/apps directory:
liferay-portal/
└── modules/
└── apps/
└── basic/
├── basic-api/
...
1
vote
1
answer
100
views
Powershell: permanently import module
Every time I open a new powershell console and import-module a library (e.g AWSPowershell - yes it is old/big but I can’t use the new one without downloading it) it takes some time to fully import the ...
0
votes
0
answers
36
views
Can input elements being positioned in Drupal 10 into a table
I have in Drupal 10 made a simple table that is being build with a PHP as part of a module.
When I use a buildForm-function, I can not position the input fields. I want these to be as if they were ...